![]() |
you should tell me what you want to install too, maybe i can give a hint to you
|
Umm right now I'm trying to fix a lil problem with the itemshop has soon has I do so I'll tell you :p.
|
Xenon, is there a way to make this be able to turn it off and off in the Admin CP for site testing purposes on various hacks? An option, I mean. :)
|
as you know everything is possible ;)
go to admin/settings.php and create new setting variablename: stopdoublepost function to create: yesno and then just before PHP Code:
PHP Code:
|
Stefan, thanks for the help. This is the part that has been stumped, though. :)
Code:
go to admin/settings.php and create new setting variablename: stopdoublepost |
nice hack man. very nice :nod:
|
I found out why I couldn't figure out what you meant, Stefan. The file I needed to set the option in was "admin/setting.php". I was looking for "admin/settings.php". DOHHH!!!
I did what you instructed and it works like a charm. Thank you very much, sir. :) Edit: I just noticed that on the first post if I check the "Send User to forums" checkbox (from Firefly's hack), it sends the user back to the forum display. If I check it on a double post (when Prevent Double Posting is enabled), it will not send the user back to the forum display. Instead it sends the user back to view the message. Is there a way to fix that so it will work with the Send User back to forum hack? |
@boofo: damn 's' ;)
yes it is possible, look at this: PHP Code:
PHP Code:
|
I'm sorry, my friend, now all it will do is send me back to the forum display no matter if the "send user back to forum" box is checked or not.
Edit: Fixed! :):):) (But only because of you, sir. :)) What I did was: Replace: PHP Code:
PHP Code:
|
ahh, sorry i didn't know the hack, i just thought you want everybody back to forumdisplay ;)
|
No, don't be sorry. I want to thank you. If you hadn't shown me that piece of code (which I should have found myself, dummy me :)) then it never would have clicked with me the right way to do it. So, thank you again, my friend. :)
Quote:
|
Quote:
$noshutdownfunc = 0; // #CHANGE ME IF YOU CAN'T USE register_shutdown_function to this: $noshutdownfunc = 1; // #CHANGE ME IF YOU CAN'T USE register_shutdown_function because my thread views stopped working. Got any ideas where my functions.php file is messed up? Otherwise i dont know how to fix it... any assistance would be very helpful. |
For some reason, on my board "/" appear before " ' " in the second post.
|
like 'this (test)
|
yes, seems there was a addslashes function where it shouldn't be
corrected |
Stefan, can you let us know where that was at so we can correct it on what we already have installed? :)
Quote:
|
no problem
it was addslashes($message) and it should just be $message in the update post line :) |
Xenon...I am sorry, I am definitely missing something, so can you please clarify for us dense board admins? :)
what php or template file needs to be edited so that I can remove the slashes from the double post actions? (and if possible, can you include which line it's on?) thanks. |
you have to edit newreply.php and change addslashes($message) into $message in the part of my hack..
|
Does this fix that unindex error i am getting? I was told to upload a new functions.php.. did that, doesnt work, still unindex error
|
nope the unindex error you posted seems to be another problem
my hack doesn't change this function. as you can read in the message unindexpost function isn't declared for some reason. have you upload an unhacked version of functions.php if problem stays you should open a thread in support forum |
Quote:
Code:
if ($prevpost=$DB_site->query_first("SELECT attachmentid,postid,visible FROM post WHERE threadid='$threadid' AND username='".addslashes($postusername)."' AND userid='$bbuserinfo[userid]' AND title='".addslashes(htmlspecialchars($title))."' AND dateline>$datecut AND pagetext='".addslashes($message)."'")) { Code:
$DB_site->query("UPDATE post SET title='".addslashes(htmlspecialchars($title))."',pagetext='".addslashes($message)."',allowsmilie='$allowsmilie',showsignature='$signature',iconid='$iconid',attachmentid='$attachmentid' WHERE postid='$postid'"); Code:
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')"); Code:
$DB_site->query("UPDATE post SET pagetext='".addslashes($lastpost[pagetext]."\n\n".addslashes($message))."' WHERE postid=".$lastpost[postid]); |
the last one
|
Thanks a lot! It worked great!
|
How could I make certain usergroups like mods/super mods/admins excempt from this rule? Meaning so that members can't double post but they can. And could it be a toggle so they could choose to bypass it or not?
|
the first thing is easy:
find PHP Code:
PHP Code:
i mean if they want to add it to the last post mods should be able to edit ;) |
I love this hack, excellent work Xenon :)
|
Quote:
|
you have to go to admin/settings.php
there you can set up a new vb-option called stopdoublepost. just add yesno to the field function to create... after that you'll have a new option in your vb-options within acp |
Ok, I am sorry to sound dumb, but how exactly do I do that? There are several sections in the file. Where and how do I add it? Does it go under "start add" or someplace else? And is it like the makeinputcode thing?
|
admin/setting.php
Posting Code allowances (vB code / HTML / etc) [edit] [remove] [add setting] click add setting Title: Enable Doublepost checking Variable Name: stopdoublepost Value: 0 Code to generate option: yesno Order: 1 (or something else) |
ok NOW I feel really dumb :$ I was opening the PHP file instead of going to the file on my browser. Dunno why I didnt think of trying that. So so sorry :(
|
*gggg*
no problem :) |
Works great on 2.2.9 with fireflys quickreply installed!
*Clicks install* |
Xenon, I have a question. How can I exempt one thread from the double post prevention?
if($bbuserinfo['usergroupid'] ==6 ||$lastpost[userid]!=$bbuserinfo[userid] || (time()-$lastpost[dateline])>3600 || ($attachmentid and !$foruminfo[moderateattach])) { Is it something to do with this line? Do I just add || $threadid=2171 to it??? |
yes right, but you should use $threadinfo['threadid'] == 2171 :)
|
Ah ok, yesterday I decided to pick up my php book and learn each page from the start slowly step by step, so hopefully in a few months i'll be able to hack much bigger hacks :). Thanks for the code though.
|
Is there a way to make this say edited by "name" on "date"
you know, the standard edit text when someone posts? Is it possible to make it do this after the same amount of time that my normal time is set ebfore having it diplay edited by? I have it set to 2 minutes, so how would I do this? I tried: PHP Code:
|
have you applied th edited by thing i posted in the thread here already?
|
Quote:
|
All times are GMT. The time now is 09:05 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|