vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Post dateline from bbcode plugin (https://vborg.vbsupport.ru/showthread.php?t=281653)

ctrlbrk 04-16-2012 11:41 PM

Post dateline from bbcode plugin
 
Hi,

I need a fixed-in-time dateline time() that does not change when someone quotes a reply.

Example:
1) Bob writes a post today. BBcode works, and uses time() to generate a dateline.
2) John replies to Bob's post at a later date, and the BBcode needs to reference the fixed-in-time time() from the original post 1, but instead it generates a new dateline as of John's reply.

There is no $post[dateline] in the bbcode_create.

The goal is for the bbcode to generate a dateline based on the POST dateline, and not the current system time().

Any help greatly appreciated.

kh99 04-16-2012 11:48 PM

You could try putting "global $post;" in your plugin code.

ctrlbrk 04-16-2012 11:56 PM

Quote:

Originally Posted by kh99 (Post 2320760)
You could try putting "global $post;" in your plugin code.

Thx. Tried that, still no $post[dateline]

--------------- Added [DATE]1334631758[/DATE] at [TIME]1334631758[/TIME] ---------------

BTW, any unique number that is unique to every post would be fine.

kh99 04-17-2012 10:12 AM

Well, there's the postid - in fact when you press the "quote" button you get bbcode tags with the postid in there. For instance if I quote your post above you get this:

[QUOTE=ctrlbrk;2320761]...

but I think that works by writing the postid into the code for the Quote button.

Thinking about it more, trying to use $post probably wouldn't work because it would be the information for the reply being created, not the post being quoted.


All times are GMT. The time now is 11:39 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.01727 seconds
  • Memory Usage 1,711KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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