Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Auto move threads to archive forum after x days Details »»
Auto move threads to archive forum after x days
Version: 1.00, by trafix trafix is offline
Developer Last Online: Jul 2008 Show Printable Version Email this Page

Version: 3.0.5 Rating:
Released: 01-20-2005 Last Update: 01-20-2005 Installs: 15
 
No support by the author.

Requested by Floris

This is another simple script based on the Close thread after 30 days .... BUT ...

This one will auto move all threads to an archive forum where the last post is 365 days or older

There is 2 variables for you to edit
1)
Defult is set to "1"
$newforum = the forum number that these threads are to be moved to

2)
Defult is set to 365
this means that threads that havnt been replied to in the last 365 days will be moved to the nominated archive forum
you can change 365 to whatever days you like

Trafix

Please click Install

Update
Found an error in the code please download new zip and replace the file on your forum

Added file ...

This file will move threads from a specific forum to another spacific forum, edit as instructed

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 01-23-2005, 11:02 AM
trafix's Avatar
trafix trafix is offline
 
Join Date: Dec 2002
Location: Australia
Posts: 1,021
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thats where you are going wrong ..... your phpmyadmin wont understand $DB_site

if you put the script in the cron folder you can use the task manager to "run now"
Reply With Quote
  #33  
Old 01-23-2005, 11:13 AM
The Realist's Avatar
The Realist The Realist is offline
 
Join Date: Oct 2001
Location: UK
Posts: 842
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lost on this one M8.
Reply With Quote
  #34  
Old 01-23-2005, 11:35 AM
Bison's Avatar
Bison Bison is offline
 
Join Date: Jun 2002
Location: Virginia Beach, Virginia
Posts: 522
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by The Realist
Same error.

Im using phpmyadmin to run the query.
Sorry for intruding, but this query is a PHP code dependant query and you cannot run it in phpMyadmin, or in the admin cp query. That's why you are getting errors. MySQL doesn't know what a "$db_site->(query" is! LOL!

If you want to test the query (the MySQL way), just type this (and fill in the blanks):

PHP Code:
UPDATE thread
SET forumid 
= [forumid number where all the threads will be moved ]
Where lastpost <= [what move date value]
AND 
forumid != [forumid number where all the threads will be moved]
OR 
sticky != 
BTW, this won't be a test on your forums ... it going to do the deed!
Reply With Quote
  #35  
Old 01-23-2005, 12:00 PM
trafix's Avatar
trafix trafix is offline
 
Join Date: Dec 2002
Location: Australia
Posts: 1,021
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bison
Sorry for intruding, but this query is a PHP code dependant query and you cannot run it in phpMyadmin, or in the admin cp query. That's why you are getting errors. MySQL doesn't know what a "$db_site->(query" is! LOL!

If you want to test the query (the MySQL way), just type this (and fill in the blanks):

PHP Code:
UPDATE thread
SET forumid 
= [forumid number where all the threads will be moved ]
Where lastpost <= [what move date value]
AND 
forumid != [forumid number where all the threads will be moved]
OR 
sticky != 
BTW, this won't be a test on your forums ... it going to do the deed!
Tnanks for explaining that Bison
Reply With Quote
  #36  
Old 01-29-2005, 02:45 PM
catocom2 catocom2 is offline
 
Join Date: Aug 2002
Location: Gainesville, Georgia
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is the closest hack to what I'm looking for that I've found.
Except...
Instead of moving, closing, or what not, I'd just like it to add a little
clock icon in the left column if the thread is older than xx, when someone
replies to it.
Is there an easy way to mod this mod to do that?

Thanks. This cron stuff is just a little beyond my programming skills ATM.
This is a great looking hack.
Reply With Quote
  #37  
Old 01-29-2005, 04:06 PM
trafix's Avatar
trafix trafix is offline
 
Join Date: Dec 2002
Location: Australia
Posts: 1,021
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by catocom2
This is the closest hack to what I'm looking for that I've found.
Except...
Instead of moving, closing, or what not, I'd just like it to add a little
clock icon in the left column if the thread is older than xx, when someone
replies to it.
Is there an easy way to mod this mod to do that?

Thanks. This cron stuff is just a little beyond my programming skills ATM.
This is a great looking hack.
so ... the clock replaces the original icon selected? ... or appears under it?
Reply With Quote
  #38  
Old 01-29-2005, 06:40 PM
catocom2 catocom2 is offline
 
Join Date: Aug 2002
Location: Gainesville, Georgia
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by trafix
so ... the clock replaces the original icon selected? ... or appears under it?
exactly

I'm not really sure it's a cron job thing though..?
Maybe just a conditional.
Reply With Quote
  #39  
Old 01-29-2005, 07:19 PM
trafix's Avatar
trafix trafix is offline
 
Join Date: Dec 2002
Location: Australia
Posts: 1,021
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by catocom2
exactly

I'm not really sure it's a cron job thing though..?
Maybe just a conditional.
yep ist php/template coding i can look at it
Reply With Quote
  #40  
Old 01-30-2005, 10:50 PM
catocom2 catocom2 is offline
 
Join Date: Aug 2002
Location: Gainesville, Georgia
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks man, but I got it now. :smoke:
fury@otcentral replied and told me how he did it.

http://otcentral.com/forum/showthread.php?t=17762
Reply With Quote
  #41  
Old 01-31-2005, 02:16 AM
catocom2 catocom2 is offline
 
Join Date: Aug 2002
Location: Gainesville, Georgia
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

here's the code I did:

place it the "threadbit" template where you want it...

PHP Code:
<!-- ---------------------- clock ------------------------------- -->
<if 
condition="$thread['dateline'] <(TIMENOW-86400*180)"><img src="http://catocom.com/forum/images/smilies/clock.gif" alt="This thread was started more than 6 months ago"></if>
<!-- ---------------------- /
clock ------------------------------- --> 
and an icon I altered

Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:36 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05935 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete