PDA

View Full Version : Country Flag and simcard model and ..


yaghoub
19 Nov 2009, 15:01
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
106406

mondiuk
19 Nov 2009, 18:09
where is the list of flags?

Dr.osamA
20 Nov 2009, 01:37
thxxxxx yaghoub
i try it

Charlie98902
20 Nov 2009, 02:49
Where is all the flags?

Welshy2008
20 Nov 2009, 23:52
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
22 Nov 2009, 08:38
Thanks

steve1966
22 Nov 2009, 18:35
thanks

MikeHolohan
23 Nov 2009, 13:41
not working for me... followed the steps line by line

Welshy2008
24 Nov 2009, 16:38
not working for me... followed the steps line by line



Not sure if this will work on vB4 but... http://www.vbulletin.org/forum/showthread.php?t=180741&page=6&highlight=Country+Flags

Welshy2008
24 Nov 2009, 16:39
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
24 Nov 2009, 16:43
I doubt the code will but the graphics will.

Welshy2008
24 Nov 2009, 17:55
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Add Below:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------






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

Find:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



ADD Below:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------




** SAVE TEMPLATE **


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


That should work for you?!

Charlie98902
24 Nov 2009, 18:20
Thanks Welshy I have this thread tagged.

Welshy2008
25 Nov 2009, 09:21
Your Welcome Charlie, Let me know it it works for you in vB4.

Simmigrant
25 Nov 2009, 15:39
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
25 Nov 2009, 15:49
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
26 Nov 2009, 00:58
Can I put all the flags in one folder then upload it and then set it as I set the feildX ID?

Charlie98902
26 Nov 2009, 01:22
OPTIONS.xml where does that go? If I try to import as a product it says invalid file.

bart6767
26 Nov 2009, 01:42
Tryed this and it does not work .

Charlie98902
26 Nov 2009, 01:45
The original isn't anything either the notepad is just a list of all the flags nothing else.

bart6767
26 Nov 2009, 01:52
cant seem to find this

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

Charlie98902
26 Nov 2009, 02:07
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
26 Nov 2009, 07:08
find this code {vb:raw post.usertitle}

and add after it

bart6767
26 Nov 2009, 10:44
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
26 Nov 2009, 14:42
Can I put all the flags in one folder then upload it and then set it as I set the feildX ID?

(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
26 Nov 2009, 14:59
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:





Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


Add this after the above:





Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



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


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

bart6767
26 Nov 2009, 15:31
I cant get the flags to show up ?

Charlie98902
26 Nov 2009, 15:41
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


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

If I use this



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


same thing.

Welshy2008
26 Nov 2009, 16:17
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 (http://www.vbulletin.org/forum/showpost.php?p=1918023&postcount=5) into the one folder named "buttons".

Welshy2008
26 Nov 2009, 16:17
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


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

If I use this



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


same thing.



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

Charlie98902
26 Nov 2009, 16:23
Yes I get this:

Welshy2008
26 Nov 2009, 16:24
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 (http://www.vbulletin.org/forum/showpost.php?p=1920217&postcount=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
26 Nov 2009, 16:27
Thanks I will try that now. I tried to upload it :D

Welshy2008
26 Nov 2009, 16:30
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
26 Nov 2009, 16:31
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
26 Nov 2009, 16:32
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
26 Nov 2009, 16:35
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
26 Nov 2009, 16:37
Can you PM me Your forum Address please?

Welshy2008
26 Nov 2009, 16:46
There is No square with a red X in it - is there?

Charlie98902
26 Nov 2009, 16:46
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



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?

Charlie98902
26 Nov 2009, 16:47
There is No square with a red X in it - is there?

No there isn't.

Welshy2008
26 Nov 2009, 16:49
Move all the Flag GIFs to the "buttons" folder and forget about the two flas folders Charlie.

;)

MikeHolohan
26 Nov 2009, 16:53
finally got this to work... thanks...

thanks to you too Welshy2008, you were a big help...

Welshy2008
26 Nov 2009, 16:55
You're Welcome Mike,

I'm happy to put back into the vB.org community - I have taken enough out of it. :|

bart6767
26 Nov 2009, 16:58
Good to see you got it to work and can you post up everything you did to get it right ?

Charlie98902
26 Nov 2009, 16:59
Okay saw a bit I forgot to edit. The field # did that and in firefox there's nothing but in IE there is a red x. I don't want the flag gifs to be scattered. Can I not use the folder flags?

Now the code was edited to: / public_html / testvb / images / buttons / Flags /

Still as mentioned in this post.

Welshy2008
26 Nov 2009, 16:59
Charlie, Have you changed the Green code bit below, on your forum




Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Welshy2008
26 Nov 2009, 17:04
Charlie it is the address that is wrong.

The only reason that I put them in three folder is that as ONE folder - it was too bid to Upload, I could only do it in three.

Like I mentioned above take ALL of the flags out of EACH of the three folders and store them ALL in the "buttons" folder. DO not put the three seperate folders in the Buttons folder! ONLY the contents of each.

If you do that and then add the following - it should work on you test forum...



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Charlie98902
26 Nov 2009, 17:05
Yes getting red x in IE8 and nothing but Country: in firefox.

Code now as it is in my template.



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



I can only assume that you must absolutly must put the gifs in the buttons folder with no folder for the flags?

Welshy2008
26 Nov 2009, 17:05
On the red x, Charlie, if you right click it, it will show the route that you have the flag.GIFs stored.

It has to the same as my code in the post above.

Welshy2008
26 Nov 2009, 17:09
I can only assume that you must absolutly must put the gifs in the buttons folder with no folder for the flags?


That is EXACTLY right and what I have been saying in my posts. Can You do That and get back to me, Charlie?

Charlie98902
26 Nov 2009, 17:11
Says this:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Charlie98902
26 Nov 2009, 17:11
That is EXACTLY right and what I have been saying in my posts. Can You do That and get back to me, Charlie?

Yes I can but wanted to avoid this option.

Welshy2008
26 Nov 2009, 17:19
Says this:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------





Do you realise that you have TWO testvb in there?

I do not understand why you do not want them all in the same "Buttons" folder, Sorry?

Charlie98902
26 Nov 2009, 17:20
Okay the same thing and now all the gifs are in the buttons folder.



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



I did use F5 and did a hard cache too. Yes and I edited that out too.

Charlie98902
26 Nov 2009, 17:30
Here is something that may be the issue?

I am on my test forum so the URL is ending in .com/testvb. the image path is /testvb/images/buttons that is why the testvb was in there twice but I took it out with the same results.

Welshy2008
26 Nov 2009, 17:31
Is your [fieldidX] field 7 or 11 Charlie. You posted 7 earlier and your last few posts say 11.

Charlie98902
26 Nov 2009, 17:32
Is your [fieldidX] field 7 or 11 Charlie. You posted 7 earlier and your last few posts say 11.

field11 is what it says.

Welshy2008
26 Nov 2009, 17:32
If you are happy to set up a temporary account for me with Admin permissions - I would be happy to take a look for you.

Welshy2008
26 Nov 2009, 17:34
You have put all flags in the "buttons" folder? There are no sub folders with the flags shared between them within the buttons folder - no?

Charlie98902
26 Nov 2009, 17:35
Sent and this is the url - http://www.dvdnextcopysupportforum.com/testvb

Charlie98902
26 Nov 2009, 17:36
That is correct no folder labeled flags now.

LordDB
26 Nov 2009, 18:41
ensure you have the correct spelling of the image 'button or buttons folder! Use this:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



worth adding also about 'GIF or gif' check it if you have the red 'x' showing...then it'll show you the image path!

Charlie98902
26 Nov 2009, 18:47
This is what is used now as the flag.gif are in the button folder only now.


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

LordDB
26 Nov 2009, 19:04
change:

$post[field11].GIF

to:

$post[field11].gif

Charlie98902
26 Nov 2009, 19:06
But all the gif flags are labeled GIF?

Charlie98902
26 Nov 2009, 19:25
Thanks everyone but to be honest this is more hassle than it is worth to be honest. Just not going to use it. Might try another one if another mod gets posted.

Welshy2008
26 Nov 2009, 20:35
FOR vB4 Beta - This code will add Alt Text to your Flag on mouseover.

Find:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



ADD Below:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------




** SAVE TEMPLATE **


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


That should work for you?!

Welshy2008
26 Nov 2009, 20:40
Charlie, It's a shame - all it would have took is a look in your root directory and it would have been up and running. I can almost guarantee that you have put them in a wrong root folder somewhere.

It is a common mistake, and one that I have done in the past too.


Not to worry though Mate.

Charlie98902
26 Nov 2009, 20:43
It is fine thanks for the efforts.

bart6767
26 Nov 2009, 22:18
FOR vB4 Beta - This code will add Alt Text to your Flag on mouseover.

Find:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



ADD Below:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------




** SAVE TEMPLATE **


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


That should work for you?!

I tryed this and all i get is a red X

LordDB
26 Nov 2009, 22:57
But all the gif flags are labeled GIF?

check in your 'flags' folder and see if the flag images end in '.gif
', if they do, then change GIF to gif

not this:

flags/{vb:raw post.field5}.GIF

but:

flags/{vb:raw post.field5}.gif

make sure your root image path is correct, too!

Charlie98902
26 Nov 2009, 23:14
I will at a later time as I have this thread bookmarked. Doing some other things currently.

bart6767
26 Nov 2009, 23:42
Ok i got this code to work .



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



It works fine but how do i stop the red x showing up for members who have not picked a flag ?

Welshy2008
27 Nov 2009, 10:40
daPLAYBOY ALL the flags end in .GIF

Welshy2008
27 Nov 2009, 10:40
daPLAYBOY ALL the flags end in .GIF

Welshy2008
27 Nov 2009, 10:43
Ok i got this code to work .



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



It works fine but how do i stop the red x showing up for members who have not picked a flag ?

Have you got the 'Set Default' as "None"? OR make it compulsory?!

LordDB
27 Nov 2009, 11:11
uppercase or lowercase? you decide! :)

@Welshy2008 I'm using my own 3D flags which are smaller and have lowercase .gif...not what's posted!

here's a link to download 3D flags:

http://www.3dflags.com/world/

bart6767
27 Nov 2009, 11:13
Have you got the 'Set Default' as "None"? OR make it compulsory?!

Its set to none.

bart6767
27 Nov 2009, 14:27
Have you got the 'Set Default' as "None"? OR make it compulsory?!

How can i fix this so that flags dont show up a red x if a member has not picked a flag ?

This is the code that im useing . and i have done every thing in post 1 .



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

LordDB
27 Nov 2009, 16:47
How can i fix this so that flags dont show up a red x if a member has not picked a flag ?

This is the code that im useing . and i have done every thing in post 1 .



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Go to ACP --> User Profile Fields --> User Profile Field Manager - then choose the flag profile name you used and EDIT then scroll down User Profile Field, then you set Field Required as: Yes, Always

this means all users will have to choose one!;)

bart6767
27 Nov 2009, 20:47
Go to ACP --> User Profile Fields --> User Profile Field Manager - then choose the flag profile name you used and EDIT then scroll down User Profile Field, then you set Field Required as: Yes, Always

this means all users will have to choose one!;)

Thanks .

Vaupell
28 Nov 2009, 13:45
I really wish post 1 would be updated, reading through all of these solutions or ALMOST solutions is just a pain..

should make a java script selection, and just dump it in registration and profile edit templates.
and just save the selection <name> and call it when needed in postbit.
keep it local, instead of calling all those external links to run.


but a nice idead, that used to work on 3.x :D

Ranger375
28 Nov 2009, 13:49
Yeah, this is confusing. Someone should just make a new mod thread

Mo7mD.ZaYOnA
03 Dec 2009, 22:18
Thank you Welshy2008 (http://www.vbulletin.org/forum/member.php?u=265951)
The subject does not have to attach anything except example!!

Welshy2008
04 Dec 2009, 16:31
Cracked it.


I will post it as a mod later. (will be easier to read etc)

Works on vB4 Beta 4.

COL NIL SATIS
08 Jan 2010, 19:28
is this ready to go now!!!

princeedward
03 Mar 2010, 20:22
My Code For This

...IMHO the better way...and to show which country belong the flag image....coz i or we dont know them all...do you? :p

change the red one to your correct field number



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



http://i47.tinypic.com/102nn2d.png

napy8gen
22 Apr 2010, 05:20
@Welshy2008 this mod like you posted in first page is not working because the generated name is full name of the country.GIF

BUT the animated gifs names are different.