News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Double Post Stopper

Started by live627, December 05, 2007, 12:07:52 AM

Previous topic - Next topic

Dragooon

Make sure the packages directory is chmodded to 777 and got a temp directory in it which also 777

floydpink

#21
In a guest board where no login is required to post, the mod seems to prevent all replies by anyone within the time limit, presumably because it recognises 'Guest' as the same user every time.
I set the "Allow them to Double Post" in the Guest's permissions but it doesn't seem to work.


Dragooon

Try this
In Post.php
Find
function bumpAttempt() {
And add after
if(allowedTo('doublePost')) return true;

floydpink

#23
Thanks for the quick reply, but it doesn't work.
I changed ....
<Remainder of this post has been deleted to simplify future reading (it was utter nonsense!)>

Dragooon

No not that, in the beginning of the function bumpAttempt(), not in that "if" clause.

floydpink

#25
Doh! Sorry about that!!
I made the change as you suggest, but it seems to stop the bespoke user group from making any replies at all.
I changed 'return true' to 'return false' and it works for the bespoke user group who can now double post. It still didn't work for Guests - no guest could reply to any message.
I did some fiddling and eventually got it to work as follows:
Changed

function Post()
{
// Double Post Stopper change - Start
if(bumpAttempt())
fatal_lang_error('double_post_attempt');
// End

global $txt, $scripturl, $topic, $db_prefix, $modSettings, $board, $ID_MEMBER;
global $user_info, $sc, $board_info, $context, $settings, $sourcedir;
global $options, $func, $language;

loadLanguage('Post');


To

function Post()
{


global $txt, $scripturl, $topic, $db_prefix, $modSettings, $board, $ID_MEMBER;
global $user_info, $sc, $board_info, $context, $settings, $sourcedir;
global $options, $func, $language;

loadLanguage('Post');
// Double Post Stopper change - Start
         if (!$user_info['is_guest'])
         {
if(bumpAttempt())
fatal_lang_error('double_post_attempt');
          }
         // End

And then repeated the move in function Post2().

I've no idea if this is a robust solution. It's certainly not quite as efficient as LoadLanguage('post') has to be done even if a double post error is then displayed, but at least my guests can reply to other guests posts.

Dragooon

Hm I'll see to it then. I'll try to fix that bug.

Dragooon


Jojie

sorry of thread hijacking but this one is a bit similar to double post stopper.. and i'm not sure if you i pm'ing you is the best way..


will you be able to incorporate or create a mod similiar to double posting only.. for thread/ new topic stopper?  i.e

if i wanted to make a new topic called.. NEW TOPIC.. and post it.. and then another person or even me create a post with the same topic line of NEW TOPIC it won't let me do it?

chrisb

are we able to see an updated version for 1.1.5 please

Dragooon

This works for 1.1.5, Have you tried yet?

Linebeck

Uhm... can you add a 'merge posts' function?
Example:
Jack posts "Hi all! I'm jack." at 8:12 AM. After fifteen minutes, he posts "I like music and videogames".
The result will be:
"Hi all! I'm jack.
I like music and videogames."

Can you do that? :)

Thanks, and congratulations for the great mod.
Linebeck

Lum-chan

Works like a charm on SMF 1.1.5 and TP 1.0.5 Beta1  ;D
Lum-chan


Kimmie

#33
It works great on 1.1.5 however, if you have the Thank-O-Matic mod (or the other thank you mod) installed, this mod thinks that clicking the thank you button is an actual post.

Is there any way to fix this?

(I found this out when someone had clicked the thank you button and then wanted to also make a reply in the topic - it wouldnt let them)

[SAP]Francis

Omg! I remember! I had the idea of this mod! Thanks! I been using it for a while but I didn't remember if I had the idea or not! Wow! XD

Vehicles Forum

Founded By Francis Morissette

MDragon

Okay, so this mod didn't work for me (1.1.6), it returned an error every time a user tried to double post, rather than giving them the message.  I uninstalled and deleted this mod, and now it's still giving me that error message.  It didn't give it to me prior to installing the mod.  Is there something this mod changes that would not be removed on uninstall and deletion?

Dragooon

No, everything it changes is reverted. Did you have any test failures while installing/uninstalling?

MDragon

Quote from: Dragooon on September 15, 2008, 12:59:14 PM
No, everything it changes is reverted. Did you have any test failures while installing/uninstalling?

Nope, it installed perfectly (everything that's given me a test failure I didn't install for fear that it would break something) and uninstalled perfectly.  I'll try disabling the other mods then enabling them one at a time to see if it's something else, but I'm pretty sure it's this since only double posting is effected.

InternetMafia

Any plans to make this compatible for 1.1.6
Its better to be dead and cool than alive and uncool.

Mr_JimWest

#39
Well i got the basic function working in 1.1.6


But ther are no words under the admin "Posts and Topics" just a little box that allows you to put the days...BUT it works.....(No HELP either )

Also..."Permissions" under admin...doesn't exists!

Also..."An Error Has Occurred!" <<< That is the error that you get when you double post! (Which can be confusing - people will think the board is screwed up!)

But like i said before the function works...  ;)

This would be so tight if you made it work though.....thanks in advance - wicked mod!!!  ;D


UPDATE: I even tryed manual install for 1.1.6   - PLEASE HELP!  :P

Advertisement: