vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   little style fix needed (https://vborg.vbsupport.ru/showthread.php?t=302601)

ForceHSS 09-24-2013 06:09 PM

little style fix needed
 
1 Attachment(s)
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: Yes
Optional 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 EMPTY
Display 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 Team
SAVE


STEP 3; Postbit_Legacy Template

Find:
Code:

<vb:if condition="$post['joindate']"><dt>{vb:rawphrase join_date}</dt> <dd>{vb:raw post.joindate}</dd></vb:if>
Add below
Code:

<!-- 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 11: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:

PHP Code:

<!-- 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 08: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/show...=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 10:08 AM

Quote:

Originally Posted by ForceHSS (Post 2447860)
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/show...=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:

Code:

<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 10:36 AM

I tried these
PHP Code:

<!-- 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
PHP Code:

<!-- 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 10:53 AM

Quote:

Originally Posted by ForceHSS (Post 2447885)
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 [DATE]1380110482[/DATE] at [TIME]1380110482[/TIME] ---------------

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 11:04 AM

PHP Code:

<!-- 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/show...=1#post2005099

fxdigi-cash 09-25-2013 11:07 AM

Quote:

Originally Posted by ForceHSS (Post 2447896)
PHP Code:

<!-- 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/show...=1#post2005099

This is not correct, the correct one is this:

PHP Code:

<!-- 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 11: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 11:13 AM

Quote:

Originally Posted by ForceHSS (Post 2447899)
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.


All times are GMT. The time now is 11:32 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.01407 seconds
  • Memory Usage 1,775KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (6)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete