Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Set Current Date and Time in Editpost Details »»
Set Current Date and Time in Editpost
Version: 1.00, by Boofo Boofo is offline
Developer Last Online: Jun 2012 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 05-15-2003 Last Update: Never Installs: 9
 
No support by the author.

Set Current Date and Time in Editpost v1.0

This hack was requested by Rose in this thread:
https://vborg.vbsupport.ru/showthrea...threadid=51653

Many thanks goes out to Tigga without whom this hack would never have been made. He helped me see a simpler way of doing something that I had only seen as complicated. Thank you, sir.

What this hack does:
When editing a post, there will now be a checkbox to set the date and time of that post to the current posting time. This hack is for those who have threads or posts they edit on a continual basis and need it to rise to the top of the thread list and show as a new post on the forumdisplay and forumhome.

Files to edit: 1 (editpost.php)
Templates to edit: 1 (editpost)
Install time: 5 minutes (if you are really slow)

[high]Please click the install button if you find this hack useful.[/high]

Show Your Support

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

Comments
  #32  
Old 05-17-2003, 08:18 AM
AndrewD AndrewD is offline
 
Join Date: Jul 2002
Location: Scotland
Posts: 3,486
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like this - I was going to code this myself - so thanks.

Couple of points..

If you don't want your posts to move around the thread (i.e. you only want the thread/forum to show there's been a change), then don't bother with the
PHP Code:
$editedbysql$attachmentsql$updatedate 
modification.

If you want to update the "lasterposter" field (e.g. if the original poster is not the editor) then replace
PHP Code:
$DB_site->query("UPDATE thread SET lastpost='".time()."' WHERE ... 
by
PHP Code:
$DB_site->query("UPDATE thread SET lastpost='".time()."', lastposter='".$bbuserinfo[username]."' WHERE ... 
You might also like to make the update option the default, in which case add CHECKED into the editpost template change.
Reply With Quote
  #33  
Old 05-17-2003, 09:42 AM
all-the-vb's Avatar
all-the-vb all-the-vb is offline
 
Join Date: Apr 2003
Location: Norwich,Uk
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice hack

Thanks Boofo
Reply With Quote
  #34  
Old 05-17-2003, 11:35 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Austin, this hack is more for when you have a thread (first post) or post that you update continually and want it to rise itself to the top as a new post. I have a "Useless True Facts" post that I add to on a continuing basis and this makes it great for that.

@ yxboom - Did you try the file I fixed for you, yet? How's it working?

@ all-the-vb - Thank you very much. Don't forget to click install in case I update this in the future.
Reply With Quote
  #35  
Old 05-17-2003, 11:44 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 04:18 AM AndrewD said this in Post #31
I like this - I was going to code this myself - so thanks.

Couple of points..

If you don't want your posts to move around the thread (i.e. you only want the thread/forum to show there's been a change), then don't bother with the
PHP Code:
$editedbysql$attachmentsql$updatedate 
modification.

If you want to update the "lasterposter" field (e.g. if the original poster is not the editor) then replace
PHP Code:
$DB_site->query("UPDATE thread SET lastpost='".time()."' WHERE ... 
by
PHP Code:
$DB_site->query("UPDATE thread SET lastpost='".time()."', lastposter='".$bbuserinfo[username]."' WHERE ... 
You might also like to make the update option the default, in which case add CHECKED into the editpost template change.
The reason I didn't make the box checked as default was in case you were editing for like a spelling error or just changing something that you didn't really want the thread to show up as new for.

I had the last poster showing as the editor off the message, and not the original poster (if other than yourself) but that confused a few people when they would go to read the message and it was from someone other than who the last poster was.
Reply With Quote
  #36  
Old 05-17-2003, 12:15 PM
yxboom's Avatar
yxboom yxboom is offline
 
Join Date: Jan 2003
Location: The City
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Boofo: Got it and replied.
Reply With Quote
  #37  
Old 05-18-2003, 02:21 AM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Boofo does it again! Good work my friend.
Reply With Quote
  #38  
Old 05-18-2003, 02:36 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 10:21 PM xiphoid said this in Post #36
Boofo does it again! Good work my friend.
Thank you very much. If you install this, please don't forget to hit the install button.
Reply With Quote
  #39  
Old 05-22-2003, 02:22 PM
yxboom's Avatar
yxboom yxboom is offline
 
Join Date: Jan 2003
Location: The City
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Note: If you have Xenon's Admin Edit hack you need to put the line of code in the Editpost template from this hack into the admineditpost template instead for it to function.
Reply With Quote
  #40  
Old 05-22-2003, 02:26 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I told you I would get it figured out for you. How's that for relentless?
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 05:10 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.04661 seconds
  • Memory Usage 2,310KB
  • Queries Executed 26 (?)
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
  • (6)bbcode_php
  • (2)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
  • (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_onlinestatus
  • (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_postinfo_query
  • fetch_postinfo
  • 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