PDA

View Full Version : [Release v2] In-Thread Rating


tubedogg
10 Sep 2001, 09:03
Withdrawn cause it's in the next version.

usbnuts
10 Sep 2001, 17:36
Hi, the hack doesn't seem to work.

I'm confused when I have to make changes to misc.php
You said I have to add $threadratingoption right above $attachmentoption.

So, I looked around and added $threadratingoption inside the newreply template.

</tr>
$threadratingoption
$attachmentoption
</table>

Which misc.php are you talking about here?
/forums/misc.php or /forums/admin/misc.php

Also, where can I find newreply_threadrate template? You didn't provide instructions on how to create this template.

Thanks for helping!

BradC
10 Sep 2001, 17:39
probably just

/forums/misc.php

cause the admin one should have different functions used mainly or only in the admin folder.

VirtueTech
10 Sep 2001, 23:10
This is a great idea!

I feel that not enough people use the current thread rating system because it doesn't stand out enough.

tubedogg
11 Sep 2001, 04:29
Originally posted by usbnuts
I'm confused when I have to make changes to misc.php
You said I have to add $threadratingoption right above $attachmentoption.There was a little mess up in the install file...it's now fixed. Sorry for the confusion. That should actually go in the newreply template - one place it said misc.php, the other place it said newreply template.

Which misc.php are you talking about here?
/forums/misc.php or /forums/admin/misc.phproot/misc.php, which would be the misc.php in your main vB folder.

Also, where can I find newreply_threadrate template? You didn't provide instructions on how to create this template.This should be automatically created when you install. If you go to Templates > Modify and look under Custom Templates you should see one named newreply_threadreate.

snyx
11 Sep 2001, 06:00
I don't quite get the full idea of this hack, you wouldnt happen to have a demo, or be able to snap a screenshot for me could ya tubedogg?

tubedogg
11 Sep 2001, 06:25
Screen added to the first post.

snyx
11 Sep 2001, 06:43
spanks tubebogg, I shall install it now :D

VirtueTech
11 Sep 2001, 06:50
There still seems to be install problems with this.

The new template you add is called: newreply_ratethread

But your code calls to: newreply_threadrating

It also added the template into templatesetID of 10. My default templatesetID is 1...I'm not sure if mine is different than anyone elses.

I changed the code around to adjust for the template name but it still does not give the option to rate the thread in the reply yet.

Also...Misc.php is no longer included in the instructions. I;m not sure if it is supposed to be but I saw in the posts above talk about it.

Any ideas?

tubedogg
11 Sep 2001, 06:56
Lessee here...

1. You are correct. It should call newreply_ratethread since the template is named that.

2. The templatesetid was messed up cause I never changed it back after testing. Run this query:
UPDATE template SET templatesetid=1 WHERE title='newreply_ratethread'

3. misc.php shouldn't be part of anything. I realized that after I took it out of the file.

I've uploaded an updated install file. Sorry about the problems.

VirtueTech
11 Sep 2001, 06:59
A heads up: I'm using version 2.0.1 and in your instructions the second modification to newreply.php the code:

$foruminfo=getforuminfo($threadinfo[forumid]);

Appears three times. IT has to be the last entry. I made a mistake and put it after the second time that code appeared.

VirtueTech
11 Sep 2001, 07:05
Its no problem..this hack is awesome. Finally it will make more use of the rating feature.

Another Problem - I have the option to allow users to rate the thread. It doesn't CHECK the radio input field for what the user rating last.

tubedogg
11 Sep 2001, 07:05
Accounted for and updated, thanks.

tubedogg
11 Sep 2001, 07:14
Originally posted by VirtueTech
Another Problem - I have the option to allow users to rate the thread. It doesn't CHECK the radio input field for what the user rating last.It should only CHECK something other than "no rating" if the user has previously rated the thread and they are allowed to change their rating.

VirtueTech
11 Sep 2001, 07:14
Right...its not

tubedogg
11 Sep 2001, 07:16
And you have this in newreply.php?
switch ($rating[vote]) {
case 1:
$onec = "CHECKED";
break;
case 2:
$twoc = "CHECKED";
break;
case 3:
$threec = "CHECKED";
break;
case 4:
$fourc = "CHECKED";
break;
case 5:
$fivec = "CHECKED";
break;
default:
$noc = "CHECKED";
}

VirtueTech
11 Sep 2001, 07:19
nevermind fixed...check post below:

VirtueTech
11 Sep 2001, 07:25
ok scratch it...it works...something didn't work on it ..but I'm not sure why it does now...I didn't change a thing

New problem - After I make a vote through a reply...lets say I go back and reply again...the vote I had last is checked. If I change my vote....and go back and reply again...the vote number I changed to is not CHECKED

tubedogg
11 Sep 2001, 07:40
I can't replicate that...I followed these steps:
1. Replied and rated a thread
2. Replied again and changed the rating
3. Replied again and my new rating (from step 2) *is* checked.

Not sure what would be causing that.

squawell
11 Sep 2001, 08:44
my question is what code should i add to misc.php??

somebody tell me pls~~~~

floleb7
11 Sep 2001, 08:49
there is nothing with misc.php in this hack

squawell
11 Sep 2001, 09:26
OH~~~~~

but it still did not work??

Generics
11 Sep 2001, 09:50
kewl hack thx for ya hard work

usbnuts
13 Sep 2001, 00:58
I already installed the first non-working version will this 2nd version install on top of first one?

shadowbreed
16 Sep 2001, 19:44
great hack works perfectly:D

SirSteve
19 Sep 2001, 16:08
Works great on first install!

Justice
07 Oct 2001, 05:26
Originally posted by SirSteve
Works great on first install!

same here, thanks tube

Heineken77
08 Oct 2001, 18:13
NICE Hack Tubedogg!! :)

I have a question, when ever I log into see a thread, the views jump up 2 each time. How can I change this?

Thanks!

Heineken77

magistr
09 Oct 2001, 13:11
thanx man

SteveK
09 Oct 2001, 21:28
From the install script, the new template is named "newreply_ratethread". Yet in newreply.php you call it "newreply_threadrating". Shouldn't you be calling the new template "newreply_ratethread"??

Now:
eval("\$threadratingoption = \"".gettemplate("newreply_threadrating")."\";");

Should be:
eval("\$threadratingoption = \"".gettemplate("newreply_ratethread")."\";");

Heineken77
09 Oct 2001, 23:23
Hey Steve,

Were you talkign to me in order to fix my views from jumping up 2 times each time? :(

Also, the inthread rating works perfect for me:)

Thanks!

c0bra
10 Oct 2001, 02:28
Thanks a lot, its an excellent hack! It installed perfectly on our board first time.

gmtalk
12 Oct 2001, 23:30
i have installed this hack per the instructions. i love your hacks, but i can not get this one to work on my forum.

Following the instructions i went to look to see the template created and it is not in there.

i have 9 different template sets for the sites that cobrand on my site and non have the newreply_ratethread in them.

i made all other changes as necessary. any thoughts as to what could be the issue?

Tariq
13 Oct 2001, 18:47
I have installed this hack, and it works fine in most forums, but in some forums it doesn't even show up. I have the "alllow thread ratings in forum" option at "yes," so what is the problem?

Thanks,
Tariq

gmtalk
15 Oct 2001, 17:13
got it to work. i found that I had to manually set this up. created the template and inserted the code into newreply template in another area right under the vB code area.

Tariq: In the threads that this is not showing up have you already posted in them? I have noticed that when i have posted in a thread already that i can not rate it.

GMTalk

DarkManX_19
21 Oct 2001, 22:59
can u post the code that is spose to go into that template newreply_threadrate for some reason the installer did not create it........thanks

DarkManX_19
22 Oct 2001, 23:48
anyone?

DarkManX_19
23 Oct 2001, 23:24
bump'n again......still lookin for this missing code........thanks

gmtalk
26 Oct 2001, 02:37
Originally posted by DarkManX_19
bump'n again......still lookin for this missing code........thanks

hey DarkmanX_19


here is the template as i created it. i had the same issue with my forum and not getting it added through the install script.

hope that this helps

<tr>
<td bgcolor="#F1F1F1" valign="middle"><normalfont><b>Rate this Thread:</b></normalfont>
</td>
<td bgcolor="#F1F1F1" valign="top"><smallfont>
<input type="radio" name="rating" value="0" $noc> No Rating worst <
<input type="radio" name="rating" value="1" $onec>1
<input type="radio" name="rating" value="2" $twoc>2
<input type="radio" name="rating" value="3" $threec>3
<input type="radio" name="rating" value="4" $fourc>4
<input type="radio" name="rating" value="5" $fivec>5 > best
</smallfont>
</td>
</tr>

DarkManX_19
30 Oct 2001, 01:06
thank you gmtalk :)