Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Visit Counter 4 YaBB 2.5 [ajax] (Read 1567 times)
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Visit Counter 4 YaBB 2.5 [ajax]
Oct 18th, 2010 at 3:04pm
Print Post  
This mod will add a dynamic visit counter to the Forum Statistics area using ajax to update in real time. Users will only be counted one time per session.

The counter starts with 6 digits but will automatically add a leading zero when the number of visits reaches 100000 and so forth - meaning there will allways be at least one leading zero


  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
TRoN
Junior Member
**
Offline


...against the MCP!

Posts: 58
Location: Bad Iburg
Joined: Aug 8th, 2003
Gender: Male
Re: Visit Counter 4 YaBB 2.5 [ajax]
Reply #1 - Nov 20th, 2010 at 4:31pm
Print Post  
Nice mod. Installs flawless.

I use it with other (.gif) digits which are being resized by changing
Code
Select All
		$showcounter .= qq~<img src="$modimgurl/counter/$setdigits[$i].png" id="digit$i" border="0" style="vertical-align: middle;" />~; 


into

Code
Select All
		$showcounter .= qq~<img src="$modimgurl/counter/$setdigits[$i].GIF" id="digit$i" border="0" width="18" height="24" style="vertical-align: middle;" />~; 



The changed filetype also needs to modify

Code
Select All
					if(tmpdigs[i] != tmpolddigs[i] || tmpdigs.length > tmpolddigs.length) document.getElementById('digit' + i).src = "$modimgurl/counter/" + tmpdigs[i] + ".png"; 



into

Code
Select All
					if(tmpdigs[i] != tmpolddigs[i] || tmpdigs.length > tmpolddigs.length) document.getElementById('digit' + i).src = "$modimgurl/counter/" + tmpdigs[i] + ".GIF"; 



Also removed the border by changing

Code
Select All
		<div style="float: left; border: 2px inset #FEFEFE;">{yabb counter}</div> 


into

Code
Select All
		<div style="float: left; border: 0px inset #FEFEFE;">{yabb counter}</div> 



Maybe that helps someone who wants to copy the result but is not familiar with web coding^^

Thanks  Wink
  

.-== Sapere Aude! ==-.
|_TRoN_| @ digital-joker.de/forum
Back to top
WWWICQ  
IP Logged
 
Derek Bullock
Full Member
***
Offline


I love Camp Oven Cooking

Posts: 184
Location: Brisbane
Joined: Nov 9th, 2007
Gender: Male
Re: Visit Counter 4 YaBB 2.5 [ajax]
Reply #2 - Sep 13th, 2011 at 3:29am
Print Post  
HI

Can someone give me a screen shot on this Mod please.  Have uploaded and it does not appear.

Thanks


Derek

My error, all good now.

Thanks
  

Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint