Monthly Archives: October 2009

Sharepoint Menu and Navigation

The issue that I had was managing the menu’s at the top level of a Sharepoint site (site collection) and one of the sites within that collection.

The top level home page menu contained sites and then within the drop down option the subsites of those sites.

The issue was to hide a particular item from that drop down menu.

Editing the navigation options is the correct location. There are two ways to get to this

Sharepoint Site Settings Menu

which leads to the Site Settings page where you select Navigation from the Look and Feel column

Sharepoint Navigation tool

Alternatively just use the shortcut from the Site Actions ->Site Settings menu ->Modify Navigation

Sharepoint Site Settings

Once on this page there is a list of the navigation for the current site collection and you can hide or move items around.

The trick is with the option for Global Navigation

Selecting global navigation option

There are two options:

Display the same navigation items as the parent site
or
Display the navigation items below the current site.

The first option leaves the modification control only within the scope of the local site, while the second option adds the Global Navigation to the list for modification and allows for hiding or moving the global menu for this site.

I think, given my current limited Sharepoint knowledge, that this is due to the relationships within a site collection. The sites I am working with are within a single site collection. The top level menu takes up all the sites within it as the first menu level and sub-sites as the second level menu.  The options above are to either accept that the Global (site collection) Menu will display all the site/subsites or to have control passed to the site level and have the Global Navigation modified at site control level.

A home network SME Server and Synology NAS

My home network has consisted of a range of servers over the years. SME Server is one that I have consistently used for at least 7 years that I can recall and possible longer.

Currently I have an SME Server v7.3 server installed connected to the internet via a small dlink router gateway. Aside from the Windows workstations, notebooks, and iPhones that use the dlink wifi connection, I have a NAS device from Synology that I am very pleased with. DS207 model with 2 x 1T drives.

I am currently experimenting with controlling the underlying BusyBox Linux embedded system. I installed Samba SWAT but have yet to get the permissions working correctly and in the process manged to overwrite the samba config file so all my shares have been lost.

I’ve got more work to do on this one!

Adding disk space Debian Linux on VMWare

This is for an installation of Debian Linux (Lenny) that is run as a VMWare virtual machine on ESX server. The Debian install is also using LVM Logical Volume Manager. Refs: Overview at WikiPedia and the detailed How-To at tldp.org.

We had to increase the physical drive space on the debian system and while I verified some of what I planned to do with other sites I found a number of steps missing if I wanted to be ‘sure’ of being able to repeat the exercise.

Once the VMWare virtual disk had been allocated/increased I could start with the work inside Debian so it could use the space.

The first step was to install parted to manage the partitions as it makes it easy.

[php]# apt-get install parted[/php]

Next, because I want to run in single user mode I cannot use my favourite tool, PuTTy to connect as the SSH daemon will not be loaded. So I use VMWare client vSphere to connect and open a console.

[php]# telinit 1 [/php]

will restart in single user mode – you will need the root password for the server.

Start parted
[php]#parted[/php]

and use the command print free to list your drive(s) / partitions.
[php](parted)print free[/php]

which should display a screen similar to my completed example below. Once you can see the details of the free space you can use the resize command to increase the size of the extended volume. In this example my original part #2 was 21.2GB in size and this process increased it to the 107GB that was now allocated. The following steps will need to be adjusted for the specific system details.

[php](parted)resize
(parted)Partition number?2
(parted)Start? [255MB]?255MB
(parted)End? [21.2G]?107GB
(parted)print free[/php]

For my change the result of line #2 in this is correct as the partition is now approx 107GB in size rather than 21.2GB. In the next step I setup so that the logical volume #6 will be added.

Parted console after completing the addition of sda6 space

Once the extended partition is configured the server will need to be restarted.

[php]#shutdown -r now[/php]

Still using the VMWare console, as the startup screen appears the option to select single user mode will come up. If you miss it and start up in multi-user mode just use the telinit 1 command that we used earlier to return as single user mode.

Use cfdisk to view the disk setup.

[php]#cfdisk[/php]

This screen shows the completed sda6 logical drive.

Screenshot of cfdisk with updated partitions.

To allocate the free space arrow down to the free space and press the letter T for type. Select the type of drive that is required. In this example I selected 8E from the second page of types to use with Linux LVM.

Select Write from the command menu and yes to write the allocation table information for the new volume. In this case it is allocated as sda6.

Quit out of cfdisk.

At this stage if you are not using LVM on the server you will need to format the drive and add it into fstab, etc., however this server is using LVM and these are the next steps.

There are three levels Physical Volume, Volume Group, and Logical Volume. Using the lvm shell (good with help screens) or commands direct at the prompt (if you know what you are doing).

[php]#pvcreate /dev/sda6
#vgcreate new_volume_group_label /dev/sda6
#pvdisplay[/php]

Adds the Physical Volume (pv) into LVM while the vgcreate adds a new Volume Group (rather than extending the existing VG) and pvdisplay just presents the confirmation that its all worked.

[php]#lvcreate -L -n
#lvscan[/php]

Once created the logical volumes then need to be formatted or have their file system created.

[php]mke2fs /dev/lvname[/php]

Which creates the file system and then to add the journal setup

[php]tune2fs -j /dev/lvname[/php]

After this add the new drive into /etc/fstab with the relevant entries and directory(s) added.

One last reboot (or two if its wrong!) to check that it will all start up in single user mode and then a full restart and test in multi-user.

SugarCRM Timezones for Australia Daylight Saving

The default timezones in SugarCRM are driven by the file /include/timezone/timezones.php

With changes to the Australian Daylight Saving settings this year, the timezones.php file is incorrect.

As a side note, Trivia: When was DST first used in Australia and in which states did it apply? A: below….

All states that observe DST are now consistent in the application of dates etc. So excluding Darwin, Perth, Brisbane the other capitals can all be set for starting on the first Sunday in October and ending on the first Sunday in April each year… until they change it again!

The format for each of the cities is currently set as follows (SugarCRM 5.2.0g):
[php] 
‘Australia/Adelaide’ =>
array (
‘gmtOffset’ => 570,
‘dstOffset’ => 60,
‘dstMonth’ => 10,
‘dstStartday’ => -1,
‘dstWeekday’ => 0,
‘stdMonth’ => 3,
‘stdStartday’ => -1,
‘stdWeekday’ => 0,
‘dstStartTimeSec’ => 7200,
‘stdStartTimeSec’ => 7200,
),
[/php]
For Perth it needs to be changed to remove all DST settings leaving just the
[php]
‘gmtOffset’ => 480,
[/php]
All the other capital cities need to have the start date to the first Sunday in October and ending dates changed to April which is done by changing three values.

[php]
‘Australia/Adelaide’ =>
array (
‘gmtOffset’ => 570,
‘dstOffset’ => 60,
‘dstMonth’ => 10,
‘dstStartday’ => -1, 0,
‘stdMonth’ => 3, -1, 0,
‘dstStartTimeSec’ => 7200,
‘stdStartTimeSec’ => 7200,
),
[/php]
The use of -1 in the day field indicates the last in the month rather than 1st in the month.

This should apply to Sydney, Melbourne, Hobart, Currie*, Adelaide, Broken Hill.

A final note that applying these changes to a copy of the timezones.php and placing that under /custom/include/timezone/timezones.php does not work and you need to replace the original file in /include/timezone/timezones.php

*Where is Currie? King Island. Off the coast of Tasmania and at one stage they did not observe DST while Hobart did so they had their own setting. Redundant now.

Answer to the trivia Q: Summer 1916-1917 and it was Australia wide. It then was dropped until trialling again in 1942 – 1945 and at various other times over the next 30 years until broadly accepted around 1970 across eastern states.