View Full Version : a way without hacking?
Rufus69
11-25-2002, 01:25 PM
seeing as I couldn't find a hack like this at vbulletin.org and I would rather not have to edit any php files if I dont have to
I was wondering if there was a way to make it so if a user trys to double post it sends them to the edit screen?
because it seems I have alot of spammy members on my forum -_-
filburt1
11-25-2002, 01:31 PM
I think it's possible but not easy. I'll look into it when I get home and reinstall Apache, PHP, MySQL, and 50 other things from reformatting last night :D
Rufus69
11-25-2002, 01:35 PM
lol ok til then I'll go searching the web and vb org for it...I'll tell ya if i find it
Theres a hack at vB.org that will insert the second post into the frist when someone double posts.
Rufus69
11-25-2002, 04:00 PM
nooo but I want it to send them to the edit screen not add there post to the last post because I tried that hack before but it still added money for them and I dont want people just posting and posting to get money....(I have a rpg system)
Ah in that case i think it would be done like this, i dont know if it can work with just phpinclude however.
When someone loads a topic it would check if they where the last person to reply to it. And if they are the last replier the 'new reply' button would link to the edit post page for their last post in the thread.
I know its ganna require a query to the database and some tricky php, once i can think of a way to code it ill report
Im ganna give this one a shot, ill sit down and write the code for it tonight and see if i cant get it released by weeks end.
filburt1
11-25-2002, 05:32 PM
Originally posted by Anime-loo
Ah in that case i think it would be done like this, i dont know if it can work with just phpinclude however.
When someone loads a topic it would check if they where the last person to reply to it. And if they are the last replier the 'new reply' button would link to the edit post page for their last post in the thread.
I know its ganna require a query to the database and some tricky php, once i can think of a way to code it ill report
You mean turn the Reply button into an Edit button if they made the last post in the thread?
Should be simple...I can release it if you want, or you can work on it :)
Nairb
11-25-2002, 06:27 PM
Originally posted by filburt1
I think it's possible but not easy. I'll look into it when I get home and reinstall Apache, PHP, MySQL, and 50 other things from reformatting last night :D
Speaking of that, I didnt find that thing you told me to get... for the php/apache/mysql thing
filburt1
11-25-2002, 07:08 PM
It's probably because the thread is old and disappeared from the listing after 30 days: http://www.webdesignforums.net/showthread.php?s=&threadid=4321 :)
Rufus69
11-25-2002, 07:29 PM
:D
ok thanks
you guys rule!
I'm not good at modding/hacking forums, It's odd too, I can make a forum system but I can't hack one :p
Originally posted by filburt1
You mean turn the Reply button into an Edit button if they made the last post in the thread?
Should be simple...I can release it if you want, or you can work on it :)
Yea thats about the size of it, i have it working on localhost but im ganna clean it up a bit and ad a redirect in there. something like.
"You may not double post on the $bbtitle forums, however we are redicrting you to the edit page for your last post"
I need to stress the fact that this will not work if you have Guest posting on.
Rufus69
11-25-2002, 09:21 PM
I dont have guest posting
oh and thanks by the way ;)
:p you guys rock at template modding :)
Ok i thru this toghter. Its really alpha and its not tested, tell me how it works (re installing mySQL, php and apache today and dont wanna test it on live board.)
In phpinclude add:
if (strpos($_SERVER['PHP_SELF'], 'showthread.php') != false)
{
// Lets query the database
$DB_site->query_first("SELECT postid,post.dateline FROM post,thread WHERE post.threadid=thread.threadid AND thread.threadid='$threadid' AND post.visible=1 AND thread.visible=1 ORDER BY post.dateline DESC LIMIT 1")) {
// getting everything set.
$lastreplyname = $thread[lastposter]
if ($bbuserinfo[username] == $lastreplyname) {
$editurl = <a href="/editpost.php?s=$session[sessionhash]&action=editpost&postid=$getlastpost[postid]\"><img src="/$replyclose\" border="/0\" alt="/Post A Reply\"></a>
} else {
$editurl = <a href="/newreply.php?s=$session[sessionhash]&action=newreply&threadid=$threadid\"><img src="/$replyclose\" border="/0\" alt="/Post A Reply\"></a>
}
}
In showthread replace this:
<a href="newreply.php?s=$session[sessionhash]&action=newreply&threadid=$threadid"><img src="$replyclose" border="0" alt="Post A Reply"></a>
With this:
$editurl
Rufus69
11-26-2002, 06:51 PM
Ok I'll try it on one of my old styles I dont use anymore :)
Rufus69
11-26-2002, 07:00 PM
I got this error
Parse error: parse error, unexpected ')' in C:\Paradox Network\vbulletin\global.php(185) : eval()'d code on line 47 Warning: Cannot add header information - headers already sent by (output started at C:\Paradox Network\vbulletin\global.php(185) : eval()'d code:47) in C:\Paradox Network\vbulletin\showthread.php on line 136
:(
Sorry try this in phpinclude:
if (strpos($_SERVER['PHP_SELF'], 'showthread.php') != false)
{
// Lets query the database
$DB_site->query_first("SELECT postid,post.dateline FROM post,thread WHERE post.threadid=thread.threadid AND thread.threadid='$threadid' AND post.visible=1 AND thread.visible=1 ORDER BY post.dateline DESC LIMIT 1")) {
// getting everything set.
$lastreplyname = $thread[lastposter]
if ($bbuserinfo[username] == $lastreplyname) {
$editurl = <a href="/editpost.php?s=$session[sessionhash]&action=editpost&postid=$getlastpost[postid]/"><img src="/$replyclose/" border="/0/" alt="/Post A Reply/"></a>
} else {
$editurl = <a href="/newreply.php?s=$session[sessionhash]&action=newreply&threadid=$threadid/"><img src="/$replyclose/" border="/0/" alt="/Post A Reply/"></a>
}
}
Rufus69
11-27-2002, 07:46 PM
I still get
Parse error: parse error, unexpected ')' in /home/virtual/site22/fst/var/www/html/forums/global.php(185) : eval()'d code on line 58
Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site22/fst/var/www/html/forums/global.php(185) : eval()'d code:58) in /home/virtual/site22/fst/var/www/html/forums/showthread.php on line 136
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.