vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Show Thread Enhancements - vB.org Rating System Replica (https://vborg.vbsupport.ru/showthread.php?t=155701)

Rich 10-06-2007 10:29 AM

thunder_sti: This uses the default rating system that vbulletin supplies. The difference is in how the results and voting process are displayed. To create an image rating system, which there are several image systems for free on the org, you would need something different.

You could take one of the free image galleries on this site that allows for rating of the images and do a rewrite to have it display the voting results consistent with that of "Hot or Not".

MissKalunji: In order to move it like you want to, I believe it would require additional plugins to change where it is displayed. I am only on for a few minutes, and will try to get to looking into placement issues tomorrow. There are no guarantees, but I will look.

djdonx: Yes, that is something that could be incorporated. It isn't something I intended on adding, but I did write the idea down for the upgraded version of this mod I may be writing. I have a few other ideas as well.

Stoebi: That could easily be done but would serve no actual functionality. The only person who would see that would be the person who voted in that thread. The search engines wouldn't see it for seo reasons because that would only display if the person had voted. If you really want to have it anyways, shoot me a PM and I will send you how to accomplish it. It will serve no purpose though since only the person who voted would see it.

I am going to be looking into the thread rating in new posts as well as the vote changing.

thunder_sti 10-08-2007 11:52 PM

Thanks for the reply.

Jose

The Realist 10-09-2007 09:23 AM

Installed and working great.

Get well soon Rich and keep up the good work.

hipgirl 10-10-2007 09:17 PM

Thank you very much for the great mod.

Is it possible to change 'rate this thread' to 'help others by rating'? I'm new to VB. In the script I see "$vbphrase[rate_this_thread]". Seems that I need to change the value of rate_this_thread. Could anybody let me know where I can change the value?

TIA.

Michelle
www.HipGirlClips.com/Forums

Rich 10-10-2007 09:37 PM

Hello,

In the acp:

Choose Languages and Phrases > Search In Phrases > (search for text) rate_this_thread and choose Phrase Variable Name Only at the bottom and click find. Now click edit and enter what you want it to say and hit save. You just changed the phrase. ;) You can do that for any phrase btw.;)

MissKalunji 10-10-2007 09:45 PM

Quote:

Originally Posted by Rich (Post 1354008)
thunder_sti: This uses the default rating system that vbulletin supplies. The difference is in how the results and voting process are displayed. To create an image rating system, which there are several image systems for free on the org, you would need something different.

You could take one of the free image galleries on this site that allows for rating of the images and do a rewrite to have it display the voting results consistent with that of "Hot or Not".

MissKalunji: In order to move it like you want to, I believe it would require additional plugins to change where it is displayed. I am only on for a few minutes, and will try to get to looking into placement issues tomorrow. There are no guarantees, but I will look.

djdonx: Yes, that is something that could be incorporated. It isn't something I intended on adding, but I did write the idea down for the upgraded version of this mod I may be writing. I have a few other ideas as well.

Stoebi: That could easily be done but would serve no actual functionality. The only person who would see that would be the person who voted in that thread. The search engines wouldn't see it for seo reasons because that would only display if the person had voted. If you really want to have it anyways, shoot me a PM and I will send you how to accomplish it. It will serve no purpose though since only the person who voted would see it.

I am going to be looking into the thread rating in new posts as well as the vote changing.

thanks!

hipgirl 10-10-2007 11:21 PM

Thank you so much!

Michelle
www.HipGirlClips.com

Sevilah 10-10-2007 11:40 PM

??????

http://img66.imageshack.us/img66/1787/xs1vf7.gif

Rich 10-11-2007 07:58 AM

Sevilah, In the future, if you have a question, please ask it. Simply adding a picture with a bunch of question marks will typically get you no where.

I am going to assume that you want the average text displayed beside the results. If that is the case, simply do this:


SHOWTHREAD Template:

Find:


Code:


<span id="threadrating_current"><if condition="$show['rating']">$vbphrase[rating]: <img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$thread[rating].gif" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" border="0" /></if></span>

Replace with:

Code:

<span id="threadrating_current" class="smallfont"><if condition="$show['rating']"><strong>$vbphrase[rating]:</strong> <img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$thread[rating].gif" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" border="0" />&nbsp;&nbsp;(<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>)</if></span>
In the above code, the smallfont class added to the opening span is optional.

Now you need to edit the phrase: thread_rating_x_votes_y_average in the acp and remove the "Thread Rating:" portion of it and save it.

obmob 10-11-2007 03:40 PM

Maybe that's how Sevilah rates the mod :p

hipgirl 10-11-2007 05:32 PM

Quote:

Originally Posted by Rich (Post 1357430)
I am going to assume that you want the average text displayed beside the results. If that is the case, simply do this:


SHOWTHREAD Template:

Find:


Code:


<span id="threadrating_current"><if condition="$show['rating']">$vbphrase[rating]: <img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$thread[rating].gif" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" border="0" /></if></span>

Replace with:

Code:

<span id="threadrating_current" class="smallfont"><if condition="$show['rating']"><strong>$vbphrase[rating]:</strong> <img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$thread[rating].gif" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" border="0" />&nbsp;&nbsp;(<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>)</if></span>
In the above code, the smallfont class added to the opening span is optional.

Now you need to edit the phrase: thread_rating_x_votes_y_average in the acp and remove the "Thread Rating:" portion of it and save it.

Great!!! Just applied.

I noticed that somebody said the rating is not shown in 'new post' search. Same here. Is it solved? I'll keep monitoring this thread.

Thanks again for your time. Get well soon.

Michelle

columbusgeek 10-24-2007 12:58 AM

Any updates on djdonx's request about only showing in certain threads? I need the pretty functionality you have created, but really do not want it on every thread.

***NM, went with tDigg instead. That fit my need better. Sorry Rich***

yoyoyoyo 10-28-2007 03:04 AM

here are the template edits in TMS (Template Modification System) XML format - if anyone has TMS installed all they need to do is import this.

mrmike 11-06-2007 02:01 PM

Thanks! :up:

I'm running 3.5.4 and manage to fix this with some tweak :S

Snatch 11-12-2007 05:46 PM

Since I installed this mod I get this DB-Error

Code:

Datenbankfehler in vBulletin 3.6.8:

Invalid SQL:

                SELECT *
                FROM threadrate
                WHERE userid = 1
                        AND threadid =;

MySQL-Fehler : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
Fehler-Nr.  : 1064
Datum        : Monday, November 12th 2007 @ 08:44:06 PM


jaks 11-15-2007 11:27 PM

Quote:

Originally Posted by rayphua (Post 1326385)
Hi Rich,

What are the changes done on this new version?

Is the following done?

. Thread rating does not show in search for New Posts.

2. When we set "Required Thread Rating Votes to Show Rating" in Admincp to 2 or more, a single vote still does not do anything. Click on Vote Now and the box still stays there, does not disappear or anything, like nothing is happening.

Hi Rich! I hope all is well with your health.

This will be a great addition to my site however the points made by rayhua I quoted above are still issues. I can live with the rating not showing in the search for now but #2 is a serious issue since it doesn't go past the first vote. When viewing the thread you see the vote box and not the actual rating. No one can can vote now. :(

Has anyone figured out this issue and if so what is the fix?

Thanks
Jon

NFLfbJunkie 11-17-2007 12:12 AM

How can I increase the spacing between the rating selections so there's not a lot ofsapce to the left of the "Excellent" selection and to the right of the "Vote Now" button?

masons 11-17-2007 05:47 AM

Great ad-on!//

3.6.8(2) worked fine and very easy to install!

ctfortner 12-06-2007 12:44 PM

This worked great for my site, 3.6.8 (2). very easy to add, thanks for the mod, LOVE it

tyranny 12-06-2007 12:57 PM

Installed and working perfect. Using it with GARS too and it is exactly what I am looking for.

I added the code below around your voting box so only those who can vote can see it.

Code:

<if condition="$show['threadrating']">
your code here
</if>

Now it is only showing to those who can vote. I also made it show no box after voting and put the average rating inside the post as you mentioned above. Fantastic.

Thanks!

ctfortner 12-06-2007 02:42 PM

I cant figure that part out about putting the average rating inside the post, how did you do that? I did apply the code to display the average rating, but dont see how to put it inside the post?

thanks

Sulaiti 12-06-2007 09:16 PM

Great hack ....

I believe you need only update this part

PHP Code:

 
<div align="left"><span class="ratetext">$vbphrase[rate_this_thread] -  <em>$thread[title]</em>.</span></div>
<
a name="goto_threadrating"></a>    
        <
label for="vote5"><input type="radio" name="vote" id="vote5" value="5"  />Excellent</label
        <
label for="vote4"><input type="radio" name="vote" id="vote4" value="4"  />Good</label
        <
label for="vote3"><input type="radio" name="vote" id="vote3" value="3"  />Average</label
        <
label for="vote2"><input type="radio" name="vote" id="vote2" value="2"  />Bad</label
        <
label for="vote1"><input type="radio" name="vote" id="vote1" value="1"  />Terrible</label>
                <
input type="hidden" name="s" value="$session[dbsessionhash]/>
                <
input type="hidden" name="t" value="$threadid/>
                <
input type="hidden" name="pp" value="$perpage/>
                <
input type="hidden" name="page" value="$pagenumber/>
                <
input type="submit" class="" value="Vote Now!" /></if></div>
        </
td>    
</
tr

to:

PHP Code:

 
<div align="$stylevar[left]"><span class="ratetext">$vbphrase[rate_this_thread] -  <em>$thread[title]</em>.</span></div>
<
a name="goto_threadrating"></a>    
        <
label for="vote5"><input type="radio" name="vote" id="vote5" value="5" $votechecked[5] />$vbphrase[excellent]</label
        <
label for="vote4"><input type="radio" name="vote" id="vote4" value="4" $votechecked[4] />$vbphrase[good]</label
        <
label for="vote3"><input type="radio" name="vote" id="vote3" value="3" $votechecked[3] />$vbphrase[average]</label
        <
label for="vote2"><input type="radio" name="vote" id="vote2" value="2" $votechecked[2] />$vbphrase[bad]</label
        <
label for="vote1"><input type="radio" name="vote" id="vote1" value="1" $votechecked[1] />$vbphrase[terrible]</label>
                <
input type="hidden" name="s" value="$session[dbsessionhash]/>
                <
input type="hidden" name="t" value="$threadid/>
                <
input type="hidden" name="pp" value="$perpage/>
                <
input type="hidden" name="page" value="$pagenumber/>
                <
input type="submit" class="button" value="$vbphrase[vote_now]/></if></div>
        </
td>    
</
tr

Regards,

tyranny 12-07-2007 03:06 PM

Quote:

Originally Posted by ctfortner (Post 1396215)
I cant figure that part out about putting the average rating inside the post, how did you do that? I did apply the code to display the average rating, but dont see how to put it inside the post?

thanks


I just did this:

https://vborg.vbsupport.ru/showpost....0&postcount=49

and copied his code inside the actual post.

:)

codehack 12-12-2007 11:03 PM

PHP Code:

Invalid SQL:

        
SELECT *
        
FROM threadrate
        WHERE userid 
1
            
AND threadid =;

MySQL Error  You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
Error Number 
1064
Date         
ThursdayDecember 13th 2007 03:01:01 AM
Script       
http://www.xxxx.com/forum/showthread.php?t=1
Referrer     
IP Address   
Username     
Classname    vB_Database 

help me!!:(

davekeats 12-13-2007 06:12 AM

Strange thing - I installed the mod perfectly, and it's appearing. The issue for me is, the rating mod is appearing even in forums for which I have NOT allowed thread ratings to appear.

What do think is up? Is there something I still need to add in the SHOWTHREAD template?

VADOS 12-16-2007 09:23 PM

Hello there!

I've installed your mod, thanx so much, it's great!

But I have a question: is it possible to move the rating table from it's original place (above the first post) to "below the first post"?

I have a template edit to make some table just below the first post (originally it's for adsense) and tried to move it there, but no good results reached. :(

Scamorz 12-24-2007 11:42 PM

Hi, i installed this excellent mod but i don't understand how i can insert the score inside the post and not at external. (like vb.org).

I installed this modify to obtain the number of votes and average: https://vborg.vbsupport.ru/showpost....0&postcount=49

Thanks! ;)

synn 01-03-2008 12:59 AM

Seems to work fine but I must have made a boo-boo :erm:

Under my thread tools drop down the javascript is not right:

Attachment 74091

Can someone help?

alfaowner 01-03-2008 12:04 PM

I have installed this on a 3.6.4 board, all though it shows up, it doesnt alow me to vote, when I hit the button, nothing happens :(

tei727 01-03-2008 08:26 PM

love it! how do i make it show how many people voted like the VB.org does? can this be shown on the new threads?

ran_iu_Conan 01-03-2008 11:00 PM

i like it.
thanks so much
love you ^^~

gldtn 01-29-2008 01:40 PM

Any plans on updating this to vB3.7?

baz_kingfish 02-06-2008 02:22 AM

Quote:

Originally Posted by yoyoyoyo (Post 1370163)
here are the template edits in TMS (Template Modification System) XML format - if anyone has TMS installed all they need to do is import this.

yoyo,
I ran the XML in TMS and created the templates, but nothing is showing up in my forum. All of the TMS modifications are "enabled", what am I missing? Lastly, is the XML based on Rich's hack or the one from Mangus?
Thanks,
KF

mangandini 02-07-2008 07:20 PM

The plugin have a bug if a thread id doesnt' exist, just modify the first line.
;-)

PHP Code:

if ($vbulletin->userinfo['userid'] && $threadinfo[threadid])
{
    if (
$rating $db->query_first("
        SELECT *
        FROM " 
TABLE_PREFIX "threadrate
        WHERE userid = " 
$vbulletin->userinfo['userid'] . "
            AND threadid = 
$threadinfo[threadid]
    "
))

 { 
   
$rated true
 }  



Quote:

Originally Posted by codehack (Post 1400164)
PHP Code:

Invalid SQL:

        
SELECT *
        
FROM threadrate
        WHERE userid 
1
            
AND threadid =;

MySQL Error  You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
Error Number 
1064
Date         
ThursdayDecember 13th 2007 03:01:01 AM
Script       
http://www.xxxx.com/forum/showthread.php?t=1
Referrer     
IP Address   
Username     
Classname    vB_Database 

help me!!:(


baz_kingfish 02-07-2008 07:33 PM

Mang,
What about my problem...can you help me with that?
Thanks,
KF

Quote:

Originally Posted by baz_kingfish (Post 1437161)
yoyo,
I ran the XML in TMS and created the templates, but nothing is showing up in my forum. All of the TMS modifications are "enabled", what am I missing? Lastly, is the XML based on Rich's hack or the one from Mangus?
Thanks,
KF


Rich 02-07-2008 08:46 PM

I don't use the TMS so i don't know how it operates, nor am I interested in installing it to see how it operates. (no offense to its creator. Its just not a mod I need right now.)

I am hoping to have a new version released within the next 2 weeks.

baz_kingfish 02-07-2008 08:56 PM

Thanks for responding. All the TMS does is apply the edits to the respective Template without having to go and manually search and find everything. It works beautifully. Any idea what the problem might be as to why the ratings box is not showing up? I don't even know where to start looking. Will your next release be a plugin or just a Template Mod...I can wait.

baz_kingfish 02-07-2008 09:12 PM

Quote:

Originally Posted by yoyoyoyo (Post 1370163)
here are the template edits in TMS (Template Modification System) XML format - if anyone has TMS installed all they need to do is import this.

These XML template edits DO NOT WORK or test successfully in 3.6.8...

Scamorz 02-10-2008 10:59 AM

Hi, a little problem:

when i delete a post in a thread rated and then write the post link it show me an error:

Code:

Database error in vBulletin 3.6.8:

Invalid SQL:

                SELECT *
                FROM vb_threadrate
                WHERE userid = 3
                        AND threadid =;

MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
Error Number : 1064
Date        : Sunday, February 10th 2008 @ 12:54:23 PM
Script      : http://www.mysite.com/forum/showthread.php?p=84858
Referrer    :
IP Address  : 87.4.173.165
Username    : user
Classname    : vb_database


My plugin code is:

Code:

if ($vbulletin->userinfo['userid'])
{
    if ($rating = $db->query_first("
        SELECT *
        FROM " . TABLE_PREFIX . "threadrate
        WHERE userid = " . $vbulletin->userinfo['userid'] . "
            AND threadid = $threadinfo[threadid]
    "))

 {
  $rated = true;
 } 
}

Please anyone can help me?

Thank you!

Scamorz 02-11-2008 05:36 PM

This is the exact code:
PHP Code:

if ($vbulletin->userinfo['userid'] && trim($threadinfo[threadid])!='')
{
    if (
$rating $db->query_first("
        SELECT *
        FROM " 
TABLE_PREFIX "threadrate
        WHERE userid = " 
$vbulletin->userinfo['userid'] . "
            AND threadid = 
$threadinfo[threadid]
    "
))

 { 
   
$rated true
 }  




All times are GMT. The time now is 01:31 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01669 seconds
  • Memory Usage 1,910KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (6)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete