vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   request: Autumatic Thread Mover (https://vborg.vbsupport.ru/showthread.php?t=43999)

spaceb 09-27-2002 03:55 PM

request: Autumatic Thread Mover
 
i need automatic messages mover, it for my new game on my forum. :nervous:
i want this hack to move the message when some one reply to it and the reply contain special word, like yes. if the reply contain the word yes the message will be moved
to forum 'x'
if the reply cantaint the word no, the message will be moved to forum 'Y'.
and i want to be abble to choose in what forums it gonna be and to what forums it will move the messages thanx for the help. ;)

Logician 09-28-2002 11:29 AM

I guess you should be asking this feature for "new threads" ONLY, if so edit newthread.php, find:

PHP Code:

  $message=trim($message); 

after that add:

PHP Code:

if (strpos(strtolower($message),"word"))
{
$forumid=X;} 

Replace X with your new forumid and "word" with your key word (write it in all lowercase)

spaceb 09-28-2002 08:23 PM

hmm thank you very much for the help but i need it work only when some one reply to the message and his reply contain the word 'yes' or 'no'.

Logician 09-28-2002 08:37 PM

but why dont you put this someone to a special usergroup (like Mods) and give the usergroup right to move threads? It would be easier to choose "Move Thread" instead of clicking reply, writing a special word and hacking the board to act so.

spaceb 09-29-2002 12:09 AM

because the game is for all the members of my forum. and i have a lot of different groups i can't give them all the ability to move threads to another forum. so i want it to be automatic and the reply it's their answer there is only 2 possibilities, i hope you can help me with this :) thanx for your help

Logician 09-29-2002 11:13 AM

well I dont know how well this would work. There can be some issues that would clash with the hack but here is the code anyway:

Edit newreply.php find:

PHP Code:

 // redirect
      
if ($visible) { 

Before that add:

PHP Code:

if (strpos(strtolower($message),"word"))
{
 
$DB_site->query("UPDATE thread SET forumid=X WHERE threadid=$threadid");


(Replace X with your new forumid)

I strongly suggest this to be used in a test board first! I havent tested it and it could have unwanted effects..

spaceb 09-29-2002 11:32 AM

is it possible to do it only in certain forums?
and thank you very much for the help i will try it on a test board first

Logician 09-29-2002 03:40 PM

Quote:

Originally posted by spaceb
is it possible to do it only in certain forums?

yes.. Replace

PHP Code:

if (strpos(strtolower($message),"word")) 

as
PHP Code:

if (strpos(strtolower($message),"word") AND $forumid==X


spaceb 09-29-2002 06:22 PM

o.k thank you very very much for the help :)


All times are GMT. The time now is 10:03 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.01051 seconds
  • Memory Usage 1,735KB
  • 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
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete