Monday, December 20, 2010

ASP:Menu SkipLink

For those who landed here looking for a solution together with the cristal clear explanation, sorry, no, I do not have one :-(

Symptom.
We have migrated our internet facing site from SharePoint 2007 to 2010. We (needed to) have redone our custom master page. We did so having the 2010 minimal masterpage http://code.msdn.microsoft.com/odcSP14StarterMaster as the basis.
Then we found the Global Navigation menu, which uses the SharePoint:AspMenu control (I think it behaves pretty much the same as ASP:Menu), appears a little lower than it used to.
It does so to me everywhere. I have IE8 and FF3.5 on my PC. But later realized that it is OK on their old versions; IE7 and FF1.5.

The only difference is with the so-called "skip navigation link". It is visible (and thus takes some space) with the new master.





It was invisible with the old master.





The above screenshots are from FireBug. But up to now, I do not know what makes it "visible" or "ïnvisible".

My solution for the time being is to set DOCTYPE of the masterpage back to XHTML 1.0 Transitional. Do not ask me why...

The above mentioned minimal masterpage comes as XHTML 1.0 Strict. It is pity that I had to go back "Transitional". But this is the only workaround that I so far found.

Tuesday, December 14, 2010

Install Perl Modules

This is really my personal memo.
I have installed a perl module for the first time in my life and actually learned a lot, so just like to keep what I did here for future reference.

The command is as simple as this. There is a switch -MCPAN for the executable itself to add a module. I log the output. Again this is just for my reference.
# perl -MCPAN -e "install Time::Period" >install.perl.time.period.log 2>&1

Actually, this failed.
It was unable to find the package, Period-1.20.tar.gz, at (in our environment)
http://cpan.mirror.fr/.
I found the file at
http://search.cpan.org/CPAN/authors/id/P/PR/PRYAN/Period-1.20.tar.gz. So how can I change the host (that perl goes to get packages)? You do as follows.

# perl -MCPAN -e shell <- go into the shell mode

cpan shell -- CPAN exploration and modules installation (v1.61)
ReadLine support available (try 'install Bundle::CPAN')

cpan> o conf urllist <- show the currect host list

urllist
http://cpan.mirror.fr
http://cpan.mirror.fr/
Type 'o conf' to view configuration edit options

cpan> o conf urllist pop
cpan> o conf urllist pop <- do this twice to remove the unwanted hosts


cpan> o conf urllist push http://search.cpan.org/CPAN/
cpan> o conf urllist push http://cpan.mirror.fr <- not really care but just liked to keep what were there
cpan> o conf urllist push http://cpan.mirror.fr/

cpan> o conf urllist
urllist
http://search.cpan.org/CPAN/ <- now perl tries this site first
http://cpan.mirror.fr
http://cpan.mirror.fr/
Type 'o conf' to view configuration edit options

cpan> o conf commit
commit: wrote /usr/lib/perl5/5.8.0/CPAN/Config.pm

cpan> quit

Try the first command again, and GOTCHA!