Adding an external counter to the sidebar.tpl of the hybrid-theme

Pinguin

Joined: 2005-09-27
Posts: 210
Posted: Mon, 2005-10-03 20:10

I would like to edit sidebar.tpl of the hybrid-theme to add a counter of nedstat/Webstats4U below the language-selection.I don't find the part, which is related to language or in other words, where to put the Webstats4U-code. My aim is to create a counter in the bottom of the sidebar.

Probably I have to create copies of the theme too, since I use a multisite-installation and the counter should only refer to 1 host.

Suggestions to put the Webstats4U-code to another place are welcome.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2005-10-04 04:54

I think you can do this by editing /themes/<yourtheme>/templates/sidebar.tpl (if using an out of the box theme, put sidebar.tpl into /themes/<yourtheme>/templates/local so it doesn't get overwritten on upgrade.

For multisite install, yeah probably a different theme for each site
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Pinguin

Joined: 2005-09-27
Posts: 210
Posted: Tue, 2005-10-04 11:15

nivekiam thanks for your answer, but the questions where and what do I have to edit. I am not a php-coder, so I have to do a lot with trial and error and it looks to me sidebar.tpl refers to another file.

 
Pinguin

Joined: 2005-09-27
Posts: 210
Posted: Tue, 2005-10-04 12:14

I found a solution for my needs and put the code at the end of themes/hybrid/templates/local/theme.tpl

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2005-10-04 16:35

sidebar.tpl does refer to another file to fill most of it's contents, but you can add to the top or bottom of it inside the div tags.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-10-19 18:16

You could also create your own module that defines a block to show the counter.. then you could add that block to any theme that supports blocks (sidebar, album, photo..)

 
Holofect

Joined: 2005-07-09
Posts: 2
Posted: Mon, 2005-10-24 10:15

Could you please tell me which file(s) the sidebar.tpl refers to for most of its contents?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2005-10-24 14:01

Those files are in /modules :) Any module can add it's "link" to item actions by registering itself with G2 to do that. Do you want to add content to the sidebar yourself? If so, you can just add plain old HTML to it if you want.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here