Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #11  
Old 01-22-2011, 11:11 PM
Tasking Mickey's Avatar
Tasking Mickey Tasking Mickey is offline
 
Join Date: Jun 2010
Location: United States
Posts: 148
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did that, and when I click to save the template, it still comes up with that error.
Reply With Quote
  #12  
Old 01-22-2011, 11:14 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can I see exactly what your code right there is now? You may want to just combine the condition with the existing one.

HTML Code:
<if condition="$post['rank'] AND $post['fieldx'] != 'No'">
stuff
</vb:if>
Reply With Quote
  #13  
Old 01-22-2011, 11:32 PM
Tasking Mickey's Avatar
Tasking Mickey Tasking Mickey is offline
 
Join Date: Jun 2010
Location: United States
Posts: 148
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is my coding,

PHP Code:
                <vb:if condition="$post['field5'] != 'No'">  <if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if></vb:if> 
And when I save, a error comes up. Do I use your code? The exact code I use to replace the current rank code?
Reply With Quote
  #14  
Old 01-23-2011, 12:43 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try combining the two conditions into one like I wrote (remember there should only be one </vb:if> if you combine the two).
Reply With Quote
  #15  
Old 01-23-2011, 04:22 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ahem...

Being this is vBulletin 3.8 the if conditions are wrong (those are VB4 conditionals.)

The VB3 code would be:
Code:
                <if condition="$post['field5'] != 'No'">  <if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if></if>
Reply With Quote
  #16  
Old 01-23-2011, 10:20 AM
Tasking Mickey's Avatar
Tasking Mickey Tasking Mickey is offline
 
Join Date: Jun 2010
Location: United States
Posts: 148
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BirdOPrey5, I used your code, it actually saved. But when I went to my edit options, and put "No" to disable viewing the users ranks in posts, the ranks still showed in posts. Theres a "Yes" option, and a "No" option.

Yes = Show the ranks in the posts
No = Not show the ranks in the posts.
Reply With Quote
  #17  
Old 01-23-2011, 11:55 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Only one of two things then:
It really isn't field5
OR
You didn't make the value of "No" exactly No in the profile field settings. It is case sensitive...

If you still have issue can you try to post a screen shot of your custom profile field edit page?

Oh one more thing is to try is to remove the single quotes in the code, make it $post[field5] rather than $post['field5'].
Reply With Quote
  #18  
Old 01-23-2011, 12:02 PM
Tasking Mickey's Avatar
Tasking Mickey Tasking Mickey is offline
 
Join Date: Jun 2010
Location: United States
Posts: 148
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure,



It shows it's field5 there,

And inside,

Reply With Quote
  #19  
Old 01-23-2011, 12:35 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm... everything looks right...

try this code instead:

Code:
<if condition="$post['rank'] AND $post['field5'] != 'No' "><div class="smallfont">$post[rank]</div></if>
Also just to confirm this is in your postbit or postbit_legacy template, right?
Reply With Quote
  #20  
Old 01-23-2011, 12:39 PM
Tasking Mickey's Avatar
Tasking Mickey Tasking Mickey is offline
 
Join Date: Jun 2010
Location: United States
Posts: 148
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, I'm doing this in the postbit template, not the legacy, and still, when I put your code in, Not taking out the 'AND" of course. I click save, it saves. I go back to a thread, and again, it still shows the ranks, even tho my option in the "Edit Options" is set to No.

Still shows the ranks.
Reply With Quote
Reply

Thread Tools
Display Modes

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 05:58 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09572 seconds
  • Memory Usage 2,253KB
  • Queries Executed 11 (?)
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
  • (2)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete