miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | 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
Registered
#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
Registered
#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
Registered
#19 | Posted: 18 Jan 2013 11:08 
It shouldn't matter, me thinks, but I have placed it under the last {$pageNav} 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
Registered
#20 | Posted: 18 Jan 2013 11:35 
Stuck it at the top under my ratings display. Works great.

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

Author Bluesplayer
Registered
#22 | Posted: 18 Jan 2013 11:49 | Edited by: Bluesplayer 
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
Registered
#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
Registered
#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
Registered
#25 | Posted: 21 Jan 2013 13:57 | Edited by: Bluesplayer 
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
Registered
#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 Top

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

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


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
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB