SimplePortal
Customization => Themes and Graphics => Topic started by: Inti31 on August 08, 2011, 05:41:23 AM
-
Simpleportal works perfect for me.
Now I implemented my first page - everything is fine.
http://epica-forum.de/index.php?page=pg_gaestebuch
Now my question.
At the top you see the headline "Gästebuch" (=guestbook)
is it now possible to add a "counter" (=read x times) next to that to show how many times this page has been visited / viewed like a normal smf topic ?
Example: "guestbook (read x times)"
cheers inti31
-
SimplePortal does not offer a way to do this. It would need a count field added to the database, plus a function call to update that whenever it is viewed. This would be a custom coding project.
I'm going to move this to custom coding, where I hope it will capture the attention of our friendly customizers here at SimplePortal.net
-
./Themes/default/PortalPages.template.php
There are two instances of the code, you need to replace them both to see on two main themes -- Core and Curve:
', $context['SPortal']['page']['title'], '
', $context['SPortal']['page']['title'], ' (', $txt['read'], ' ', $context['SPortal']['page']['views'], ' ', $txt['times'], ')
-
grafitus ! Wow - it works! Thank you very much!
only one thing - which file do I have to modify to get the shown text in my favorite language?
It is shown in English instead of German - i use german-utf8.
thanks again
cheers inti31
-
Sorry, I have edited the above; now, with language strings. :cool:
-
grafitus - it works as it should - very nice - thx again!
// biggrin - ;D
SimplePortal does not offer a way to do this. It would need a count field added to the database, plus a function call to update that whenever it is viewed.
// biggrin - ;D
@AngelinaBelle, AngelinaBelle, AngelinaBelle,... ;)- to be honest - I expected more than just add a small string to the PortalPages.template.php when I first read your answer... - this is all the more surprising that this could be done like grafitus has posted it :) - topic solved
cheers Inti31
-
Yep. That's because I missed the fact that it was already being counted.
I was wrong about that one -- the hard work was already done!
I'm glad it was so easy for you.