miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Specific miniBB Support Forums / Specific /   

Replies, views amounts for registered only on the first page

Author Jaime
#1 | Posted: 5 Jan 2013 09:01 
In main_forums_cell.html i have the variables $numTopics and $numPosts. How do I get it out that this information can only be seen by registered users? With the stats on main_topic_cell.html i had no problems.

And all of you a happy new year!

Author tom322
#2 | Posted: 5 Jan 2013 16:50 
For registered users, use this condition in bb_plugins:

if($user_id>0) {$showTopics=$numTopics; $showPosts=$numPosts;}

and then paste {$showTopics} and {$showPosts} in main_forums_cell.html.

Author Jaime
#3 | Posted: 6 Jan 2013 09:27 | Edited by: Jaime 
Thank you for your note. So I had also experimented, but I got no issue with it.

In function parseTopic i have

.. html-code ..
.. html-code ..
.. html-code ...
else {
... html-code ...

Thats works fine in main_topics_cell. Reg users see there an other design and stats as an guest.

And just now I wanted to work on the main page, but unfortunately it was not going.

Maybe I can do this only with a new database access? Similarly as described here ... But I must confess that I have not been busy enough with db_simpleSelect. But perhaps I am just me and myself in the way and I think just too complicated? :)

Author tom322
#4 | Posted: 6 Jan 2013 17:52 
Yes, parseTopic function only works for topic pages, not for the main page. I think it can only be done by db_simpleSelect (but I don't know exactly how to do it..).

Author Paul
Lead Developer
#5 | Posted: 7 Jan 2013 18:48 
If you would check the template serving your primary page (it could be main_modern_lcell.html or main_last_discuss_cell.html), you would see different variables are keeping values for views and replies. Respectively, they are $numReplies and $topic_views. parseTopic function is enabled for the primary page. May be you could start from that.

Specific miniBB Support Forums / Specific / Replies, views amounts for registered only on the first page Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB