Thread: Add-On Releases - Country Flag and simcard model and ..
View Single Post
  #12  
Old 11-24-2009, 03:55 PM
Welshy2008's Avatar
Welshy2008 Welshy2008 is offline
 
Join Date: Jul 2008
Location: UK
Posts: 904
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK Guys - you can try the following:

Firstly “Upload” ALL the Flag GIF pics to your forum root /images/buttons folder.

Then in your Admin Control Panel (ACP), please do the following:
ACP -> User Profile Fields -> Add New User Profile Field ->Profile Field Type -> Single-Selection Menu (select ‘Single-Selection Menu’ from the Drop-Down Menu) -> Please enter the following into the following fields (REMEMBER to make a note of the FieldID, because you will need to replace ALL the X’s in [fieldX] with it!!!

Add New User Profile Field Single-Selection Menu:
Title = Country Flag
Description = Add your country flag to your profile:
Profile Field Category = (Uncategorized)
Options = Copy & Paste the Whole contents of the file attached below (OPTIONS)
Set Default = None
Display Order = You Select this (dependant on how many you already have)
Field Required = yes, at registration and profile updating
Field Editable by User = Yes
Private Field = No
Field Searchable on Members List = No
Show on Members List = Yes

Optional Input:
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 Blank

Display Page:
Which page displays this option? = Edit Your Details

** SAVE **

ACP -> Styles & Templates -> Style Manager -> <<>> -> Postbit Templates -> select the template that you use (ie Postbit or Posbit_legacy) – I use Postbit…

Find:

Code:
$vbphrase[posts]: $post[posts]
Add Below:

Code:
<!--  Flags Start  -->
<if condition="$post['field11']">
	Country: <img src="http://www.Your ForumAddress.com/images/buttons/$post[fieldX].GIF"/></if>
<!--//  Flags End  -->



FOR vB4 Beta - This code will add Alt Text to your Flag on mouseover.

Find:

Code:
</vb:if>
					<span class="usertitle">
						{vb:raw post.usertitle}
ADD Below:

Code:
<!-- Country Flags Start -->
<vb:if condition="$post['fieldX']">
	Country: <img src="http://www.yourforumaddress.com/images/buttons/$post[field1X].GIF" alt="Users Flag on yourforumnamehere!" border="" />
</vb:if>
<!--// Country Flags End -->

** SAVE TEMPLATE **


** Replace the ‘X’ with your FieldID number **


That should work for you?!
Attached Files
File Type: xml OPTIONS.xml (90.6 KB, 73 views)
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01395 seconds
  • Memory Usage 1,797KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete