![]() |
Adding additonal info in postbit
Would this condition still work in vb 4:
PHP Code:
Thanks |
nope but this would
Code:
<vb:if condition="$post['fieldX']"><div class="smallfont">Label for text: {vb:raw post.fieldX}</div></vb:if> |
Thank you
|
I am trying to use this code in a widget and it doesn't work? Any ideas?
Thanks |
So this entry would go under the posts field I assume in the postbit? I need 2 things to show in mine and I planned on making the profile fields for it and mandatory as well.
This code is what I am referring too. Code:
<vb:if condition="$post['fieldX']"><div class="smallfont">Label for text: {vb:raw post.fieldX}</div></vb:if> |
Code:
<vb:if condition="$post['fieldX']"><dt>Level of Care:</dt> <dd>{vb:raw post.fieldX}</dd></vb:if> |
Quote:
postbit or postbit_legacy Then ofcourse REPLACE fieldX where the x is the number of the userfield you created in adminCP, so if you go and create a field now, after done in the userfield manager i would says "EXSAMPLE" field5 and thats what the condition should see, and also what vbraw shows on the screen. If condition here, ONLY shows the content IF the user have something in the field, if the field is blank, then it wont show in the posts. All of this can allso just be dont with a plugin, which i feel is more "clean" and i use that myself. plugins over template edits anyday :D |
Well I asked for the plugin to get updated but I have no issue doing a template edit as the plugin for 3.8 lacked if you were able to choose several options for one field and the text wrap was a bug but fixable.
Thanks for the info so I can start on this in my test forum. |
Quote:
PHP Code:
It's just an alternative way of doing the same thing. |
Thanks I may look into that one first.
--------------- Added [DATE]1262612293[/DATE] at [TIME]1262612293[/TIME] --------------- Quote:
--------------- Added [DATE]1262616491[/DATE] at [TIME]1262616491[/TIME] --------------- Also how would I go about making a notice to users so they know they need to edit their profile as I run a software support and making it mandatory. This way I will not be or need to mass email users. Kind of like a notice to users if condition isn't met is what I am looking for I do believe. |
Just add <strong></strong> tags around the variable i.e.
if($post[field8]) $html .= '<dt>Wii</dt> <dd><strong>'.$post[field8].'</strong></dd>'; That should do that part. For your second question firstly I'd recommend looking at the Field Required option for the profile field (assuming you've used a profile field yea?) If you set that to yes always it forces them to set it before they can use the forums (existing/new members). |
Thanks I didn't try the <strong> but did try <b> and got a syntax error :)
--------------- Added [DATE]1262621512[/DATE] at [TIME]1262621512[/TIME] --------------- Strong html didn't work either but no errors using it. |
i do something like this in plugins
Hook : postbit_display_complete Code:
if (!empty($post["field9"])) might change this number to fit your personal preferences. |
Nice. Is there a way to have the chosen field bold or both fieldx and choice bold?
|
Quote:
Code:
<dd style="font-weight: bold;"> |
Anyone know the correct code for users album link in their postbit?
|
1 Attachment(s)
Guys,
I've been following the useful info in this topic. But I have a little more work I'd like to do on this area. Could you look at the attached pic, and advise me on how to achieve that? RED text request only, I fixed the first problem using Dygear's code. Thanks Steve. |
Quote:
Looks like the community really could use a guide on how to customize post bits, it seems to be in demand. |
All times are GMT. The time now is 05:50 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|