Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Add a counter?  (Read 4734 times)

0 Members and 1 Guest are viewing this topic.

porcupinepc

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
    • http://www.porcupinepc.com/forums
Add a counter?
« 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
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Add a counter?
« Reply #1 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'.
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
    • http://www.porcupinepc.com/forums
code
« Reply #2 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
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Add a counter?
« Reply #3 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;

Code: [Select]
<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;
Code: [Select]
<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.
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
    • http://www.porcupinepc.com/forums
Add a counter?
« Reply #4 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
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Add a counter?
« Reply #5 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:
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
    • http://www.porcupinepc.com/forums
Add a counter?
« Reply #6 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
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Add a counter?
« Reply #7 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}.
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
    • http://www.porcupinepc.com/forums
Add a counter?
« Reply #8 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
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Add a counter?
« Reply #9 on: January 09, 2004, 10:11:03 pm »

Glad to help  :wink:
Logged
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
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 18 queries.