Force scrollbar on short pages

When you have a design that does not fill the full screen you sometimes get the problem where the page seems to shift when you navigate between long and short pages.

This is because of the scroll bar on the right that appears or disappear depending on the length of your scrollbar.

All you have to do is edit your .css file and add the below:

/*Force scroll bar for short pages*/
HTML {
overflow-y:scroll;
overflow-x:auto;
}

Share

Calendar pop-up link position / not showing in Joomla

I Had an issue in IE7, IE8, IE9, IE10 when I click on the calendar icon the calendar does not appear. I then scrolled to the top of the page and there it was.

So the issue in Joomla to view the pop-up calendar when you click on the icon is to edit  media/system/js/calendar.js file

Replace:

if(Calendar.is_ie){br.y+=document.body.scrollTop;br.x+=document.body.scrollLeft;}else{br.y+=window.scrollY;br.x+=window.scrollX;}

with:

if(Calendar.is_ie){br.y+=document.body.document.documentElement.scrollTop;br.x+=document.body.document.documentElement.scrollLeft;}

Now my calendar icon links work in IE7, IE8, IE9 and IE10

Share

Nice Social Bookmark – no img width and height attributes

Website producers often include images on their pages badly, creating accessibility issues for visitors and increasing page load times.

It is important to include the width and height attributes in each image tag.  The mark-up is valid without a height and width attribute, but it is best practice to include them.

You can include them by adding the width and height attributes to the images in the following file: modules\mod_nice_social_bookmark\mod_nice_social_bookmark.php

Back up first!

The code for the whole file is below:

<?php

// no direct access

//defined( '_VALID_MOS' ) or die( 'Restricted access' );

$url = "http://".$_SERVER['HTTP_HOST'] . getenv('REQUEST_URI'); 

$rss_url = "http://".$_SERVER['HTTP_HOST'];

$isize = $params->get('isize');

$iset = $params->get('iset');

$iposition = $params->get('iposition');

$document = JFactory::getDocument();

$opac = $params->get('opac');

if ($opac=="yes"){

 $document->addStyleSheet('modules/mod_nice_social_bookmark/css/nsb-opac.css');

 }

 elseif ($opac=="invert"){$document->addStyleSheet('modules/mod_nice_social_bookmark/css/nsb-opac-inv.css');

 }

 else{$document->addStyleSheet('modules/mod_nice_social_bookmark/css/nsb.css');

 }

$twlink = $params->get('twlink');

$fblink = $params->get('fblink');

$mslink = $params->get('mslink');

$rsslink = $params->get('rsslink');

echo '<div align="'.$iposition.'">';
$tt = $params->get('s1', 'yes');
if ($tt == "yes"){ if ($fblink == "")
echo '<a id="l1" target="_blank" rel="nofollow" href="http://www.facebook.com/sharer.php?u='.$url.'&title="><img title="Facebook" border="0" src="modules/mod_nice_social_bookmark/icons/facebook_'.$iset.'_'.$isize.'.png" alt="Facebook" width="32px" height="32px"  /></a>&nbsp;';
else echo '<a id="l1" target="_blank" rel="nofollow" href="http://'.$fblink.'"><img title="Facebook" border="0" src="modules/mod_nice_social_bookmark/icons/facebook_'.$iset.'_'.$isize.'.png" alt="Facebook" width="32px" height="32px"/></a>&nbsp;';}
$tt = $params->get('s2', 'yes');
if ($tt == "yes"){ if ($mslink == "")
echo '<a id="l2" target="_blank" rel="nofollow" href="http://www.myspace.com/Modules/PostTo/Pages/?l=3&amp;u='.$url.'&amp;title="><img title="MySpace" border="0" src="modules/mod_nice_social_bookmark/icons/myspace_'.$iset.'_'.$isize.'.png" alt="MySpace"  width="32px" height="32px" /></a>&nbsp;';
else echo '<a id="l2" target="_blank" rel="nofollow" href="http://'.$mslink.'"><img title="MySpace" border="0" src="modules/mod_nice_social_bookmark/icons/myspace_'.$iset.'_'.$isize.'.png" alt="MySpace" width="32px" height="32px" /></a>&nbsp;';}
$tt = $params->get('s3', 'yes');
if ($tt == "yes"){ if ($twlink == "")
echo '<a id="l3" target="_blank" rel="nofollow" href="http://twitter.com/home?status='.$url.'&amp;title="><img title="Twitter" border="0" src="modules/mod_nice_social_bookmark/icons/twitter_'.$iset.'_'.$isize.'.png" alt="Twitter" width="32px" height="32px" /></a>&nbsp;';
else echo '<a id="l3" target="_blank" rel="nofollow" href="http://'.$twlink.'"><img title="Twitter" border="0" src="modules/mod_nice_social_bookmark/icons/twitter_'.$iset.'_'.$isize.'.png" alt="Twitter" width="32px" height="32px"  /></a>&nbsp;';}
$tt = $params->get('s4', 'yes');
if ($tt == "yes")echo '<a id="l4" target="_blank" rel="nofollow" href="http://digg.com/submit?phase=2&amp;url='.$url.'&amp;title="><img title="Digg" border="0" src="modules/mod_nice_social_bookmark/icons/digg_'.$iset.'_'.$isize.'.png" alt="Digg" width="32px" height="32px" /></a>&nbsp;';
$tt = $params->get('s5', 'yes');
if ($tt == "yes")echo '<a id="l5" target="_blank" rel="nofollow" href="http://del.icio.us/post?url='.$url.'&amp;title="><img title="Delicious" border="0" src="modules/mod_nice_social_bookmark/icons/delicious_'.$iset.'_'.$isize.'.png" alt="Delicious" width="32px" height="32px" /></a>&nbsp;';
$tt = $params->get('s6', 'yes');
if ($tt == "yes")echo '<a id="l6" target="_blank" rel="nofollow" href="http://www.stumbleupon.com/submit?url='.$url.'&amp;title="><img title="Stumbleupon" border="0" src="modules/mod_nice_social_bookmark/icons/stumbleupon_'.$iset.'_'.$isize.'.png" alt="Stumbleupon" width="32px" height="32px" /></a>&nbsp;';
$tt = $params->get('s7', 'yes');
if ($tt == "yes")echo '<a id="l7" target="_blank" rel="nofollow" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk='.$url.'&amp;title="><img title="Google Bookmarks" border="0" src="modules/mod_nice_social_bookmark/icons/google_'.$iset.'_'.$isize.'.png" alt="Google Bookmarks" width="32px" height="32px" /></a>&nbsp;';
$tt = $params->get('s8', 'yes');
if ($tt == "yes"){if ($rsslink == "")
echo '<a id="l8" target="_blank" rel="nofollow" href="'.$rss_url.'/index.php?format=feed&amp;type=rss&amp;title="><img title="RSS Feed" border="0" src="modules/mod_nice_social_bookmark/icons/rss_'.$iset.'_'.$isize.'.png" alt="RSS Feed" width="32px" height="32px" /></a>&nbsp;';
else echo '<a id="l8" target="_blank" rel="nofollow" href="'.$rsslink.'"><img title="RSS Feed" border="0" src="modules/mod_nice_social_bookmark/icons/rss_'.$iset.'_'.$isize.'.png" alt="RSS Feed" width="32px" height="32px" /></a>&nbsp;';}
echo '</div><div style="clear:both;"></div>';
?>

Hope this help.

Share