miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

Easy Post Rating System

 
 
Page  Page 2 of 2:  « Previous  1  2

Author Paul
Lead Developer 
#16 | Posted: 14 Jan 2013 12:34 
To look for topic's ID, you may use parseTopic() / parseMessage() functions and refer to $GLOBAL['topic'] variable from there - this would allow to create a non-destructive solution. Putting modifications related to the 3rd party code is not a proper solution - that would mean, when upgrading the forum, you will have to restore all of your changes again, or most likely, that would mean your forum can't be upgraded at all.

In general, this solution would be good let's say, for the topic rating - IF you put the AJAX code on the certain topic's page.
Putting such a lot of codes (20...30...40 or how big amount of topics is displayed) on one page means the script will create a respective amount of mySQL requests (in the case of flat-files mode it could be even more critical to read such amount of files on the most heavily loaded forum page).

As soon as your forum has almost zero visits and not overloaded with users, this solution seems nice - but I'm almost sure, if you would have even 20 users in a second, your server would lie down under very bad experience.

Author kuopassa
Partaker
#17 | Posted: 18 Jan 2013 10:11 
A small tip for the post rating system's microformats code that I posted earlier: if you don't want to show a rating that is something like 8,9999997 or something like that, you can round the number by changing in the original code this line:

$result = $result/$votes;

to this:

$result = round($result/$votes);

Author Bluesplayer
Partaker
#18 | Posted: 18 Jan 2013 11:01 
Where do you post the {$rating_rich_snippet} in the main_posts.html? Does it matter?

Author kuopassa
Partaker
#19 | Posted: 18 Jan 2013 11:08 
It shouldn't matter, me thinks, but I have placed it under the last Page  Page 2 of 2:  « Previous  1  2 tag that is at the end of topic page (example, in Finnish). Google should be able to pick up the data from there as you can see from my screenshot. :-)

Author Bluesplayer
Partaker
#20 | Posted: 18 Jan 2013 11:35 
Stuck it at the top under my ratings display. Works great.

Author kuopassa
Partaker
#21 | Posted: 18 Jan 2013 11:46 
Yep. Looks good on your site.

Author Bluesplayer
Partaker
#22 | Posted: 18 Jan 2013 11:49 
Hard at work on my new site now. See if I can implement it there too.

By the way I took a look at that sitemap code I created some time ago and it does work fine. Uses the old urls but these 301 redirect to the new search friendly urls and I don't think there is a problem with that. In fact I asked on the Google forum and it was ok. Hell of a lot less work by using the old urls.

Author kuopassa
Partaker
#23 | Posted: 19 Jan 2013 08:04 
Yep, your sitemap code could be quite helpful on one of my old forums which is using messy URL's.

Author Jaime
Partaker
#24 | Posted: 21 Jan 2013 12:06 
Bluesplayer:
Where do you post the {$rating_rich_snippet} in the main_posts.html? Does it matter?
Hm .. there i have an problem .. {$rating_rich_snippet} is empty .. The Ratingscript work fine. The right place for the code {$rating_rich_snippet} in bb_plugins is parseTopic() ?! and then {$rating_rich_snippet} at the end from my main_posts.html. Or what do I need for the database access in your code?

Author Bluesplayer
Partaker
#25 | Posted: 21 Jan 2013 13:57 
Jaime
Jaime:
Hm .. there i have an problem .. {$rating_rich_snippet} is empty .. The Ratingscript work fine. The right place for the code {$rating_rich_snippet} in bb_plugins is parseTopic() ?! and then {$rating_rich_snippet} at the end from my main_posts.html. Or what do I need for the database access in your code?
I placed the code in bb_plugins above the Smiles addon I am using. It doesn't go inside other code at all or need additional database entries to work. Treat it as another addon.

Where you place the $rating_rich_snippet is up to you as it should work wherever you place it in the main_posts.html. It can be easily missed as it just produces one line of data.

Author Jaime
Partaker
#26 | Posted: 28 Jan 2013 10:28 
Bluesplayer
Thank you for your note. Everything runs fine, I had only one self-induced errors in my code ;-)

Page  Page 2 of 2:  « Previous  1  2 
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Easy Post Rating System
 Share Topic's Link

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


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑