PDA

View Full Version : State Flags


Lamby1973
22 Dec 2005, 19:01
For this, its exactly the same as the Country Flag hack, however this shows where abouts you live.

IE....
Flag > England
State Flag > Yorkshire/Northumberland....etc etc

You dont need to have the Country Flag addon installed on your board to use this, this is totally seperate.

I have tested this an it worked on my 3.5.2 board. It should work on any version of 3.5 :)

Any bugs or quieres then just let me know, ill try my best to help you out :)

Jon

mholtum
22 Dec 2005, 20:31
Installed.. Easy money. thank you!

Lamby1973
22 Dec 2005, 21:01
Your Welcome!

bashy
22 Dec 2005, 21:51
hi

I cannot find
<div>
$vbphrase[posts]: $post[posts]
</div>
in either postbit nor postbit legacy, what do i do with this code now lol

I have searched all the way through, I have like 70 other modifications done to my board so this code may have been modded already!!

Bashy

bashy
22 Dec 2005, 22:06
I have just dumped the code anywhere in legacy and it sort of works...
the flags arnt showing though...
Theres not even any place holders for the pics to show that they are in the wrong place or out like that :(

Any thoughts?

Bashy

Lamby1973
22 Dec 2005, 22:43
Your pictures should have been uploaded to your images file as stated in the install file....least i think i put it in there.

And i would have said if you cant find that then look for this:

<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div></if>

And place it above it.

bashy
22 Dec 2005, 22:49
Hi

No ya didnt say that in the instructions :)

will try it though thanks


State Flag Mod for vb 3.5
This hack shows user's state flag (Where abouts in there country they come from) in postbit, below the user name or country flag (If installed).

As part of the Country Flag mod, State Flag mod created by Jonathan Thomas

1. Go to AdminCP => Profile Fields => Add new Profile field => Single Select Menu >

Title > Home County/State

Description > Tell people where abouts your from

Options:
[copy and paste list of countries in state_list.txt to this option field]

Set Default: Yes, none

Editable By User: Yes

Display Page: Edit Profile

Write down your field# . i.e field6

2. Open postbit(_legacy) template,

FIND:

<div>
$vbphrase[posts]: $post[posts]
</div>

BELOW, ADD:

<if condition="$post[fieldX] != ''"><div>
State/County: <img src="images/state/$post[fieldX].gif" title="$post[fieldX]" align="center">
</div></if>


<!-- Change X to the field id. -->


3. Upload /state to images/state to your forum dir.



<!--- That's it! --->

Lamby1973
22 Dec 2005, 22:50
Yes i did ;)

3. Upload /state to images/state to your forum dir.

Always read to the end ;)

bashy
22 Dec 2005, 22:55
I was reffering to the
<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div></if>
That was not in the instructions...

As for the images, this is where they are...
/forums/images/state/

Regards

Bashy

Lamby1973
22 Dec 2005, 22:59
ah right yeah i know, because i didnt think that would be gone from peoples postsbits! lol

So i was just suggesting another place for you to put them :)

bashy
22 Dec 2005, 23:00
Ah...im with ya...

Still not working though lol, well the images anyway lol

Bashy

Lamby1973
22 Dec 2005, 23:04
link me to your forum, and will have a look from there :)

Right double check for me that you've created the new profile fields in your admin CP....and also changed the X's in the code to the number of that profile field....

bashy
22 Dec 2005, 23:06
Hi

sorry that should have been 1 of the 1st things i should have put lol

www.bashys-place.com

Bashy

Lamby1973
22 Dec 2005, 23:16
There so much stuff on there it would suprise me if it clashed tbh....

Cant think of anything else other than what ive suggested

bashy
22 Dec 2005, 23:19
Ok Lamby, no worries....
It had to happen sooner or later, i have about 71 mods installed including yours :)...

Oh well at least the area is showing..

thanks for looking and trying anyway...

Regards

Bashy

Rickie3
23 Dec 2005, 00:55
works a treat thankyou *installed*,the only thing i have to do is change the state pic sizes to correspond to my country flags size of 30x15 the state flags are 32x20,is there a quick way of doing this??

Lamby1973
23 Dec 2005, 10:02
Erm, im not entirely sure! I think you would have to put them in an editor like fireworks and just change the canvas size :)

bashy
23 Dec 2005, 10:58
Hi lamby

I had another go now that im fully awake...

I finally sorted it...

Sometimes things work using the postbit_legacy and other times just using the postbit...

It was postbit this time, and i also moved it further up to just under the users loacation, looks better there :)

Regards

Bashy

*clicks install

Rickie3
23 Dec 2005, 11:17
i have a request::::you don't appear to have included a flag for the "state of confusion', which is what i generally seem to be in these days.

Lamby1973
23 Dec 2005, 13:55
lmao!!!

Will have a crack at that flag for you! ;)

Lamby1973
23 Dec 2005, 14:02
There you go, You state of confusion. lol

Simply right click on the image and save as, and add it to your States Folder.

And in your list in the AdminCP add this: State of Confusion

Note: Just a little note that it may have to go in Alphabetical order, im not sure.

:) Hope that surfices for you :) :D

Rickie3
23 Dec 2005, 22:50
hahahahahahahaa PMSL thanx for that,and i did use it lol

Lamby1973
24 Dec 2005, 16:16
;) glad you liked it lol!

bashy
24 Dec 2005, 16:55
Hi lamby...

Is this meant to add 1 or 2 flags, im sure ive see other forums with 2?
Or are they using to mods?

Bashy

Lamby1973
24 Dec 2005, 17:07
Its supposed to add one flag....the other is the CountryFlag add on!

bashy
24 Dec 2005, 19:51
Thats what i thought...

Thanks lamby :)

Lamby1973
24 Dec 2005, 19:53
No problem :)

Ole_Chilli
24 Dec 2005, 23:56
Okay I may be an idiot ,,


but I have no "Options" to place the options in when I make a new userprofile field ..

I am using 3.5.2 and the selcetions I have are this


TitleMax 50

DescriptionMax 250

Default ValueYou may specify a default value that is entered into this field at the time of registration.

Max length of allowed user input

Display Size

Profile Field Type
Single-Line Text Box
Multiple-Line Text Box
Display Order

Field Required

Field Editable by User

Private Field
Yes
No

Field Searchable on Members List
Yes
No

Show on Members List
Yes
No

Regular ExpressionYou may require the input field to match a regular expression (PCRE).

Rickie3
25 Dec 2005, 03:25
make sure you select "Single Select Menu"

1. Go to AdminCP => Profile Fields => Add new Profile field => Single Select Menu

you appear to have selected single line text

Ole_Chilli
25 Dec 2005, 03:26
make sure you select "Single Select Menu"

1. Go to AdminCP => Profile Fields => Add new Profile field => Single Select Menu

you appear to have selected single line text


see I told you I was an idiot

Rickie3
25 Dec 2005, 03:31
see I told you I was an idiotwe are all in a learning world,merry xmas :banana: :banana:

Snake
25 Dec 2005, 11:58
Thanks!

Lamby1973
26 Dec 2005, 08:20
Thanks for helping out there Rickie! :) :D

Rickie3
26 Dec 2005, 08:27
Thanks for helping out there Rickie! :) :Dno probs :)

Gripemaster
07 Jan 2006, 22:46
*Clicks Install*

Thank you!

Sooner95
18 Jan 2006, 17:41
Works great, included the State Of Confusion as well...thx! click

quanvo81
26 Jan 2006, 15:43
Everything is ok, EXCEPT this:
The default option for everyone when they just signup and come to User CP and edit their profile is Au Aboriginal, so for people who is not familiar with Vbulletin setting, they will ignore it and when other members click on Member List, they will see alots of other members with the Au Aboriginal Flag.
I did choose the "Yes, Include the First Blank Option" already .
How do I fix this problem?

quanvo81
26 Jan 2006, 23:12
Everything is ok, EXCEPT this:
The default option for everyone when they just signup and come to User CP and edit their profile is Au Aboriginal, so for people who is not familiar with Vbulletin setting, they will ignore it and when other members click on Member List, they will see alots of other members with the Au Aboriginal Flag.
I did choose the "Yes, Include the First Blank Option" already .
How do I fix this problem?

It's ok guys, I figured it out, just add an extra option to the field . I added Not Applicable to the top of the field, then rename the clear.gif file to Not Applicable.gif and reupload the the state directory.
thanks anyway guys...

napukjon
07 Apr 2006, 12:02
Great work Lamby....works a treat...

rareclownfish
09 Apr 2006, 18:50
On 3.5.4 should the default be set to: Yes, Icluding a first blank option?

Roms
09 Apr 2006, 19:19
Thanks, I might add this. :) I have the country and the state will go well...

SHalliday
28 Jun 2006, 14:12
Now if I could only get province flags for Canada. Anyone know where I could get a set of those that I could use with this hack as well?

Mrdby
15 Apr 2007, 15:27
3.6.5?

pompaunpo
04 Jun 2007, 14:55
sorry... and flags in memberlist ?

I have activate : "Show on Member List " = YES

but in memberlist.php I see only Country name no image flag

Mrdby
05 Jun 2007, 01:25
3.6.7?????

cloyal
29 Jun 2007, 01:15
This works for 3.6.7PL. No problems. I installed this a while back on a 3.5 version and one of the states was misspelled. Not sure which one, but it wouldn't load the state or something. Can't remember but as soon as I find out, I'll post it here.

I enjoy this hack and so far no problems. I did make the changes to both the post bit and the post bit legacy, to be safe and have had no issues.

GremlinPrince
18 May 2008, 13:11
thanks very much simple to use

Madlike
20 May 2008, 13:26
Hey, Where is the Turkey fLag ?! :mad: