View Full Version : Displaying custom fields in threadbit
chris1979
06-24-2009, 10:44 PM
This might be complicated but I'm sure someone will know how to do it! :)
The threadbit template normally shows the username of the person who started the thread and the last person to post on the thread.
What would I need to do to make it show their real names (customfield1 customfield2 on my forum) instead of their username?
Dismounted
06-25-2009, 05:32 AM
As the user's custom fields and other information is not fetched anyway, you will need to change the query that fetches the threads to include this information. Then it is all a matter of using the correct variables in the template.
chris1979
06-25-2009, 07:13 AM
Can you give any guidance on how to change the query that fetches the threads?
chris1979
06-28-2009, 03:51 PM
Can anyone help with this?
Dismounted
06-29-2009, 04:41 AM
If you're looking at forum home - look in the file that processes information for this, index.php.
chris1979
06-29-2009, 09:21 AM
I think it's showthread.php that I'd need to change. But I don't know how to make the changes anyway - is there a guide somewhere? Can anyone give some tips?
I want to fetch the customfields for the person who started the thread - so as well as their username I can display their customfields.
Dismounted
06-29-2009, 09:41 AM
Correction to my last post - you'll be looking at forumdisplay.php. Don't know what I was thinking what I posted that.
showthread.php deals with the display of posts inside a specific thread - like the page you're looking at right now.
chris1979
06-29-2009, 09:53 AM
Ah right, cool. Thanks. I'll go look at forumdisplay.php.
Any tips on how to fetch the customfields?
Dismounted
06-29-2009, 10:15 AM
Custom fields are contained within the userfield table.
chris1979
06-29-2009, 10:26 AM
It's more the process of fetching the data and saving it as a variable (that can be inserted into a template) that I don't understand.
It's my first time trying this kind of thing.
DragonBlade
06-29-2009, 10:41 AM
Hey, Chris, check out this thread (https://vborg.vbsupport.ru/showthread.php?t=217156) by MellyMonster. It's along the same lines, and I showed her how to do basically what you ask. :)
chris1979
06-29-2009, 11:44 AM
Thanks! I'll ask more questions in that thread. :) :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.