Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-20-2005, 01:15 AM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Thread created date -- partially working

Hrm.

This is not displaying on current threads, nor threads that I start, so I thought it was just not working -- BUT -- I just tested the Reported Post Creates Thread hack and it worked on that. When I report a post, it creates the thread and puts the date in place like it should.

Bizarre.

All this needs to do is display the thread creation date from thread.dateline on FORUMDISPLAY.

Can anyone tell me what I am missing here -- perhaps using the wrong hook?

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<plugins>
	<plugin active="1" product="vBulletin">
		<title>Thread Created Date</title>
		<hookname>threadbit_display</hookname>
		<phpcode><![CDATA[$threadcreated = vbdate($vbulletin->options['dateformat'], $thread[dateline]) . ' ' . vbdate($vbulletin->options['timeformat'],  $thread[dateline]);
		]]></phpcode>
	</plugin>
</plugins>
Reply With Quote
  #2  
Old 07-20-2005, 06:44 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just a wild guess, but you might not have access to the $vbulletin->options['dateformat'] in this function. Check if that is filled.
Reply With Quote
  #3  
Old 07-20-2005, 09:41 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, from what I can see it appears to be. It is called in the query as thread.dateline, which was the same as in the identical query for this in 3.0.x -- no changes to the code other than the naming conventions (forumdisplay.php) for this routine.

I even tried just hacking it to be what is working in 3.0.x, same file, same function, same location -- same code above as I am using in 3.0.x (less the naming convention change). This is in the spot directly before the hook I am trying to use.

Am I missing something quite elementary here?

<~~ struggling a bit more with the 3.5 code than I did migrating from 2.x to 3.0
Reply With Quote
  #4  
Old 07-24-2005, 12:29 AM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Double checked.

It is definitely in the function -- it is used by the announcement date. :/
Reply With Quote
  #5  
Old 07-28-2005, 09:45 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Right concept, wrong hook.

<~~ still learning.
Reply With Quote
  #6  
Old 12-28-2005, 11:38 AM
Dontom Dontom is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did anyone get this working?
Thanks
Reply With Quote
  #7  
Old 01-05-2006, 03:56 PM
Grendel's Avatar
Grendel Grendel is offline
 
Join Date: Jul 2002
Location: Germany
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep.

Plugin-Titel: name it what you want, e.g. Thread Start Date
Hook: threadbit_process
Plugin-Code:
Code:
if ($thread['dateline'])
{
	$thread['creationdate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline'], 1);
	$thread['creationtime'] = vbdate($vbulletin->options['timeformat'], $thread['dateline']);
}
Template-Change in threadbit (whereever you want to show up the date) add:
Code:
$thread[creationdate]
That's taken from: https://vborg.vbsupport.ru/showthread.php?t=93074
Reply With Quote
  #8  
Old 01-06-2006, 03:17 AM
Dontom Dontom is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi - it works perfect, why don't you release it as a hack?
Danke
Thomas
Reply With Quote
  #9  
Old 01-07-2006, 07:31 PM
Grendel's Avatar
Grendel Grendel is offline
 
Join Date: Jul 2002
Location: Germany
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's only a part of the bigger hack of kirby, so it's none of my work. Won't be fair to release this as a 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 06:59 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.04297 seconds
  • Memory Usage 2,238KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete