Posts

Showing posts from July, 2010

Disable add "Name.dll" request on IE7/8

Add to master page <script type="text/javascript"> function ProcessImn(){} function ProcessImnMarkers(){} </script> http://blog.drisgill.com/2010/02/removing-name-activex-control-warning.html

Feature Scopes, targets, and security handling

Feature Scope (feature attribute) say where the feature will appear, and how activation/deactivation is inherited throughout the sites - Web(subsite) - WebApplication(web application) - Site(site collection) - Farm Note: Farm features do not allow modules DeploymentTarget (manifest.xml assembly attribute) lets us say we either want to give the dll full trust (stuck it in the GAC) or just copy it to the current web application's bin folder. - GlobalAssemblyCache - WebApplication Save Control tagging to web.config lets assemblies execute code on our pages. This definition can, as the previous two ones, be compiled within the wsp package, in the manifest.xml. <Assemblies> <Assembly Location="mydll.dll" DeploymentTarget="GlobalAssemblyCache" > <SafeControls> <SafeControl Assembly="mydll, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a3b8628163ff75bc" Namespace="mydll" TypeName="*" Safe=...

Library not registered, messed up init.js

Problem: SharePoint 2010 throws JavaScript errors in the status bar: "Library Not Registered" init.js line 0 Solution: I've tried the fix on johndandison.com with no luck: C:\Program Files (x86)\Microsoft Office\Office12>regsvr32 /i name.dll Then I look for the file and I found that the error was gone by renaming it: C:\Program Files (x86)\Microsoft Office\Office12>ren name.dll 1.dll

Cancel Job Deployment

Look for the job in timer job definitions, in C.A, operations. Once you click on the job, there will be a delete option. To use the command line correctly, remove the 2%D and copy the id, or run stsadm -o enumdeployments. To force scheduled jobs to start: stsadm -o execadmsvcjobs To cancel a specific job being deployed: stsadm -o canceldeploymeny -id [JOB_ID] http://itdevnewbie.blogspot.com/2008/05/stsadm-o-canceldeployment-when-solution.html

Write C# code in aspx form

Quote from Nick's blog Open up SharePoint Designer and the masterpage you want to edit. Switch to the code view and anywhere from the first <head> tag down you can add some inline c# code: <script runat="server"> string myVar = "hello world!"; void Page_Load(object sender, System.EventArgs e) { Response.Write(myVar); SPSite siteCollection = new SPSite("http://usb-server1"); SPWeb site = siteCollection.OpenWeb("/SiteDirectory/MainCalendar/"); SPList list = site.Lists["Announcements"]; SPListItemCollection items = list.Items; foreach(SPListItem item in items) { Response.Write(item["Title"].ToString()); Response.Write("<br/>"); } } </script> Doesn’t do anything amazing but does show you can use the SharePoint object model in your inline code. If you saved the masterpage now and opened the s...

Windows Live Installer failure

- "Uninstall Live Mesh Beta" Error when trying to install Windows Live Essentials Beta - Live Mesh does NOT appear in Programs and Features list from Control Panel Remove registry entry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\[User_SID]\Products\9D1E4BCD781B45B479E1418784C5A935 http://alensiljak.blogspot.com/2009/04/uninstalling-live-mesh-beta.html

Edit dynamic control by javascript

So you want to change the properties of a control, such as button "btnPost". Seems rufly easy to accomplish, unless SharePoint, DotNetNuke or other environment decides to change the ID property of the control, adding internal IDs. Like this: ctl00_m_g_d14f2004_461a_4c76_9224_70143135d269_btnGen So how do you change, say, the display option of the control, to make it visible or hidden? The trick is to make a function that looks for the control, given a regular expression. btnGen.Attributes.Add("onclick", "this.style.display='none';var re = new RegExp('btnPost', 'g');var elems = document.getElementsByTagName('*'), i = 0, el;while (el = elems[i++]){if (el.id.match(re)){document.getElementById(el.id).style.display='';location.href='" + url + "';}}"); //hide button I must say, creadits to make this possible go to Kor's postings on webdeveloper.com , where we can find the complete function.

Keyboard Shortcuts

Image
Enable keyboard navigation for users who can't "point and click". accesskey="G" IE response: [Point] Alt + Access Key [Click] Enter Firefox response: [Click] Alt + Shift + Access Key Macintosh response: [Click] Control + Access Key

MOSS Accessibility - going caveman

Wonder why it's so hard to make things clear, and information "accessible". So we want to build a SharePoint 2007 Accessible Site!? 1. Start a master page from scratch? Use AkS's or Heather Solomon's minimal masters? I'd say its better to start off with BlueBand.master from AkS and start by changing the doctype to xhmlt 1.0 scrict (why is it not already??) 2. Use transitional HTML 4.01? Standard 1.0 XHTML? Strict 1.0 XHTML? I found out strict XHTML isn't exactly a requirement for accessible sites so HTML 4.01 will do just fine. 3. What's the benefit of using AkS publishing masterpage? Just css font resizing? "These pages have been modified to include modifications and enhancements for sizing, skip navigation, table summaries, removal of deprecated elements, and usage of the AKS Style Sheets." I guess I'll have to find these out for myself...

Accessibility in SharePoint 2007

Accessibility for Starters Official AKS build by HISoftware, aided by Microsoft (register, login and download) https://aks.hisoftware.com/default.aspx NOTE: After installing in x64 systes, you must fix the AKS folder copied to the 12 hive, because it will be on the x86 program folder and not on the "normal" one. Just move it from the the corrent folder from: C:\Program Files (x86)\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\FEATURES\AKS to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\FEATURES\AKS Then its okay to run file C:\Program Files (x86)\HiSoftware\AKS\install_AKSFEAT.bat Unofficial AKS http://aks.codeplex.com/ White Paper from MS http://technet.microsoft.com/en-us/library/cc668367(office.12).aspx W3C WGAC 1.0 Guidelines http://www.w3.org/TR/WCAG10/ Accessibility Tips (from AKS User Guide.pdf) - Add xhtml strict to web.config under system.web <xhtmlConformance mode="Strict" /> - Place Site Actions...

Basic two-page simulation

<script type="text/javascript" language="javascript">   $(document).ready(function () {     $('#Panel2').hide();     $('#ButtonPrev').hide();     $('#ButtonNext').click(function() {       $('#Panel1').hide();       $('#Panel2').show();       $(this).hide();       $('#ButtonPrev').show();     });     $('#ButtonPrev').click(function() {       $('#Panel1').show();       $('#Panel2').hide();       $(this).hide();       $('#ButtonNext').show();   });   }); </script>

Use Response outside html writer

Response.Redirect or HttpContext.Current.Response.Redirect

Set file to be downloaded, and define destination name

HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + "tiago.pdf");

Response to open in a new Window

Response.Write("<script language='javascript'>window.open('" + url + "','_blank');</script>");

Find out current page URL

string url = HttpContext.Current.Request.Url.ToString();

Remote Desktop in W95/W98

http://msdn.microsoft.com/en-us/library/aa728832(VS.71).aspx

MSN Messenger messages not delivered in routed network

For months I've had this same issue: Windows Live Messenger fails to deliver some messages without ANY warning of failure. After lots of troubleshooting, I've decided to foward port 1863 to the WIFI router that is directly connected to the internet access modem router and what do you know, it worked! Turns out some of the messages we lost in the first router. Since there are two separate networks (the WAN and the DHCP internal private network), sometimes packets just didn't know where to go. Modem Router Network: 192.168.1.254 WiFi Router Nework: 192.168.1.1 (WAN) / 192.168.2.1 (LAN) TCP Port: 1863 Forward to 192.168.1.1

VPN connection shuts down internet access

Image
Connecting through a VPN tunneled connection stops you from opening web sites or using msn messenger? Fear not, you're troubled days are gone. Just disable default gateway / default router on the connection settings: Just make sure you won't need it to access any resources! Credits for these guys at velocity news forum http://www.velocityreviews.com/forums/t29443-cannot-access-internet-while-connected-thru-vpn.html