coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: porcupinepc on January 09, 2004, 07:40:39 PM

Title: Add a counter?
Post by: porcupinepc on January 09, 2004, 07:40:39 PM
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
Title: Add a counter?
Post by: Casper on January 09, 2004, 07:52:35 PM
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'.
Title: code
Post by: porcupinepc on January 09, 2004, 08:08:39 PM
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
Title: Add a counter?
Post by: Casper on January 09, 2004, 09:14:12 PM
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.
Title: Add a counter?
Post by: porcupinepc on January 09, 2004, 09:20:49 PM
http://www.porcupinepc.com/family/

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

Joe
Title: Add a counter?
Post by: Casper on January 09, 2004, 09:33:35 PM
OK tested on my site, and it's the <PRE> and </PRE> that causes the problem.

get rid of these, and it works.  :wink:
Title: Add a counter?
Post by: porcupinepc on January 09, 2004, 09:46:14 PM
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
Title: Add a counter?
Post by: Casper on January 09, 2004, 09:53:06 PM
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}.
Title: Add a counter?
Post by: porcupinepc on January 09, 2004, 10:01:11 PM
Super! I used Windows "Notepad" and its working perfectly. Thanks for your help.

Joe

www.porcupinepc.com
Title: Add a counter?
Post by: Casper on January 09, 2004, 10:11:03 PM
Glad to help  :wink: