vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   When a Thread Moves put a auto Post in it? (https://vborg.vbsupport.ru/showthread.php?t=45884)

Exo 11-19-2002 12:52 AM

When a Thread Moves put a auto Post in it?
 
Hi there,

i have an Archiv Forum with old Threads, and its very usefull that i can set a auto post in this thread with "Auto Post - Moved to Archiv" when i move it to the archiv.

is there any hack for it or how can i make it? :classic:

Exo 11-19-2002 01:56 PM

:banana:

Xenon 11-19-2002 04:53 PM

?

i don't see the effect of this autopost, but here you are:

open postings.php find that:
PHP Code:

  if ($method=="move") { // straight move
    
$threadinfo[notes]="Moved to '$foruminfo[title]' by $bbuserinfo[username] on ".vbdate($dateformat." ".$timeformat,time()).". $threadinfo[notes]";
    
$DB_site->query("UPDATE thread SET forumid='".addslashes($forumid)."',notes='".addslashes($threadinfo[notes])."',sticky=0 WHERE threadid='$threadid'"); 

and change it to:
PHP Code:

  if ($method=="move") { // straight move
    
$threadinfo[notes]="Moved to '$foruminfo[title]' by $bbuserinfo[username] on ".vbdate($dateformat." ".$timeformat,time()).". $threadinfo[notes]";
    
$DB_site->query("UPDATE thread SET forumid='".addslashes($forumid)."',notes='".addslashes($threadinfo[notes])."',sticky=0 WHERE threadid='$threadid'");
if(
$forumid==xx) {
$DB_site->query("INSERT INTO post (postid,userid,username,pagetext,threadid,dateline,visible) VALUES (NULL,0,'Forumname','Auto Post - Moved to Archiv',$threadid,".time().",1)");


replace the xx in th if-clause with your archiv forumid and the Forumname with the title of your forum (or anything you want to have as username of the Autopost)

Exo 12-21-2002 06:54 AM

thanks it works but i have a little problem i want that this post goes to the end and now its always at the top! And that is use the move time and ate now it is "01.01.1970 01:00" :)

Xenon 12-21-2002 07:19 AM

you're welcome :)

change the insert line with the new one, i edited it :)

Exo 12-21-2002 07:39 AM

ah thanks works now with dateline! :) :banana:


but another little Problem the post does not stand there automaticly, is must moderate them under "Threads awaiting validation" why that? :paranoid:

Xenon 12-21-2002 07:51 AM

where do i have my mind? :)

again changed that line :)

Exo 12-21-2002 08:30 AM

ah thanks now it works perfect! :)

Xenon 12-21-2002 08:38 AM

glad we could solve it :)

bigdaddy04 05-18-2004 01:43 AM

What does this do?

I'm looking for a code that will make a post "Moved to #forum name#" when a thread is moved to another forum by an admin or a mod, does this accomplish the same thing?

Thanks :)

Xenon 05-18-2004 10:42 AM

'Auto Post - Moved to Archiv'

that's the text of the post, you can change it to whatever you want, for example into:

'Auto Post - Moved to $foruminfo[title]'

so yes it does what you want :)


All times are GMT. The time now is 05:38 PM.

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.02474 seconds
  • Memory Usage 1,736KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)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