Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - MOD: Integrate country flags
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MOD: Integrate country flags

 Post Reply Post Reply Page  12>
Author
Ali Bilgrami View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 April 2005
Location: Pakistan
Status: Offline
Points: 492
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ali Bilgrami Quote  Post ReplyReply Direct Link To This Post Topic: MOD: Integrate country flags
    Posted: 21 May 2006 at 2:21pm
ok its done...scotty_32 thanks mate
 
 
included are two asp files
 
member_profile.asp
forum_posts.asp
 
V8 Rel. 8.02
 
/Flags Directory
 
containing flags of almost 140+ countries.


Edited by Ali Bilgrami - 31 May 2006 at 7:36am
Back to Top
gölge View Drop Down
Groupie
Groupie


Joined: 16 April 2005
Location: Turkey
Status: Offline
Points: 182
Post Options Post Options   Thanks (0) Thanks(0)   Quote gölge Quote  Post ReplyReply Direct Link To This Post Posted: 21 May 2006 at 4:10pm
i think you dont have to  keep flag information to show. you can make flagnames same with country names in country list so when a user select a country, the flag path appeared automatically with a variable.
 
example:
dim country
 
when a user selected a country from list you can transfer the countryname to flagname with that variable
 
country = country_list.value
 
flagpath = "..../forum/flags/" & country & ".gif"
 
i think this can help you.
 
%>
<script language="JavaScript">
your function () {
 
your java code here

}
</script>
 
you can use tjava with this code in vb.  place the code before html tags...
Back to Top
wistex View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 30 August 2003
Location: United States
Status: Offline
Points: 877
Post Options Post Options   Thanks (0) Thanks(0)   Quote wistex Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 2006 at 5:49pm
It would probably be better to write the code in ASP/VBScript instead of JavaScript, since JavaScript won't always be executed (since its client side)but ASP/VBScript will (since its server side).
Back to Top
Ali Bilgrami View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 April 2005
Location: Pakistan
Status: Offline
Points: 492
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ali Bilgrami Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 2006 at 6:33pm
well ive done this
 
after this code
 

'If the is a location display it
           If strAuthorLocation <> "" Then Response.Write(vbCrLf & "   <br />" & strTxtLocation & ": " & strAuthorLocation)
around line number 876 in forum_posts.asp
add these lines

Response.Write(vbCrLf & "  <br />" & "<img src=flags/" & strAuthorLocation & ".gif")
Response.Write(vbCrLf&"  <br />")
 
also you'll need the flags directory i've uploaded put it in the forum's main directory and that'll be it...
Back to Top
wistex View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 30 August 2003
Location: United States
Status: Offline
Points: 877
Post Options Post Options   Thanks (0) Thanks(0)   Quote wistex Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 2006 at 6:43pm
Thanks, I've been looking for this.
 
The only problem I see is that the strAuthorLocation displays the full country name, and the GIFs you provided use abbreviations.
 
In my case, since I don't want to modify the strAuthorLocation to be abbreviations, I would add a CASE statement to convert the country name to the appropriate GIF name.


Edited by wistex - 22 May 2006 at 6:44pm
Back to Top
Ali Bilgrami View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 April 2005
Location: Pakistan
Status: Offline
Points: 492
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ali Bilgrami Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 2006 at 7:35pm
ok some countries which has a space in their names like United Kingdom are not showing flags...in the pic properties it only shows the first word of their name...why is that? any ideas?
Back to Top
Ali Bilgrami View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 April 2005
Location: Pakistan
Status: Offline
Points: 492
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ali Bilgrami Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 2006 at 7:37pm
yeah well i've converted the country names into full so i'll re-upload the file...
Back to Top
wistex View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 30 August 2003
Location: United States
Status: Offline
Points: 877
Post Options Post Options   Thanks (0) Thanks(0)   Quote wistex Quote  Post ReplyReply Direct Link To This Post Posted: 30 May 2006 at 4:45am

Yes, the web does not like space in the filenames.

Did you get it working?
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.