vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Dates put into thread title automatically (https://vborg.vbsupport.ru/showthread.php?t=115709)

OndaReal 05-16-2006 12:21 AM

Dates put into thread title automatically
 
On my forum there are sections that my members post news in. I have a rule up where, when a member posts a new thread they have to put in the date too for example "June 9 - World Cup Kicks off"

So basically i want it to be like so when they go to post the news they wont need to put in the "June 9" bit because it will do it automatically for them. I know this is possible because i have seen it in another vb forum, I cant reach the admin on there because hes never around so im wondering if anyone off here can help me with this :)

Bhuwan 05-16-2006 01:24 AM

Quote:

Originally Posted by OndaReal
On my forum there are sections that my members post news in. I have a rule up where, when a member posts a new thread they have to put in the date too for example "June 9 - World Cup Kicks off"

So basically i want it to be like so when they go to post the news they wont need to put in the "June 9" bit because it will do it automatically for them. I know this is possible because i have seen it in another vb forum, I cant reach the admin on there because hes never around so im wondering if anyone off here can help me with this :)

Probably not the best way but quickly, I think you could do it this way...
Create a new hook in threabit_display ...
Code:

global $ondarealdate;
$ondarealdate = vbdate($vbulletin->options['dateformat'], $thread['dateline'], true);

Then in your threadbit template, you can put $ondarealdate anywhere you want..

Incendium 05-16-2006 01:39 AM

Another idea might be to manipulate the query or thread title before it is inserted into the database. I'll take a look at this later.

Edit: I'm testing an implementation and will provide an update in the morning.

OndaReal 05-16-2006 04:34 PM

Thank you guys, ill be waiting in anticipation :)

Incendium 05-16-2006 04:39 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=115772" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=115772</a>

OndaReal 05-17-2006 12:34 AM

Thank you :), Top Man


All times are GMT. The time now is 09:24 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.02285 seconds
  • Memory Usage 1,720KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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