View Full Version : little style fix needed
ForceHSS
09-24-2013, 05:09 PM
What I have done so far
Field: Single-Selection Menu
Title: My Team:
Description: Please Select your My Team
Profile Field Category: Uncatagorized
Options: test1, test2 putting this for now until i get this right
Set Default: None
Display Order: (Chosen By You)
Field Required: Yes, at registration & profile updating (You don’t have to make it compulsory)
Field Editable By User: Yes
Private Field: No
Field Searchable On Members List: Yes
Show On Members List: YesOptional Output:
Allow User to input their own value for this option: No
Max length of allowed user input: 100
Field Length: 25
Regular Expression: Leave this EMPTYDisplay Page:
Which page displays this option? Edit Profile
STEP 2; Add a Phrase:
AdminCP -> Languages & Phrases -> Phrase Manager -> Add New Phrase (Center button on the bottom):
Phrase Type: GLOBAL
Product: vBulletin
Varname: my_team
Text: MY TeamSAVE
STEP 3; Postbit_Legacy Template
Find:
<vb:if condition="$post['joindate']"><dt>{vb:rawphrase join_date}</dt> <dd>{vb:raw post.joindate}</dd></vb:if>Add below
<!-- My Team in postbit_legacy Start -->
<vb:if condition="$post['field5']"><dt>{vb:rawphrase my_team}</dt> <dd><img src="{vb:stylevar imgdir_misc}/{vb:raw post.field5}.gif" alt="{vb:raw post.field5}" /></dd></vb:if>
<!-- My Team in postbit_legacy End -->
Ok my small problem is it does not blend in with the skin and needs moved over a small bit to the left if any one can help and were to put the code am thinking of one place but not sure
fxdigi-cash
09-24-2013, 10:44 PM
I believe you mean the custom field there is missing the style. if this is what you are after, then make sure what postbit_legacy class is used for the common fields.
if you provide a link to your site, I may help you with that.
if not, then use Chrome inspection element to see what class you need to add to your custom field and add a div to that class i.e:
<!-- My Team in postbit_legacy Start -->
<vb:if condition="$post['field5']"><div class="your_common_style_name"><dt>{vb:rawphrase my_team}</dt> <dd><img src="{vb:stylevar imgdir_misc}/{vb:raw post.field5}.gif" alt="{vb:raw post.field5}" /></dd></div></vb:if>
<!-- My Team in postbit_legacy End -->
Good luck
ForceHSS
09-25-2013, 07:37 AM
here is a link to a post that has it but its not showing the image in IE so need to remove that but when i do from the code it still shows
http://www.anygivensaturday.com/showthread.php?136067-Registration-Troubles&p=2005099&viewfull=1#post2005099
I need to remove the image part of this code but when I do it messes up or does not remove it any help from anyone
fxdigi-cash
09-25-2013, 09:08 AM
here is a link to a post that has it but its not showing the image in IE so need to remove that but when i do from the code it still shows
http://www.anygivensaturday.com/showthread.php?136067-Registration-Troubles&p=2005099&viewfull=1#post2005099
I need to remove the image part of this code but when I do it messes up or does not remove it any help from anyone
ok, as I thought that was the issue.
it is very simple, all you need is to find the template where you can edit this, and usually that is postbit_legacy
Then you need to remove the image between <dd></dd>
after that, add this to your custom field:
<div class="bppostbit"><dt>My Team:</dt><dd>{vb:raw post.fieldX}</dd></div>
change the X to your field id number.
and that's it.
if there is something else, post it here. :)
Good luck
ForceHSS
09-25-2013, 09:36 AM
I tried these
<!-- My Team in postbit Start -->
<vb:if condition="$post['field5']"><dt>{vb:rawphrase my_team}</dt> <dd></dd></vb:if>
<!-- My Team in postbit End -->and
<!-- My Team in postbit Start -->
<vb:if condition="$post['field5']"><dt>{vb:rawphrase my_team}</dt> </vb:if>
<!-- My Team in postbit End -->
fxdigi-cash
09-25-2013, 09:53 AM
When you say add that to the custom field do you mean the template or title on the profile field
well, when you create a custom field, an id number for a custom field will be generated. you can use that id to place it in your <dl></dl> code.
so it is for template result because the title is fixed, not variable
like this:
<div class="bppostbit"><dt>My Team:</dt><dd>{vb:raw post.fieldX}</dd></div>
so basically what you will need to change only X which is field number i.e {vb:raw post.field8}
is it clear now? if not, I will try to add screenshot to clarify it deeper
:)
--------------- Added 1380110482 at 1380110482 ---------------
ok, when you go to postbit_legacy, you will find few divs with the same name, i.e: <div class="bppostbit">
These ones where you need to look at and how they are arranged. The custom field you have there is only
<dt>My Team</dt><dd><img src="xxxxxxxxxxx/Test 1.gif" alt="Test 1" title="Test 1"></dd>
The above code will surly make a mess because it is not wrapped with a div
so that's why it is correct to make it like this:
<div class="bppostbit"><dt>My Team:</dt><dd>{vb:raw post.field5}</dd></div>
I don't think it is a good idea to use profile manager to write such code. there you create only a custom field and use that custom field to place it with the code in postbit_legacy template.
if you are still confused, send me your postbit_legacy code template as PM and I will make the modification and send it back to you ASAP.
ForceHSS
09-25-2013, 10:04 AM
<!-- My Team in postbit Start -->
<vb:if condition="$post['field5']"><dt>{vb:rawphrase my_team}</dt> <div class="bppostbit"></dt><dd>{vb:raw post.field5}</div></vb:if>
<!-- My Team in postbit End -->
last one I tried still messed in IE but in firefox it needs down a bit you can see here
http://www.anygivensaturday.com/showthread.php?136067-Registration-Troubles&p=2005099&viewfull=1#post2005099
fxdigi-cash
09-25-2013, 10:07 AM
<!-- My Team in postbit Start -->
<vb:if condition="$post['field5']"><dt>{vb:rawphrase my_team}</dt> <div class="bppostbit"></dt><dd>{vb:raw post.field5}</div></vb:if>
<!-- My Team in postbit End -->
last one I tried still messed in IE but in firefox it needs down a bit you can see here
http://www.anygivensaturday.com/showthread.php?136067-Registration-Troubles&p=2005099&viewfull=1#post2005099
This is not correct, the correct one is this:
<!-- My Team in postbit Start -->
<vb:if condition="$post['field5']"><div class="bppostbit"><dt>{vb:rawphrase my_team}</dt><dd>{vb:raw post.field5}</dd></div></vb:if>
<!-- My Team in postbit End -->
ForceHSS
09-25-2013, 10:11 AM
that helped in firefox but for some reason in IE it still shows its missing a image and I dont want any image
fxdigi-cash
09-25-2013, 10:13 AM
that helped in firefox but for some reason in IE it still shows its missing a image and I dont want any image
ok, if you need an image, make sure about the image path url because this is what most of the times the issue.
ForceHSS
09-25-2013, 10:14 AM
Got it now in IE to work. Thank you for your help if you need anything done any time pm me
fxdigi-cash
09-25-2013, 10:39 AM
Glad things worked for you.
Good luck, :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.