vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Prevent Doubleposting (https://vborg.vbsupport.ru/showthread.php?t=40145)

Xenon 09-14-2002 06:40 PM

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

yzztik 09-22-2002 05:43 PM

Quote:

Originally posted by Xenon
you have to edit newreply.php and change addslashes($message) into $message in the part of my hack..
when I search for this it appears 4 times in this order:

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]);
any idea which one I should change?

Xenon 09-22-2002 08:14 PM

the last one

yzztik 09-22-2002 08:22 PM

Thanks a lot! It worked great!

yzztik 10-09-2002 03:34 AM

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?

Xenon 10-09-2002 09:33 AM

the first thing is easy:
find
PHP Code:

      if($lastpost[userid]!=$bbuserinfo[userid] || (time()-$lastpost[dateline])>3600 || ($attachmentid and !$foruminfo[moderateattach])) { 

and just add the usergroupconditions:
PHP Code:

      if($bbuserinfo['usergroupid'] ==|| $bbuserinfo['usergroupid'] ==|| $bbuserinfo['usergroupid'] ==||$lastpost[userid]!=$bbuserinfo[userid] || (time()-$lastpost[dateline])>3600 || ($attachmentid and !$foruminfo[moderateattach])) { 

a toggle would also be possible (with a bit more work), but i don't see the effect there?
i mean if they want to add it to the last post mods should be able to edit ;)

N9ne 10-18-2002 08:56 PM

I love this hack, excellent work Xenon :)

yzztik 12-03-2002 12:23 PM

Quote:

Originally posted by Xenon
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:

$lastpost[userid]!=$bbuserinfo[userid] || 

in newreply.php add this:
PHP Code:

!$stopdoublepost || 


I think I am missing something here ... how exactly do I create this variable? I don't see it :$

Xenon 12-03-2002 03:45 PM

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

yzztik 12-03-2002 04:21 PM

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?


All times are GMT. The time now is 08:54 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
  • Page Generation 0.01538 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete