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 05-16-2003, 10:06 PM
SouledOut SouledOut is offline
 
Join Date: Nov 2002
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Custom Field Apperance (hard to explain so please read)

I'm beginning new work on my forums. We have a custom field ($post[field5]) and it's applied threw the Admin CP. As you can see, it's at the bottom of the postbit (it says Stardust Executive, in bold). Now, I want to move that to one field below the avatar, and have it appear only if the person has a custom title (I was able to do that with the Online Status, it's gone unless the user is online). Now, I've been having alot of trouble. From looking at the other templates, I made a new one called 'postbit_status'. I tried including varibles $post[status], $postbit_status, and just $status. I also edited the showthread.php to get the information from that template in the varible $postbit_status, and nothing. I'm hoping there's some easy, magical way to do this in PHP Include. Please help me out.

-Eric

(Note: I orginally posted this at vbt.com, but they said it needs to be hacked, like I feared....)
Attached Images
File Type: gif untitled-2.gif (53.2 KB, 0 views)
Reply With Quote
  #2  
Old 05-16-2003, 10:47 PM
SouledOut SouledOut is offline
 
Join Date: Nov 2002
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heh, you consider it a request I see. I wouldn't have...
Reply With Quote
  #3  
Old 05-17-2003, 12:42 AM
SouledOut SouledOut is offline
 
Join Date: Nov 2002
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I really hate to bump, but I really need this help.
Reply With Quote
  #4  
Old 05-17-2003, 10:53 AM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not sure I understand exactly what you're asking. Do you mean that you just want the word "status" with the custom field (field5) to only appear in the postbit if the user has entered something in the field? Something like Status: $post[field5] ?

If so, thats easy enough..

In admin/functions.php find:
Code:
if ($post[customtitle]==2) {
			$post[usertitle] = htmlspecialchars($post[usertitle]);
		}
Below it add:
Code:
if ($post[field5]!="") {
$status="<smallfont><b>Status:</b> $post[field5]</smallfont><br>";
} else {
$status="";
}
Then go to your postbit template and put $status below the avatar or where ever you want it to appear.
Reply With Quote
  #5  
Old 05-17-2003, 11:53 AM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah, I think I know what you're asking for now.. You want to call a template that contains $post[field5] along with some html (table tags) right?

If thats what you mean, instead of using the code that I posted above, use this:


Code:
if ($post[field5]!="") {
eval("\$status = \"".gettemplate("Your_Template_Name")."\";");
} else {
$status="";
}
Change the 'Your_Template_Name' to whatever template you want to show. Then put $status in your postbit where you want it to display. It will only show up if the user has entered something in the field.

Hope that helps.
Reply With Quote
  #6  
Old 05-17-2003, 08:51 PM
SouledOut SouledOut is offline
 
Join Date: Nov 2002
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

YES!!! It worked! If I get your permission, can I make a hack for it (it'd be a hack on how to have tables appear only if a user has info to input, or some other crazy name)
Reply With Quote
  #7  
Old 05-17-2003, 09:27 PM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

EvilLS1 - make amini hack of it, I beg you!
Reply With Quote
  #8  
Old 05-17-2003, 10:58 PM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Post it if you want but I'm pretty sure this has already been posted numerous times here in the request forum.

BTW, you guys should check out Logician's Dynamic Templates hack. It allows you to do several things like this with only template edits which makes small hacks like this one obsolete.
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:15 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.04014 seconds
  • Memory Usage 2,251KB
  • Queries Executed 14 (?)
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
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (1)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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