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)

Mystislav 07-12-2002 12:08 PM

o.O...err ok I'll try.

--------


Heh, still did'nt work, well this is how it looks in the php file, can you see if its messed up there

PHP Code:

      $lastpost $DB_site->query_first("SELECT * FROM post WHERE threadid = '$threadid' ORDER BY postid DESC");
      if(
$lastpost[userid]!=$bbuserinfo[userid] || (time()-$lastpost[dateline])>3600 || ($attachmentid and !$foruminfo[moderateattach])){
 
$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($mess

age
)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')");
      } else {
            
$editedbysql="";
            if (
$showeditedby and $lastpost[dateline]<(time()-($noeditedbytime*60))) {
               
$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."'";
            }            
            
unindexpost($lastpost[postid],$lastpost[title],$lastpost[pagetext]);
            
$DB_site->query("UPDATE post SET dateline='".time()."',pagetext='".addslashes($lastpost[pagetext]."\n\n".$message)."' WHERE 

postid="
.$lastpost[postid]);
            
indexpost($lastpost[postid],0);
            
$DB_site->query("UPDATE thread SET lastpost='".time()."' WHERE threadid='$threadid'");
            if (
$visible) {
            
$goto="showthread.php?s=$session[sessionhash]&postid=".$lastpost[postid]."#post".$lastpost[postid];
              } else {
            
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
              }
              eval(
"standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");");
              exit;     
      } 


Xenon 07-12-2002 09:31 PM

hmm, can't see whats wrong...

can you please highlight which of this line is the error producing line (as your errormsg says)

also please tell me the exact errormsg ;)

Mystislav 07-13-2002 03:42 AM

Ok, here is the message

Fatal error: Call to undefined function: unindexpost() in /home/sjmadho/public_html/board/newreply.php on line 288

and the exact newreply is in the attactments .. thanks alot.

Xenon 07-13-2002 09:32 AM

mystislav: edit your post, you are not allowed to post full vb-files here!!!

second: than the problem isn't my hack. you have to have made some mistakes some time ago, the function unindexpost() is defined in functions.php on every vb. If you don't have it, you have messed up your functions.php

Mystislav 07-13-2002 09:59 AM

Aight, so if I upload a new functions it should work?

Boofo 07-13-2002 10:20 AM

Xenon,

Is there any way to add color to the DOUBLE POST FEATURE part of this line?

PHP Code:

$DB_site->query("UPDATE post SET dateline='".time()."',pagetext='".addslashes($lastpost[pagetext]."\n\nDOUBLE POSTING FEATURE\n\n".$message)."' WHERE postid=".$lastpost[postid]);
            
indexpost($lastpost[postid],0); 


Xenon 07-13-2002 04:18 PM

@Mystislav: yes, then it should work.

@Boofo: You can use every vb-code in the textpassage between post1 and post2, so if you have enabled the color-bbcode on your board you should be able to do that:
PHP Code:

$DB_site->query("UPDATE post SET dateline='".time()."',pagetext='".addslashes($lastpost[pagetext]."\n\n[b][color=red]DOUBLE POSTING FEATURE[/color][/b]\n\n".$message)."' WHERE postid=".$lastpost[postid]); 

for example

Boofo 07-13-2002 07:15 PM

I had to replay to this message in order to see how you had the code (it was parsed here. The disable tags hack is great for this sort of thing!) :)

I was using [disable]<font color=\"yellow\"> and </font>[/disable]. That's where I messed up. Thanks for the fix. :)

[disable]$DB_site->query("UPDATE post SET dateline='".time()."',pagetext='".addslashes($last post[pagetext]."\n\nDOUBLE POSTING FEATURE\n\n".$message)."' WHERE postid=".$lastpost[postid]);[/disable]

Quote:

Originally posted by Xenon
PHP Code:

$DB_site->query("UPDATE post SET dateline='".time()."',pagetext='".addslashes($lastpost[pagetext]."\n\n[b][color=red]DOUBLE POSTING FEATURE[/color]<b>
@Boofo: You can use every vb-code in the textpassage between post1 and post2, so if you have enabled the color-bbcode on your board you should be able to do that:
</b>\n\n"
.$message)."' WHERE postid=".$lastpost[postid]); 

for example [/B]

Boofo 07-13-2002 07:27 PM

I forgot to add in my last message (you see...they really need this here for this kind of thing. :) ).

Is there a way to have it say like:

DOUBLE POSTING FEATURE - (post subject here)

in case they enter a post subject in the added message?

And have it show:

DOUBLE POSTING FEATURE

by itself it they don't?

Xenon 07-14-2002 07:55 AM

ups, damn i forgot code is parsed in [php]-tags too ;)

yes, Having the Subejct is also possible:

PHP Code:

[disable]$DB_site->query("UPDATE post SET dateline='".time()."',pagetext='".addslashes($lastpost[pagetext]."\n\n[b][color=red]DOUBLE POSTING FEATURE[/color][/b] - ".$title."\n\n".$message)."' WHERE postid=".$lastpost[postid]);[/disable



All times are GMT. The time now is 10:15 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.01381 seconds
  • Memory Usage 1,775KB
  • 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
  • (5)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