vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   My 1st attempt (https://vborg.vbsupport.ru/showthread.php?t=57591)

MindTrix 11-13-2003 05:30 PM

Could this be anything maybe?

PHP Code:

// get last reply time
  
if ($postid) {
    
$dateline=$DB_site->query_first("SELECT dateline
                                     FROM post
                                     WHERE postid='
$postid'");
    
$lastposttime=$DB_site->query_first("SELECT dateline
                                         FROM post
                                         WHERE threadid = '
$threadid'
                                               AND dateline < 
$dateline[dateline]
                                               AND visible = 1
                                         ORDER BY dateline DESC
                                         LIMIT 1"
);
  } else {
    
$lastposttime=$DB_site->query_first("SELECT dateline
                                         FROM post
                                         WHERE threadid='
$threadid'
                                         ORDER BY dateline DESC
                                         LIMIT 1"
);
  } 


sabret00the 11-14-2003 02:03 AM

have you tried $post[dateline] or $postdateline

also try $_POST[postdateline] or $_POST[$post[dateline]] or $_POST[$postdateline]

one of the latter should definately work

MindTrix 11-14-2003 03:22 PM

Hey sabret00the cheers for the help/advice, and you too assassingod i really REALLY appreciate it.

Yet, sabret00the none of the codes in your post worked at all :( Did i need to move any php code anywhere?

sabret00the 11-14-2003 04:11 PM

nope you should've just been able to do

$custompostime = $_POST[$dateline]

or something of the sort and then call it in your template as $customposttime

sorry i couldn't help more, if steve checks this again, he might be able to use what i tried to get it to work.

MindTrix 11-14-2003 05:00 PM

So surely i have to place

$custompostime = $_POST[$dateline]

Somewhere in a php file? I was just adding the codes you listed above in the other post to a template, which obviously were comming up blank. Basically i just want to be able to show the time a new reply was made, in another template.

sabret00the 11-14-2003 08:00 PM

in your functions.php

what exactly are you trying to do it could go a along way towards me trying to help you

MindTrix 11-14-2003 08:16 PM

Yeah your write lol, im jus beein over protective cause its something simple i wanted to do and i cant :p Plus i wanted to release it as a tiny hack if i got it to work i jus didnt want someone doin it b4 me (if they aint already) Blah ill pm u what im doing

sabret00the 11-14-2003 09:00 PM

fromw hat you explained, you can't do it the way it the way i was trying to do it but rather using a query, if i think you mean what i think you mean, anyway, check the query that's used in the forumdisplay.php

MindTrix 11-15-2003 12:00 PM

Ok i found this code in the forumdisplay.php and i think/hope its the one i need

PHP Code:

   // dates
        
if ($forum['lastpost']>0) {
          
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']);
          
$forum['lastposttime']=vbdate($timeformat,$forum['lastpost']);
          eval(
"\$forum['lastpostinfo'] = \"".gettemplate('forumhome_lastpostby')."\";");
        } else {
          
$forum['lastpostinfo']='Never';
        } 

If it is could you let me know where i need to put it in the functions.php because im guessing i cant just chuck it in there.


All times are GMT. The time now is 08:44 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.01223 seconds
  • Memory Usage 1,744KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete