vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Displaying custom fields in threadbit (https://vborg.vbsupport.ru/showthread.php?t=217057)

chris1979 06-24-2009 10:44 PM

Displaying custom fields in threadbit
 
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 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. :) :)


All times are GMT. The time now is 04:54 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
  • Page Generation 0.00995 seconds
  • Memory Usage 1,727KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete