![]() |
Last Post Date
I have a hack on my forum home page which displays the 10 most recent posts. But next to the "Go To Last Post Button" I want to display the date (like in the forum view which is below this list).
The code I am using to show the date and time of the last post in that thread is Code:
$lastpostinfo[lastpostdate] Any thoughts as to what I am doing wrong would be appreciated. |
Maybe you should ask this in the thread of the hack you have installed. Maybe this info don't get queried from teh database. Difficult to give an answer without seeing the hack.
|
Quote:
KirbyDE kindly ported it into 3.5.0 for me but I don't think he has the time to assist or I would not need to ask here. |
Well then you should at least post the hack here, and maybe someone will be so kind to look at it. But without seeing it, there is no chance someone can guess why it doesn't work, or what to changes to make it work.
|
Quote:
Code:
<tr> Do you need any other info? |
:D
You should have posted the plugin, not the template. Not much we can see from that. |
Quote:
|
1 Attachment(s)
Quote:
|
So you just want the date and time of the lastpost?
|
Quote:
|
What date is $last['lastpost'] ?
(This is the code from the plugin) Code:
$last['lastpost'] = vbdate($vboptions['dateformat'], $last['lastpost'], true); |
Quote:
|
Okay, let me rephrase - have you tried using $last[lastpost] as it would seem to suggest it is what you want.
|
Quote:
If you check the template code I quoted above I am currently using this, but nothing is displaying. Code:
<div><phrase 1="member.php?find=lastposter&t=$last[threadid]" 2="$last[lastposter]">$vbphrase[by_x]</phrase></div> $last[lastpost] <a href="showthread.php?$session[sessionurl]goto=newpost&t=$last[threadid]" title="<phrase 1="$last[title]">$vbphrase[go_first_unread_in_thread_x]</phrase>"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="<phrase 1="$last[title]">$vbphrase[go_first_unread_in_thread_x]</phrase>" border="0" /></a> |
In the plug-in, try changing this line:
PHP Code:
PHP Code:
|
good eye booboo, I didn't even notice that... I guess 3.0 is still stuck in my physie
|
Lucky guess is all, as with most of my coding. ;)
|
1 Attachment(s)
Many thanks kind Sir. That has got the date displaying.
However, the time is not next to the date, as in the forum view. Any chance of stretching a favour and asking how I correct this? You will see from the screen shots what I mean. The first is the view in the Top 10 list, but the second is taken from the forum view and is how I would like it to look. |
Quote:
|
Change that new code BooBoo gave you which was:
PHP Code:
PHP Code:
|
You don't use true in the time line, do you? You meant this I take it? ;)
PHP Code:
|
Quote:
1126602934 07:15 PM I think this is the Linux time stamp that is being shown. <edit> Scratch that. I haden't changed the date code so it still read $last[lastpost] rather than $last[lastpost_date]. Many thanks for your assistance. You have been a great help. |
I thought that might be it. No problem. ;)
|
Quote:
Well spotted that man. |
All times are GMT. The time now is 07:40 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|