How to change value of $ratingvotesav in showthread ?
Because your code is just wrong - you mentioned in the 1st post that you want to change something in showthread, yet none of the showthread hooks accepts/expects a parameter.. So $thread including $thread['numratings'] is always empty and the conditional fails with a PHP notice. This means you need to globalize $thread too and remove it from the parameter.

Also, not sure what you want to achieve, but editing a global variable to add HTML is never the best solution. You should rather edit the template with the find_replace_templatesets() function (+ possibly create a new template for the added HTML, eval() it into a variable and add that variable to the core template).

But from the looks of code from the 1st post, you don't even need a plugin and you can paste that HTML directly to the template, using the core variable which you're duplicating for some reason ($thread['averagerating'] and $thread['numratings'])..

Messages In This Thread
RE: How to change value of $ratingvotesav in showthread ? - by Destroy666 - 2015-06-07, 02:18 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)