Add a counter? Add a counter?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Add a counter?

Started by porcupinepc, January 09, 2004, 07:40:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

porcupinepc

Is there a way to add a counter to the main page? I would like to see the amount of hits to the site.

Joe

www.porcupinepc.com/forums  
Main site

Casper

you can add it to the theme/yourtheme/template.html.

the easiest way is to find {GALLERY}, then add <br> your counter code.

this places it at the bottom of the page, just after the 'powered by coppermine'.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

porcupinepc

I found the template.html file which i edited. Now, under the coppermine, you see the html code

See here: http://www.porcupinepc.com/family/

Joe

Casper

Hi,

I think this is because you have used the code for special characters, instead of the character itself (did you use a wysiwyg editor), so try changing this;

<PRE>&lt;!-- Start counter.bloke.com --&gt;
&lt;table border=4&gt;&lt;tr&gt;&lt;td&gt;
&lt;applet
CODEBASE="http://www7.counter.bloke.com/c/"
CODE="Counter.class" WIDTH=75 HEIGHT=20&gt;
&lt;param name=URL value="http://www.porcupinepc.com/family"&gt;
&lt;param name=reset value="0"&gt;
&lt;param name=img value="/c/default.gif"&gt;
&lt;/applet&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;font face=arial size=1&gt;Powered by &lt;a
TARGET="_top" href=http://counter.bloke.com/&gt;counter.bloke.com&lt;/a&gt;&lt;/font&gt;&lt;br&gt;
&lt;!-- End counter.bloke.com --&gt;
</PRE>


to this;
<PRE><!-- Start counter.bloke.com -->
<table border=4><tr><td>
<applet
CODEBASE="http://www7.counter.bloke.com/c/"
CODE="Counter.class" WIDTH=75 HEIGHT=20>
<param name=URL value="http://www.porcupinepc.com/family">
<param name=reset value="0">
<param name=img value="/c/default.gif">
</applet></td></tr></table>
<font face=arial size=1>Powered by <a
TARGET="_top" href=http://counter.bloke.com/>counter.bloke.com</a></font><br>
<!-- End counter.bloke.com -->
</PRE>


Hope this works.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

porcupinepc

http://www.porcupinepc.com/family/

The above is my site. I added what you mentioned and the html code still shows

Joe

Casper

OK tested on my site, and it's the <PRE> and </PRE> that causes the problem.

get rid of these, and it works.  :wink:
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

porcupinepc

i still get the raw html code showing on the coppermine page. Im using Microsoft FrontPage to edit the template.html file. Does this make a difference?

Joe

Casper

Yes it does, coppermine hates wysiwyg code for some reason.

I suggest you alter your template.html in notepad, or use something like firstpage2000 (what I use).

If you take the original code, and add the code I posted ealier (without the <PRE> and  </PRE>) it should work.  It did on my site, where I simply copied and pasted the above code.  Note, I did not include the table formating, just paste the above after the {GALLERY}.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

porcupinepc

Super! I used Windows "Notepad" and its working perfectly. Thanks for your help.

Joe

www.porcupinepc.com

Casper

It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here