vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Thread created date -- partially working (https://vborg.vbsupport.ru/showthread.php?t=92531)

Christine 07-20-2005 01:15 AM

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>


Marco van Herwaarden 07-20-2005 06:44 AM

Just a wild guess, but you might not have access to the $vbulletin->options['dateformat'] in this function. Check if that is filled.

Christine 07-20-2005 09:41 PM

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

Christine 07-24-2005 12:29 AM

Double checked.

It is definitely in the function -- it is used by the announcement date. :/

Christine 07-28-2005 09:45 PM

Right concept, wrong hook.

<~~ still learning. :)

Dontom 12-28-2005 11:38 AM

Did anyone get this working?
Thanks

Grendel 01-05-2006 03:56 PM

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

Dontom 01-06-2006 03:17 AM

Hi - it works perfect, why don't you release it as a hack?
Danke
Thomas

Grendel 01-07-2006 07:31 PM

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.


All times are GMT. The time now is 01:46 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.01089 seconds
  • Memory Usage 1,726KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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