<? DEW-CODE.COM  

Downloads

Assorted scripts  (1)
DewNewPHPLinks  (9)





Lost Password?
No account yet? Register

Dew-Code Newsfeed

Resources


 USdigitalcable.com

Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Country List is not alphabetical (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Country List is not alphabetical
#154
Dewed (Admin)
Admin
Posts: 606
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Country List is not alphabetical 4 Years ago Karma: 9  
I knew I had the answer to this in my notes, but while looking for it, I found notes regarding another common bug you likely haven't noticed yet. The default country which is set in Configuration, is not selected when adding new site.

To fix that ... Edit include/add_site.php

Locate and removed this line ...
Code:

if(!isset($Country)){ $Country = $default_country;}
Locate
Code:

echo getFlagList("../images/flags", $Country);
and replace with this
Code:

echo getFlagList("../images/flags", $spec['DefaultCountry']);
With that fixed... getting the countries alphabetized ... Locate and replace the entire getFlagList function in /include/functions.php roughly lines # 76 to 102 ...
Code:

function getFlagList($dirName, $Country){ $d = dir($dirName); while($entry = $d->read()){ ... ... .. ... $d->close(); return $html; }
Replace with this ...
Code:

function getFlagList($dirName, $Country){ $d = dir($dirName); while($entry = $d->read()){ if($entry != "." && $entry != ".." && $entry != "CVS"){ $short_entry = eregi_replace(".gif", "", $entry); $short_entry = eregi_replace("_", " ", $short_entry); $arrCountry[$short_entry] = $entry; } } asort($arrCountry); foreach ($arrCountry As $short_entry => $entry) { $html .= "<option value=\"" . $entry . "\""; if($Country == $entry){ $html .= " selected=\"selected\""; } $html .= ">" . $short_entry . "</option>\n"; } $d->close(); return $html; } }
And that should both issues
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/05/13 20:09 By Dewed.
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
      Topics Author Date
    thread link
Country List is no longer alphabetical
ajmboy 2008/05/09 16:12
    thread link
thread linkthread link Re:Country List is no longer alphabetical
ajmboy 2008/05/12 19:58
    thread link
thread linkthread link Re:Country List is not alphabetical
Dewed 2008/05/13 09:41
    thread link
thread linkthread linkthread link Re:Country List is not alphabetical
ajmboy 2008/05/13 10:19
    thread link
thread linkthread linkthread link Re:Country List is not alphabetical
seedy 2010/07/28 19:59
    thread link
thread linkthread linkthread linkthread link Re:Country List is not alphabetical
seedy 2010/07/28 20:05
    thread link
thread linkthread linkthread linkthread linkthread link Re:Country List is not alphabetical
Dewed 2010/07/28 20:46
    thread link
thread linkthread linkthread linkthread linkthread linkthread link Re:Country List is not alphabetical
seedy 2010/07/28 20:54
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Country List is not alphabetical
Dewed 2010/07/28 20:59
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Country List is not alphabetical
seedy 2010/07/28 21:05
    thread link
thread linkthread link Re:Country List is no longer alphabetical
Dewed 2008/05/13 20:00
    thread link
thread linkthread link Re:Country List is no longer alphabetical
ezagent 2009/01/24 14:18
Go to top Post Reply
get the latest posts directly to your desktop
Outsource your projects to thousands of programmers at
ScriptLance.com
Newsflash
Interested in
advertising?

This space for rent!

Sign up for PayPal and start accepting credit card payments instantly.
Copyright Dew-Code 2008