Closed (fixed)
Project:
Advanced Forum
Version:
6.x-1.1
Component:
Miscellaneous
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Jul 2009 at 10:46 UTC
Updated:
18 Jul 2009 at 16:50 UTC
I am trying to display the date the forums themselves were created as part of the advf-forum-list.tpl.php template.
I can easily retrieve individual post submitted data with the following code:
print $created;
But I can't figure out how to do the same with the forum or containers.
I believe it will be necessary to load the individual forum node and then retrieve the $created variable. I tried the following but it seems to break the code:
$node = load_node($child_id);
Can someone point me in the right direction as to how I can retrieve this data? I am going about it in the right way or have I missed a fundamental step?
Comments
Comment #1
michelleForums aren't nodes, they're taxonomy terms. As far as I know, there isn't any record of when a term gets created outside of possibly a log entry. That's all I know and this isn't anything to do with Advanced Forum. You might want to try the forums to see if anyone else has an idea.
Michelle
Comment #2
andrewsuth commentedI didn't realise they were taxonomy terms but it makes a lot of sense that it works that way.
You're right, no creation date information is stored for terms. It looks like I will have to create an initial post for each new forum and then use a custom function to retrieve the date from it.
Thanks for your help.
Comment #3
michelleIf you know PHP, you might want to look and see if there's a hook when terms are saved. You could then do a variable_set with the forum (term) id and a timestamp.
Michelle
Comment #4
andrewsuth commentedIn the end I wrote snippet of PHP to do the job and put it into
template.php:Comment #5
michelleCool, glad you found a solution. :)
Michelle