Counter code in 2.0 after upgrade?
-
- Regular
- Posts: 138
- Joined: Fri Jun 09, 2006 8:59 pm
- Location: London, UK
- Contact:
Counter code in 2.0 after upgrade?
I just upgraded to the new version (2.0). Up to now I've put my counter code in index.tpl in the front end I use, which is Party Brown. This no longer seems to be possible. Must I use a different front end which contains index.tpl or is there somewhere else to put the code?
Anthony Campbell
Re: Counter code in 2.0 after upgrade?
What do you mean by "no longer seems to be possible"? [It should!]
What exactly are you trying to do?
Maybe you just need to know this? http://www.smarty.net/forums/viewtopic.php?t=4501
What exactly are you trying to do?
Maybe you just need to know this? http://www.smarty.net/forums/viewtopic.php?t=4501
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
-
- Regular
- Posts: 138
- Joined: Fri Jun 09, 2006 8:59 pm
- Location: London, UK
- Contact:
Re: Counter code in 2.0 after upgrade?
I need to insert the code supplied by my counter. This is a short script with some java. I used to put it in index.tpl for Party Brown.
Now, ../templates/party-brown has only 2 or 3 files and no index.tpl. The other frontends I've looked at. e.g default, do have lots of files including index.tpl.
Could the code go elsewhere, e.g. in serendipity/index.php?
Now, ../templates/party-brown has only 2 or 3 files and no index.tpl. The other frontends I've looked at. e.g default, do have lots of files including index.tpl.
Could the code go elsewhere, e.g. in serendipity/index.php?
Anthony Campbell
Re: Counter code in 2.0 after upgrade?
Javascript. Java is a different language.accampbell wrote:I need to insert the code supplied by my counter. This is a short script with some java.
From what I can tell, party-brown never had an index.tpl file. The theme is very old (last edited 2011, probably when we switched the repository to GitHub), a lot of these old theme do not have an index.tpl. According to the git repository's history, party-brown's files have not been changed since moving the files from SF to GitHub.accampbell wrote:I used to put it in index.tpl for Party Brown.
(Also, side note: whenever you make changes to files that are part of s9y, be it the core or Spartacus, please make sure you keep backups.)
You should be able to just copy /templates/default/index.tpl to /templates/party-brown/index.tpl and make your changes there (which will in fact be safe in case of an update because the original does not have an index.tpl). I assume this was what you did before, although that would not explain why the file would be gone.
YL
-
- Regular
- Posts: 138
- Joined: Fri Jun 09, 2006 8:59 pm
- Location: London, UK
- Contact:
Re: Counter code in 2.0 after upgrade?
Yes, I thought the fact that PB is old might be the problem, although I'm sure it did have index.tpl previously. Anyway, I'll experiment on the lines you suggest tomorrow and report back. Many thanks.
Anthony Campbell
Re: Counter code in 2.0 after upgrade?
Hi,
there are also some Plugins to put additional code to your blog:
serendipity_event_head_nugget
serendipity_event_page_nugget
serendipity_plugin_html_nugget
Maybe this works for you.
Regards
Mario
there are also some Plugins to put additional code to your blog:
serendipity_event_head_nugget
serendipity_event_page_nugget
serendipity_plugin_html_nugget
Maybe this works for you.
Regards
Mario
-
- Regular
- Posts: 138
- Joined: Fri Jun 09, 2006 8:59 pm
- Location: London, UK
- Contact:
Re: Counter code in 2.0 after upgrade?
Thanks to everyone for replies - much appreciated.
The nugget solution didn't work, presumably because this is not html code.
I also failed with PB, and in fact that front end no longer works at all -the colours and layout are all wrong. So now I'm using 2k11 and inserting the code in index.tpl, which seems to be working.
I have a different problem with the new backend, but I'll use a new thread for that.
The nugget solution didn't work, presumably because this is not html code.
I also failed with PB, and in fact that front end no longer works at all -the colours and layout are all wrong. So now I'm using 2k11 and inserting the code in index.tpl, which seems to be working.
I have a different problem with the new backend, but I'll use a new thread for that.
Anthony Campbell
Re: Counter code in 2.0 after upgrade?
The HTML nugget can hold Javascript code as well, but you might have to “mask” certain characters of the JS code because they are special characters in HTML. However, the same would be true in index.tpl …accampbell wrote:The nugget solution didn't work, presumably because this is not html code.
By the way, make sure that you keep a backup of your modified index.tpl – 2k11 is part of the core, so this file will be overwritten by every s9y update! (Which is why the HTML nugget would be a better solution.)
There is no reason why a theme should no longer work in 2.0 (unless we made some huge mistake that no one noticed so far, which, you know, is possible). Are you sure you were using party-brown before? Last time I checked your blog (yesterday), it was running one of the andreas themes …accampbell wrote:I also failed with PB, and in fact that front end no longer works at all -the colours and layout are all wrong.
YL
-
- Regular
- Posts: 138
- Joined: Fri Jun 09, 2006 8:59 pm
- Location: London, UK
- Contact:
Re: Counter code in 2.0 after upgrade?
I'll have another go at the nugget method later, when my wrist has healed. But for the moment I think I'd better quit while I'm ahead ...
Yes, I was using party-brown previously but I experimented with others after the upgrade.
Yes, I was using party-brown previously but I experimented with others after the upgrade.
Anthony Campbell