Monday, April 2, 2012

Modifying the default language in InfoPath

This will be a quick exercise on how to change the language you can write within InfoPath 2007...

Click on Form Options
Crack open your favorite form builder and then click on Tools.  From that menu, click on Programming on the left...  You should already know where I'm going with this.  Let's change that default (C#) to something nonsensical, unstructured and putrid; yet everyone seems to be jumping on the bandwagon: JavaScript or in this case JScript. Whatev...







(¸¸.♥➷♥•*¨)¸.•´¸.•*¨) ¸.•*¨)
(¸.•´(¸. ¸.•´¸.•*¨) ¸.♥➷•*¨)
─▀██▀─▄███▄─▀██─██▀██▀▀▀█─
──██─███─███─██─██─██▄█──conquers
──██─▀██▄██▀─▀█▄█▀─██▀█──all ♥➷♥
─▄██▄▄█▀▀▀─────▀──▄██▄▄▄█
¸.•´¸.•*¨) ¸♥.•*¨) (¸.•´¸♥➷♥¸.•´♥¸.•´♥¸.•*¨)♥.•*¨)¸.•*♥¸


Form Options



















(¸¸.♥➷♥•*¨)¸.•´¸.•*¨) ¸.•*¨)
(¸.•´(¸. ¸.•´¸.•*¨) ¸.♥➷•*¨)
─▀██▀─▄███▄─▀██─██▀██▀▀▀█─
──██─███─███─██─██─██▄█──conquers
──██─▀██▄██▀─▀█▄█▀─██▀█──all ♥➷♥
─▄██▄▄█▀▀▀─────▀──▄██▄▄▄█
¸.•´¸.•*¨) ¸♥.•*¨) (¸.•´¸♥➷♥¸.•´♥¸.•´♥¸.•*¨)♥.•*¨)¸.•*♥¸




I've decided from now on any InfoPath post will need something extra for me, so I can start to

░░░░░░░░░░░░▄▄
░░░░░░░░░░░█░░█
░░░░░░░░░░░█░░█
░░░░░░░░░░█░░░█
░░░░░░░░░█░░░░█
███████▄▄█░░░░░██████▄
▓▓▓▓▓▓█░░░░░░░░░░░░░░█
▓▓▓▓▓▓█░░░░░░░░░░░░░░█
▓▓▓▓▓▓█░░░░░░░░░░░░░░█
▓▓▓▓▓▓█░░░░░░░░░░░░░░█
▓▓▓▓▓▓█░░░░░░░░░░░░░░█
▓▓▓▓▓▓█████░░░░░░░░░█       
██████▀░░░░▀▀██████▀

it...

Want to see what damage I can do?  Stay tuned...

Monday, March 26, 2012

Get the ID of any SharePoint Wiki page

Hello _spPageContextInfo!!!
I found this little gem by viewing the source of my site spdwiki.com.  Simply running a console.dir() on this object reveals these properties:


  1. alertsEnabledtrue
  2. allowSilverlightPrompt"True"
  3. currentLanguage1033
  4. pageItemId1
  5. pageListId"{15d98081-a722-48ad-a30c-c25d4c31a228}"
  6. siteServerRelativeUrl"/"
  7. userId1
  8. webLanguage1033
  9. webServerRelativeUrl"/"
  10. webUIVersion4


I've noticed running this same inquiry on a different site, say http://www.sharepointfabian.com, the properties are different:


  1. alertsEnabledtrue
  2. allowSilverlightPrompt"True"
  3. currentLanguage1033
  4. pageListId"{a4668dd2-4dac-4cce-baf0-ddb1ea4f2d5e}"
  5. siteServerRelativeUrl"/"
  6. webLanguage1033
  7. webServerRelativeUrl"/blog"
  8. webUIVersion4


It's safe to say, this is because the latter is a blog and not a wiki.

What to make of all of this?  I'm able to display pertinent data accordingly and no longer required to rely on the text of the page name.

var pageID = _spPageContextInfo.pageItemId;

It's a much cleaner solution that just feels good.

I've been working on a commenting system for a SharePoint 2010 system.  Knowing some of these internal variables that are floating around is invaluable.  Hope you find this useful as well.

Yes Josh, I'm going to finish this finally. ;-)

Wednesday, March 21, 2012

Add Notepad++ to the context menu

This little regedit keeps coming in handy.  Thought I’d add it here so it’s easy for me to find and the other 2 of you that read this blog.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\Open with Notepad++\command]
@="\"C:\\Program Files (x86)\\Notepad++\\notepad++.exe\" \"%1\""

ContextMenuSave that into a file with the extension .reg and double click it to add to the registry.  You’ll now see Open with Notepad++ in the context menu.


Pretty awesome, eh?  You can add whatever else you like to your context menu as well.  As always though be cautious when modifying the registry.


I’ve seen people wreck, destroy, obliterate their machine fiddling with things they shouldn’t have.  With that said, have fun doing it!




This post was inspired by: http://www.sevenforums.com/software/29942-notepad-context-menu.html