Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-18-2004, 01:41 AM
Starscream's Avatar
Starscream Starscream is offline
 
Join Date: Jun 2004
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Help with a Seperate Page for Custom Profile Field

I've searched the forums and a couple of people have asked for this hack or one similar to it. Basically, I want to create a seperate page that just shows usernames and a custom profile field - something similar to the memberlist page.

The only difference is, I only want the Username and profile field to show up if someone has filled in that certain profile field.

I've tried a few different approaches to this and none of them have really worked out for me yet. On this attempt I've basically hacked memberlist.php to only show the things I want. Then, I renamed it and uploaded it to my forum - works (pic included below). However, it shows two custom fields (only want 1) and also shows users who didn't fill in the field. I have not modified any of the templates that the memberlist uses (nor do I really want to).

What do I need to do to make the memberlist.php (or renamed file) accomplish my goals? Is it something I can do with just the .php file or do I need to create new templates.

Any help would be much appreciated.

-note: I had a similar post a while back, but I decided to create another post as I'm trying to go in a different direction than before and didn't want to confuse the old coding with this one.
Attached Images
File Type: jpg ProfileField.jpg (104.2 KB, 0 views)
Attached Files
File Type: php profilefield.php (24.8 KB, 9 views)
Reply With Quote
  #2  
Old 11-19-2004, 12:15 AM
Starscream's Avatar
Starscream Starscream is offline
 
Join Date: Jun 2004
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wouldn't this hack be just a simple conditional sort of like what's below or is this like a big hack that I need professional (paid) help on?

Something like
PHP Code:
if ($profilefieldX True or whatever 
   Then show 
'Username'
   
else
   
Don't show 'username' or 'profilefield

I didn't think something like this was a big undertaking, but that just may be because of my limited knowledge of php. It's times like these that I wish I knew how to code php.
Reply With Quote
  #3  
Old 11-19-2004, 10:40 AM
SVTBlackLight01's Avatar
SVTBlackLight01 SVTBlackLight01 is offline
 
Join Date: Jan 2003
Location: Texas
Posts: 504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is what the template conditional should look like.

<if condition="$userinfo['fieldX']">
$userinfo[fieldX]
</if>
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 02:39 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.03716 seconds
  • Memory Usage 2,198KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (2)postbit_attachment
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete