mallchin.com

mallchin.com header graphic
Home arrow Misc. Code arrow Joomla! arrow Joomla! - JoomlaStats Visitors by Country module
Joomla! - JoomlaStats Visitors by Country module PDF Print E-mail
Wednesday, 10 January 2007

This page details how to fix a couple of minor bugs I noticed in the mod_jstats_visitors_by_country2.3.zip download for JoomlaStats found here.

Country Icons do not display:

There are a couple of errors in the path to the images. I suspect the JoomlaStats component has changed and the modules haven't been updated. You need to open modules/mod_jstats_visitors_by_country.php and edit lines 74 & 76 removing tld/ from the path.

They should look like so once modified:

  1. $content .= "<td align=\"left\"><img src=\"components/com_joomlastats/images/unknown.png\"></td>";
  2. else
  3. $content .= "<td align=\"left\"><img src=\"components/com_joomlastats/images/".$row[1].".png\"></td>";
 

 

'Top x' lines look a little untidy:

The 'Top x' lines could be a little neater. I edited line 18 of the same file to remove the additional space and apostrophe as it isn't need.

It should look like so:

  1. $append = $params->get('top') != '' ? "s Top ".$params->get('top') : "";
 

This requires an edit line 47 as the substr() now starts from position 1 not 2, like so:

  1. $content .= '<tr><td colspan="3"><span class="small">Total'.substr($append,1).'</span></td></tr>';
 

I also edited lines 33 and 40 to give Week and Month an upper-case W and M respectively.

If you prefer you can find an already modified version of the file here.

I know these are only minor changes, but I like things nice'n'tidy :)


Quote this article on your site

  Comments (2)
RSS comments
1. Written by azuan, on Tuesday, 08 April 2008 at 01:46
you are providing the mod_visitor_by_country.php in your http://www.mallchin.com/index.php?option=com_docman&task=doc_download&gid=7 link and not the mod_visitor_detail.php 
 
for the $content .= ""; 
 
changing 0 to 1 also doesn't give me the flag for visitor detail. hope you can help for it. 
 
thank you
2. Written by azuan, on Tuesday, 08 April 2008 at 01:54
ok i got it, i have to insert the path tld 
 
$content .= ""; 
 
and then it will appear. note that $row[0] remains.

Only registered users can write comments.
Please login or register.

 

  Tag it:blogmarksco.mmentsDeliciousdiggDiigo