Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
Dynamic License Plate & Text in Postbit. Details »»
Dynamic License Plate & Text in Postbit.
Version: 1.00, by demo7up demo7up is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.0.0 Rating:
Released: 12-03-2011 Last Update: Never Installs: 6
Template Edits
 
No support by the author.

~~~~~MARK INSTALLED~~~~~~


Here is it is for all Car Enthusiast Site's all i ask is that you link back to my site in way, shape or form. Site: http://www.nycjdm.com Or please throw a donation my way I will not help support this unless you have marked this installed, can either send me a link with the link back to my site or have placed a donation.

This Mod should work for any vB 4.+

So first we need to setup the CSS for the custom div that positions the License Plate & Text

so
1. Navigate to Admin CP => Styles & Templates => Style Manager => Edit Templates => CSS Templates => additional.css

At the bottom of this file add (you can change the css to match your site width etc..

Code:
div.jdm_plate{
height:66px;
}
div.jdm_plate p {
padding-top: 25px;
margin: 0 auto;
font-size:24px;
text-transform:uppercase;
color:black;
}
2. Navigate to AdminCP => User Profile Fields =>Add New User Profile Field

You will need to create 2 fields, one to Select License Plates the Other to Add the Text to it.

So create the first custom field we will call this x (make sure u get the field id)
Code:
Profile Field Type: Single Selection Menu

Title: License Plate

Description: Please choose your License Plate from the drop down list above. If you do not see yours listed please request them <a href="www.yoursite.com/your_forum_for_requests">here.</a>
<br/>

<img src="path-to/license_plates/Japan.png" alt="Japan" />
<img src="path-to/license_plates/New_York.png" alt="NY" />

Options: Now this is case sensitive and each option must be named exactly like the corresponding image so for me its: 

Japan
New_York

The Second Profile Field we will call y (make sure u get the field id)

Profile Field Type: Single-Line Text

Title: License Plate Text

Description: Enter your License Plate Text Here.

Max length of allowed user input: 6 or 7

Default Value: What ever you want up to 6 or 7 Characters.


Now save that ... Hopefully you have both Field Id's and now on to the next step




3. Navigate to Admin CP => Styles & Templates => Style Manager => Edit Templates => Postbit Templates => postbit_legacy

find and place code between the code in the box or place it where you would like it to show in the post bit.

Code:
</vb:if> 
{insert bottom code here}
<vb:if condition="$post['userid']">
Display Code make sure you change the X and Y to the correct profile id's

Code:
<vb:if condition="$post['userid']">
<vb:if condition="$post['fieldxx']">

    <div class="jdm_plate" style="background-image:url(http://path-to/license_plates/{vb:raw post.fieldxx}.png);">
<p><b>{vb:raw post.fieldyy}</b></p>
</div>
</vb:if> 
</vb:if>
Note: Blank License Plates can be found @ http://www.blankplates.com/

Screenshots

File Type: png image1.png (32.4 KB, 0 views)
File Type: jpg image2.jpg (31.3 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 12-04-2011, 10:48 PM
demo7up demo7up is offline
 
Join Date: Apr 2007
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

reserved
Reply With Quote
  #3  
Old 12-05-2011, 03:10 AM
bosanci28's Avatar
bosanci28 bosanci28 is offline
 
Join Date: Feb 2008
Location: USA - West Coast
Posts: 271
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi,and thanks for this,

any clue why i get this:?

if i take avatar out ,there are 6 plates numbers,

also my plates are in .jpg

thanks

>>>>>>>>>>>>>>>>>>>>>>>>>

update:

i manage to fix it:


find this in postbit_legacy

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

and add above the code from first post or main post! (change path to whatever you want where you put your pictures
and also the field X and Y !)


Code:
</vb:if> 


<vb:if condition="$post['userid']">
<vb:if condition="$post['fieldXX']">


    <div class="jdm_plate" style="background-image:url(http://www.yoursite.com/images/buttons/plates/{vb:raw post.fieldXX}.jpg);">
<p><b>{vb:raw post.fieldYY}</b></p>
</div>
</vb:if> 
</vb:if>

<vb:if condition="$post['userid']">

and in my case or my forum skin that i have , i used this code :

Code:
div.jdm_plate{
height:93px;
}
div.jdm_plate p {
padding-top: 35px;
padding-left: 35px;
font-size:24px;
text-transform:uppercase;
color:black;
}
and my blank plates are re-sized to 180x90 .jpg

thanks

(sorry for the codes added just in case other people have the same problem
like i had in my case.)
Attached Images
File Type: png 12-4-2011 8-08-37 PM.png (24.8 KB, 0 views)
File Type: png 12-4-2011 10-06-23 PM.png (49.0 KB, 0 views)
Reply With Quote
  #4  
Old 12-05-2011, 11:51 AM
demo7up demo7up is offline
 
Join Date: Apr 2007
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im glag you were able to get it to work. No sweat if it helps others #whynot lol
Reply With Quote
  #5  
Old 12-05-2011, 07:25 PM
duketxboy duketxboy is offline
 
Join Date: Apr 2011
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no luck with it here
Reply With Quote
  #6  
Old 12-05-2011, 07:30 PM
demo7up demo7up is offline
 
Join Date: Apr 2007
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by duketxboy View Post
no luck with it here
what seems to be the issue? what step isnt working? Also if you have tried to install it please mark as installed and i will help you set it up correctly.
Reply With Quote
  #7  
Old 12-05-2011, 07:35 PM
bosanci28's Avatar
bosanci28 bosanci28 is offline
 
Join Date: Feb 2008
Location: USA - West Coast
Posts: 271
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there a way in my case on the code above ,to <center> the text?
like if you put "M5" to be in the middle !... i mean to auto align , if one letter was entered to be in the middle ,
because if i add only like this:

Code:
</vb:if> 


<vb:if condition="$post['userid']">
<vb:if condition="$post['field46']">


    <div class="jdm_plate" style="background-image:url(http://www.forum.dynavin.us/digitalvb/morbid/buttons/plates/{vb:raw post.field46}.jpg);">
<center><p><b>{vb:raw post.field47}</b></p>
</div>
</vb:if> 
</vb:if>

<vb:if condition="$post['userid']">
will start from the middle...

if 1,2,3,4,5,6,7 letters to auto center itself... if possible...

thanks
Reply With Quote
  #8  
Old 12-05-2011, 07:49 PM
demo7up demo7up is offline
 
Join Date: Apr 2007
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bosanci28 View Post
is there a way in my case on the code above ,to <center> the text?
like if you put "M5" to be in the middle !... i mean to auto align , if one letter was entered to be in the middle ,
because if i add only like this:

Code:
</vb:if> 


<vb:if condition="$post['userid']">
<vb:if condition="$post['field46']">


    <div class="jdm_plate" style="background-image:url(http://www.forum.dynavin.us/digitalvb/morbid/buttons/plates/{vb:raw post.field46}.jpg);">
<center><p><b>{vb:raw post.field47}</b></p>
</div>
</vb:if> 
</vb:if>

<vb:if condition="$post['userid']">
will start from the middle...

if 1,2,3,4,5,6,7 letters to auto center itself... if possible...

thanks
Please mark as installed! Also It should be auto centering the text. After you mark as installed send me the link to your site any page with the license plate enabled. And ill check it out.
Reply With Quote
  #9  
Old 12-05-2011, 07:53 PM
bosanci28's Avatar
bosanci28 bosanci28 is offline
 
Join Date: Feb 2008
Location: USA - West Coast
Posts: 271
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i marked install yesterday !...friend.

post 7 thats my code....that i have right now... and the .css from above post.

thanks
Reply With Quote
  #10  
Old 12-05-2011, 08:01 PM
demo7up demo7up is offline
 
Join Date: Apr 2007
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

okay what i think u need to do is

in the css replace

Code:
padding-left: 35px;
with

Code:
margin: 0 auto;
that should do it. Let me know if that works for you.
Reply With Quote
Благодарность от:
bosanci28
Reply

Thread Tools

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 09:09 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.04229 seconds
  • Memory Usage 2,330KB
  • Queries Executed 24 (?)
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
  • (11)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (4)postbit_attachment
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • 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
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete