Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 06-16-2000 Last Update: Never Installs: 0
 
No support by the author.

Ok, it's the really simple, crappy version - sue me!

Not tested too much (only twice), but seemed to work relatively well.

postings.php, find:
Code:
$DB_site->query("UPDATE thread SET forumid=$forumid WHERE threadid=$threadid");
ABOVE it add:
Code:
  if ($savecopy) {
  	$threadinfo=$DB_site->query_first("SELECT title,lastpost,forumid,open,replycount,postusername,lastposter,dateline,views,iconid,notes,visible,subjectindex,threadindex,userindex FROM thread WHERE threadid=$threadid");
  	$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,lastposter,dateline,views,iconid,notes,visible,subjectindex,threadindex,userindex) VALUES (NULL,'".addslashes("$threadinfo[title]")."','".addslashes("$threadinfo[lastpost]")."','".addslashes("$threadinfo[forumid]")."',0,'".addslashes("$threadinfo[replycount]")."','".addslashes("$threadinfo[postusername]")."','".addslashes("$threadinfo[lastposter]")."','".addslashes("$threadinfo[dateline]")."','".addslashes("$threadinfo[views]")."','".addslashes("$threadinfo[iconid]")."','".addslashes("$threadinfo[notes]")."','".addslashes("$threadinfo[visible]")."','".addslashes("$threadinfo[subjectindex]")."','".addslashes("$threadinfo[threadindex]")."','".addslashes("$threadinfo[userindex]")."')");
  	$newid=$DB_site->insert_id();
  	$posts=$DB_site->query("SELECT postid,threadid,username,userid,title,dateline,pagetext,allowsmilie,email,signature,ipaddress,iconid,visible FROM post WHERE threadid=$threadid");
  	while ($post=$DB_site->fetch_array($posts)) {
  		$DB_site->query("INSERT INTO post (postid,threadid,username,userid,title,dateline,pagetext,allowsmilie,email,signature,ipaddress,iconid,visible) VALUES (NULL,'$newid','".addslashes("$post[username]")."','".addslashes("$post[userid]")."','".addslashes("$post[title]")."','".addslashes("$post[dateline]")."','".addslashes("$post[pagetext]")."','".addslashes("$post[allowsmilie]")."','".addslashes("$post[email]")."','".addslashes("$post[signature]")."','".addslashes("$post[ipaddress]")."','".addslashes("$post[iconid]")."','".addslashes("$post[visible]")."')");
  	}
  }
find:
Code:
$DB_site->query("UPDATE forum SET replycount=$numberposts,threadcount=threadcount-1,lastpost=$lastpost,lastposter='".addslashes($lastposter)."' WHERE forumid=$curforumid");
REPLACE with:
Code:
  if (!$savecopy) {
  	$DB_site->query("UPDATE forum SET replycount=$numberposts,threadcount=threadcount-1,lastpost=$lastpost,lastposter='".addslashes($lastposter)."' WHERE forumid=$curforumid");
  }
find:
Code:
eval("echo standardredirect(\$bbtitle,\"".gettemplate("redirect_movethread")."\",\"showthread.php?threadid=$threadid\");");
REPLACE with:
Code:
  if ($savecopy) {
  	eval("echo standardredirect(\$bbtitle,\"".gettemplate("redirect_movethread")."\",\"showthread.php?threadid=$newid\");");
  } else {
  	eval("echo standardredirect(\$bbtitle,\"".gettemplate("redirect_movethread")."\",\"showthread.php?threadid=$threadid\");");
  }
-----
Close that.

Now, in your move template, add this somewhere:
Code:
<TD><INPUT TYPE="checkbox" NAME="savecopy" value="yes">&nbsp;&nbsp; <normalfont>Do you want to save a copy of this message (but closed) in its original forum?</normalfont></td>
----
That's it, you should be done.
Maybe not efficient, but it works

BTW, sorry there's no note on the page - I don't feel like adding a whole column to the database for that

[Edited by Ed Sullivan on 06-17-2000 at 11:01 PM]

Show Your Support

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

Comments
  #2  
Old 06-16-2000, 03:40 PM
Guest
 
Posts: n/a
Default

Thank you


I will try it shortly.
Reply With Quote
  #3  
Old 06-17-2000, 05:54 AM
Guest
 
Posts: n/a
Default

Ed, now how about the extended hack version, whereby the icon changes to "moved.gif" and the link of that thread in fact is linked to the new position of the thread?
Reply With Quote
  #4  
Old 06-17-2000, 06:00 AM
Guest
 
Posts: n/a
Default

I get a parse error on this line:

Code:
$DB_site->query("INSERT INTO post (postid,threadid,username,userid,title,dateline,pagetext,allowsmilie,email,signature,ipaddress,iconid,visible) VALUES (NULL,'$newid','".addslashes("post[username]")."','".addslashes("post[userid]")."','".addslashes("post[title]")."','".addslashes("post[dateline]")."','".addslashes("post[pagetext]")."','".addslashes("post[allowsmilie]")."','".addslashes("post[email,'".addslashes("post[signature]")."','".addslashes("post[ipaddress]")."','".addslashes("post[iconid]")."','".addslashes("post[visible]")."')");
Reply With Quote
  #5  
Old 06-17-2000, 01:59 PM
Guest
 
Posts: n/a
Default

Doh! Sorry, copied the wrong code. That line should read:
Code:
$DB_site->query("INSERT INTO post (postid,threadid,username,userid,title,dateline,pagetext,allowsmilie,email,signature,ipaddress,iconid,visible) VALUES (NULL,'$newid','".addslashes("$post[username]")."','".addslashes("$post[userid]")."','".addslashes("$post[title]")."','".addslashes("$post[dateline]")."','".addslashes("$post[pagetext]")."','".addslashes("$post[allowsmilie]")."','".addslashes("$post[email]")."','".addslashes("$post[signature]")."','".addslashes("$post[ipaddress]")."','".addslashes("$post[iconid]")."','".addslashes("$post[visible]")."')");
bira - I haven't studied the tables, but unfortunately, I'm a littled limited in what I can do without adding a field. Maybe, but it's low on my to do list
Reply With Quote
  #6  
Old 06-17-2000, 02:03 PM
Guest
 
Posts: n/a
Default

Ok, fixed the aforementioned mistake in my original code and added another search and replace (if (!$savecopy) {). Not a HUGE deal if you don't add it, but you're counters will be off then
Reply With Quote
  #7  
Old 06-17-2000, 04:48 PM
Guest
 
Posts: n/a
Default

Thanks! Works like a champ now.
Reply With Quote
  #8  
Old 06-17-2000, 05:30 PM
Guest
 
Posts: n/a
Default

Yes it does, thank you again
Reply With Quote
  #9  
Old 08-03-2000, 09:54 PM
Guest
 
Posts: n/a
Default

woah... hard to follow a bit... thought i'd bring it back up a bit
Reply With Quote
  #10  
Old 08-03-2000, 10:23 PM
Guest
 
Posts: n/a
Default

hmmm.. it didn't work ? no thread was saved in the original forum ?

okay i have hacks installed? could that be the problem ?

i have the location/interest hack, search result hack and avatar hack
Reply With Quote
Reply


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 02:23 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.04310 seconds
  • Memory Usage 2,280KB
  • Queries Executed 23 (?)
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
  • (9)bbcode_code
  • (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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)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
  • 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