vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Add-On Releases - Country Flag and simcard model and .. (https://vborg.vbsupport.ru/showthread.php?t=228371)

yaghoub 11-18-2009 10:00 PM

Country Flag and simcard model and ..
 
1 Attachment(s)
excuse I am Persian and my English is not good
this mod only work in vbulletin4 and not work on other version and other version have in this site
whit this mod you can show your Country Flag and simcard and your car model and your phone model and …. In user profile
1.you must creat the new fild whit this properties
go to Admin Control Panel / User Profile Fields / Add New User Profile Field.
In window to right click drop down message bar and change to Single Selection Menu
In the User Profile Field, sectiom in Title area call it Country Flag
(a)Discription: Add a country flag to your profile.
(b)Profile Field Category check Uncategorized
(c)Options:Add the Country text file attached, just copy and paste the text file to this field.
(d)Set Default:None
(e)Display Order: should be set by default to next available one write this down will be needed later.
(f)Field Required: Set this to Yes, at registration and profile updating.
(g)Field Editable by user: Yes
(h)Private Field: Check No
(i)Field Searchable on Members List: Check No
(j)Show on Members list: Yes
Option Input:
Allow user to input their own value for this option: No
Max length of allowed user input: 100
Field Length: 25
Regular Expression: Blank
Display Page:
Which page displays this option?: Options:Thread Viewing

2. Upload the Flags File to server be sure to place in /buttons/flags on each skin that you wish to use this on.
3.in the Postbit Legacy of your Template
Locate: {vb:raw post.rank}{vb:raw post.usertitle}
And add below this cod:
<!-- yahoomobil(yaghoub) -->
<img src="{vb:stylevar imgdir_button}/flags/{vb:raw post.field5}.GIF" alt="Users Flag!" border="" />
<!-- yahoomobil(yaghoub) -->
field5 will need to be change to what ever field number was created befor in 1 stage foer example field6 or field7 so the number of field change and You must replice the number of new fild number
((now you can go to ((seetins)) in your site and chose ((edit optins)) and chose your Country Flag
for simcard and phone and …. You must repeat this stage and replice the image white your attachments
the passwor of rar file is: yahoomobil.ir



the vbulletin is the best and the best . we and you must help to is beter

excuseme my internet speed very slow .its dialup so i can not upload my file i tray secend but canot upload my file i upload tex of flag and screensht


mr Lynne can you help me and uoload pictuer of flag and sim here
[ATTACH][ATTACH]Attachment 106406[/ATTACH][/ATTACH]

mondiuk 11-19-2009 04:09 PM

where is the list of flags?

Dr.osamA 11-19-2009 11:37 PM

thxxxxx yaghoub
i try it

Charlie98902 11-20-2009 12:49 AM

Where is all the flags?

Welshy2008 11-20-2009 09:52 PM

1 Attachment(s)
Where is the list of flags?

Would it be possible that you could make my two flag (attached) into the same type as your moving ones please?

Or are you using Corbo's flags?

Flags in (zip) attachments below Guys.

sematopdemir 11-22-2009 06:38 AM

Thanks

steve1966 11-22-2009 04:35 PM

thanks

MikeHolohan 11-23-2009 11:41 AM

not working for me... followed the steps line by line

Welshy2008 11-24-2009 02:38 PM

Quote:

Originally Posted by MikeHolohan (Post 1919449)
not working for me... followed the steps line by line



Not sure if this will work on vB4 but... https://vborg.vbsupport.ru/showthrea...=Country+Flags

Welshy2008 11-24-2009 02:39 PM

Bare with me - I am doing it all step by step for you - Please bare in mind that the version that I am doing the steps for are 3.8.X

Charlie98902 11-24-2009 02:43 PM

I doubt the code will but the graphics will.

Welshy2008 11-24-2009 03:55 PM

1 Attachment(s)
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?!

Charlie98902 11-24-2009 04:20 PM

Thanks Welshy I have this thread tagged.

Welshy2008 11-25-2009 07:21 AM

Your Welcome Charlie, Let me know it it works for you in vB4.

Simmigrant 11-25-2009 01:39 PM

Haha, unbelievable.. I've been searching for this all morning in the search bar.. Download VB 4, check out the mods randomly.. and look what I find :/

Thanks! Installed and Rated ++ ;)

Welshy2008 11-25-2009 01:49 PM

Quote:

Originally Posted by Simmigrant (Post 1920703)
Haha, unbelievable.. I've been searching for this all morning in the search bar.. Download VB 4, check out the mods randomly.. and look what I find :/

Thanks! Installed and Rated ++ ;)

Lol

Charlie98902 11-25-2009 10:58 PM

Can I put all the flags in one folder then upload it and then set it as I set the feildX ID?

Charlie98902 11-25-2009 11:22 PM

OPTIONS.xml where does that go? If I try to import as a product it says invalid file.

bart6767 11-25-2009 11:42 PM

Tryed this and it does not work .

Charlie98902 11-25-2009 11:45 PM

The original isn't anything either the notepad is just a list of all the flags nothing else.

bart6767 11-25-2009 11:52 PM

cant seem to find this

.in the Postbit Legacy of your Template
Locate: {vb:raw post.rank}{vb:raw post.usertitle}

Charlie98902 11-26-2009 12:07 AM

Quote:

Originally Posted by bart6767 (Post 1920955)
cant seem to find this

.in the Postbit Legacy of your Template
Locate: {vb:raw post.rank}{vb:raw post.usertitle}

How did you get the OPTIONS.xml loaded?

yaghoub 11-26-2009 05:08 AM

find this code {vb:raw post.usertitle}

and add after it

bart6767 11-26-2009 08:44 AM

Quote:

Originally Posted by Charlie98902 (Post 1920956)
How did you get the OPTIONS.xml loaded?

(c)Options:Add the Country text file attached, just copy and paste the text file to this field.

Charlie98902 11-26-2009 12:42 PM

Quote:

Originally Posted by Charlie98902 (Post 1920933)
Can I put all the flags in one folder then upload it and then set it as I set the feildX ID?

Quote:

Originally Posted by bart6767 (Post 1921097)
(c)Options:Add the Country text file attached, just copy and paste the text file to this field.

See my quote. I don't want to have a bunch of scattered gif images. Is this possible? I got the profile set up now but need to know about putting all the flags in one folder to keep organized.

cabledr 11-26-2009 12:59 PM

you can put all flags in a folder ie. i have put all flags in images/buttons/flags and they all work you just need the code :-

This puts the flags central under the avatar :)

In the Postbit Legacy template, find this:



HTML Code:

<img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
                </a>
                </vb:if>

Add this after the above:



HTML Code:

<center><br><!-- yahoomobil(yaghoub) -->
<img src="{vb:stylevar imgdir_button}/flags/{vb:raw post.field#}.GIF" alt="Users Flag!" border="" />
<!-- yahoomobil(yaghoub) --></br></center>

change # to your field number
I have uploaded flags to here as they was to big for one here :-
Code:

http://gadsx.co.uk/flags.rar

bart6767 11-26-2009 01:31 PM

I cant get the flags to show up ?

Charlie98902 11-26-2009 01:41 PM

Using posbit as I like that one and getting this.

The following error occurred when attempting to evaluate this template:

The conditional on line 135 appears to be missing its beginning tag (<if>). This may cause unexpected behavior.


This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

This is the trailing </if> that is causing this.

Code used:

Code:

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

It just says users flag under the username when I remove the trailing </if>

If I use this

Code:

<br><!-- yahoomobil(yaghoub) -->
<img src="{vb:stylevar imgdir_button}/flags/{vb:raw post.field11}.GIF" alt="Users Flag!" border="" />
<!-- yahoomobil(yaghoub) --></br>

same thing.

Welshy2008 11-26-2009 02:17 PM

Hi Charlie,


You need to add a folder called "buttons" in your images folder. images/buttons


You are supposed to add ALL the contents of the 3 folders (zips) that in my attachment Here into the one folder named "buttons".

Welshy2008 11-26-2009 02:17 PM

Quote:

Originally Posted by Charlie98902 (Post 1921192)
Using posbit as I like that one and getting this.

The following error occurred when attempting to evaluate this template:

The conditional on line 135 appears to be missing its beginning tag (<if>). This may cause unexpected behavior.


This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

This is the trailing </if> that is causing this.

Code used:

Code:

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

It just says users flag under the username when I remove the trailing </if>

If I use this

Code:

<br><!-- yahoomobil(yaghoub) -->
<img src="{vb:stylevar imgdir_button}/flags/{vb:raw post.field11}.GIF" alt="Users Flag!" border="" />
<!-- yahoomobil(yaghoub) --></br>

same thing.



Have you got a screenshot of what you have doen so far?

Charlie98902 11-26-2009 02:23 PM

1 Attachment(s)
Yes I get this:

Welshy2008 11-26-2009 02:24 PM

The contents of the OPTIONS.XML file are to be Copied and Pasted into the "Options" section of your Add new user profile field, as I described in my post #12. The list was too long for me to add to the thread. These are the options that your member will see (Drop down Menu) when he or she registers or Edits their Profile.


THE OPTIONS.xml IS NOT to be uploaded as a file. Just copy and paste its content into the Options as described above.

Charlie98902 11-26-2009 02:27 PM

Thanks I will try that now. I tried to upload it :D

Welshy2008 11-26-2009 02:30 PM

I can see that there is a stray ] in the code I gave - I am no coder, but could that give an error too?

that trailing </if> has to be inserted somewhere to close it, Yes?

Charlie98902 11-26-2009 02:31 PM

Nope I have done that after all. It just says User Flags! still though. As you see I added the flag path in the first code but can't use it as I get the </if> condition error. If I remove it all is well but no flags show in the posts.

Charlie98902 11-26-2009 02:32 PM

Quote:

Originally Posted by Welshy2008 (Post 1921227)
I can see that there is a stray ] in the code I gave - I am no coder, but could that give an error too?

that trailing </if> has to be inserted somewhere to close it, Yes?

I would think so as well as it begins with if condition.

Charlie98902 11-26-2009 02:35 PM

Okay took out the </if> and instead of users flag! it now says Country:

So we are close somewhere to make this work in postbit.

Welshy2008 11-26-2009 02:37 PM

Can you PM me Your forum Address please?

Welshy2008 11-26-2009 02:46 PM

There is No square with a red X in it - is there?

Charlie98902 11-26-2009 02:46 PM

This is on a test site. I can post the resulting code.

This is in the postbit and I posted a bit of code before and after this is the default code besides the flag code.

Code:

                                                <span class="username guest">{vb:raw post.username}</span>
                                        </vb:if>
                                        <span class="usertitle">
                                                {vb:raw post.usertitle}
<!--  Flags Start  -->
<if condition="$post['field7']">
        Country: <img src="http://www.Your ForumAddress.com/images/buttons/Flags/$post[field7].GIF"/>
<!--//  Flags End  -->
                                        </span>
                                        {vb:raw template_hook.postbit_userinfo_left}
                                        <vb:if condition="$show['reputation']">
                                                <span class="postbit_reputation" id="repdisplay_{vb:raw post.postid}_{vb:raw post.userid}">{vb:raw post.reputationdisplay}</span>
                                        </vb:if>

Here is the image path to my flags:

I found a mistake I made corrected in in the image path code but still no go.

/ public_html / testvb / images / buttons / Flags / Flags /

The second flags is the folder with all the gifs. Should I move them to the first flags folder?


All times are GMT. The time now is 08:40 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.01423 seconds
  • Memory Usage 1,841KB
  • 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
  • (10)bbcode_code_printable
  • (2)bbcode_html_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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