PDA

View Full Version : Making It So You CANNOT rate your own thread?


ZiRu$
10-28-2002, 08:50 PM
How can i do this?

Xenon
10-29-2002, 01:36 PM
should be easy:

open threadrate.php

find:$threadinfo=getthreadinfo($threadid);

below add:
if($threadinfo[postuserid]==$bbuserinfo[userid]) show_nopermission();

ZiRu$
10-29-2002, 06:54 PM
thanks man...worked perfect

Chris M
10-29-2002, 07:12 PM
To make it so that the Admin can do, but noone else can, would it be :

if(($threadinfo[postuserid]==$bbuserinfo[userid]) and ($bbuserinfo[usergroupid]!=6)) show_nopermission();

?

Satan

Xenon
10-29-2002, 07:26 PM
you're welcome

chris: yes

Chris M
10-29-2002, 07:31 PM
Thanks Xenon:)

Satan

ZiRu$
11-21-2002, 05:08 PM
Actually this doesn't work....i tried with a REGULAR member, created the thread, rated it and it worked....

I have the Rating on where you go to "New Reply" and then rate it (along with your message) and it lets you..

the thing that could be messing this up is the fact that it is not calling $ threadrating option.....instead i have the actual MODIFIED code in my newreply template!

Xenon
11-21-2002, 05:13 PM
well, i don't know the hack, but normally you should be able to modify the code a bit to also work with the hack..

ZiRu$
11-22-2002, 07:01 PM
well bump for someone else........

Xenon
11-22-2002, 07:08 PM
i think you should ask this in the supportthread of your vote with reply hack ;)

ZiRu$
11-22-2002, 09:28 PM
no man....it ISNT a reply hack...i mean the ACTUAL NEWREPLY....

Press REPLY to this topic.....this page :)

No hacks involved....


I just put the Rating box here by modifiing the template

Xenon
11-22-2002, 09:38 PM
oh, sorry, didn't use rating on my board *gg*

ok, open newreply.php
find this:
if ($rating > 0 and $rating < 6 and $foruminfo['allowratings'] == 1) {
if ($permissions['canthreadrate']) {
$vote = intval($rating);


change it to: if ($rating > 0 and $rating < 6 and $foruminfo['allowratings'] == 1 and $threadinfo[postuserid]!=$bbuserinfo['userid']) {
if ($permissions['canthreadrate']) {
$vote = intval($rating);

ZiRu$
11-24-2002, 04:14 AM
You the man X....it worked perfect....

WOO HOO

Xenon
11-24-2002, 01:36 PM
:)
good to hear :)

you're welcome