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)

Hobbes 04-26-2003 06:15 AM

i have one question....heh....i hope this thread is like....still loooked at!!!!

anyway....

the attachment is the Double Post Prevention Hack before I installed

Anime-loo 's Post Redirect Hack.

I was wondering what i would change in the code so that it will show

"Double Posting are we?"

between each post, instead of right after the text like it's doin now....if needed, i'll attach another screenshot of how it looks now....

I hooooppppe someone can answer this *dances*

Hobbes 04-26-2003 06:20 AM

:bunny: well...i'm bored....so i'll show ya how it looks now...


the attachment actually shows

(1) how it was [in the quote]

(2) how it is now [after i installed Anime loo's Post Redirect hack.

heeelp??

:bunny:

Xenon 04-26-2003 03:47 PM

hmm, i can't really see the sense for this, but all you have to change is this:

PHP Code:

addslashes($lastpost[pagetext] . "\n\n" $message

the string \n\n produces two enters, but you can replace it with everything you want to be between the two posts.
if you left out the \n tags, it will lead to your problem.

if they're in, maybe you have to ask anime about his hack ;)

Hobbes 04-26-2003 05:26 PM

*dances*....

THANKS !!!!!!!! \n\n did the trick! w00t!

Opie 04-29-2003 06:19 PM

Quote:

[i]04-09-03 at 07:23 AM Xenon said this in Post #146

to exclude forums:
change this:
PHP Code:

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

into this:
PHP Code:

if(in_array($threadinfo['forumid'], array(x,y,z)) or $lastpost['userid'] != $bbuserinfo['userid'] OR (time() - $lastpost['dateline']) > 3600 OR ($attachmentid and !$foruminfo['moderateattach'])) { 

and change x,y,z into the forumids you want to exclude [/B]
When I do this I get this error:

Parse error: parse error, unexpected ',' in /home/opie/public_html/forums/newreply.php on line 296

I'm running 2.2.7 if that matters.

Xenon 04-29-2003 09:06 PM

if you have made everything right, there couldn't be such a parse error.

you should check your php syntax on mistakes you have made

Opie 04-30-2003 07:50 PM

Code:

if($threadinfo['forumid'], array(10,11,13)) or $lastpost['userid'] != $bbuserinfo['userid'] OR (time() - $lastpost['dateline']) > 3600 OR ($attachmentid and !$foruminfo['moderateattach'])) {

That's what I put and those are valid forum ids, but still the error... weird.

Xenon 04-30-2003 08:02 PM

whats wierd?

you clearly forgot half of the codechanges......
why haven't you put the word in_array in your code as i stated?

Opie 05-01-2003 02:11 AM

Sorry I don't know too much about php, so instead of array put "in_array" ?

I didn't see where you said put "in_array".

DigitalDesktops 05-01-2003 02:45 AM

use this code instead, it seems VB took out in_array :p lol:

[sql]
if(in_array($threadinfo['forumid'], array(x,y,z)) or $lastpost['userid'] != $bbuserinfo['userid'] OR (time() - $lastpost['dateline']) > 3600 OR ($attachmentid and !$foruminfo['moderateattach'])) {
[/sql]


All times are GMT. The time now is 11:35 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.01197 seconds
  • Memory Usage 1,745KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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