Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 03 Oct 2016, 19:26
ifuyivara ifuyivara is offline
 
Join Date: Sep 2016
How to show extra fields from node table in template?

I'm upgrading the template of a very old vbulletin installation. However I need to use the "oldid" field in the new node table to display the correct image on each forum (since those images are named after the old id of the forums). How can I extract this information? I can see the data in the node table under the "oldid" field but is there a way to extract this field in the template so I can use it?

I'm working on the display_Forums_item template
Thank you.
Reply With Quote
  #2  
Old 03 Oct 2016, 20:55
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
I checked the code and it looks like the "oldid" is not exposed in the forum node object in the display_Forums_item template.

You could try:

{vb:raw forum.oldid}

but I doubt it has a value. But it wouldn't hurt to try. Maybe oldid isn't there for me because I don't have and old id
__________________
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote
  #3  
Old 04 Oct 2016, 17:05
ifuyivara ifuyivara is offline
 
Join Date: Sep 2016
Yeah I tried that and came out empty.

I had to expose the oldid in order to be able to use it so ended up modifying the core

It's not ideal but I couldn't find any other way around that (I don't know why you wouldn't expose the old id if it's there in the table anyways).

I modified node.php to include the oldid in the return array for the channel nodes

Now I can use it from the templates.
Reply With Quote
  #4  
Old 05 Oct 2016, 01:40
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
You might want to create an enhancement request in JIRA to officially fix it.

http://tracker.vbulletin.com/secure/...91&issuetype=4
__________________
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 14:58.

Layout Options | Width: Wide Color: