Outside United States phrase

Need A Custom Modification To Your Webdate Script. Ask For Help Here.

Outside United States phrase

Postby mutton on Fri Apr 04, 2008 9:33 pm

In the list of members online the software shows for example

Outside United States, Australia
or
Tennessee, United States

In the view profile we see:

Melbourne, Outside United States, Australia
or
Franklin, Tennessee, United States

My own feeling is that the words "Outside United States" are entirely not needed and if anything show a silly kind of us/them thinking.

I had this taken care of in V2 but V3 is another story.
mutton
 
Posts: 100
Joined: Mon Feb 11, 2008 11:47 pm

Re: Outside United States phrase

Postby paul on Fri Apr 04, 2008 9:40 pm

Outside united states is shown in the states field.

do you want it just to not display when viewing the profile?

like if someone selected outside us for the state field just do not show it when profile is viewed this would be the easy fix..

some code could be written to make the state field only appear when United states is selected...

Be more specific on exactly how you want this to act...

thanks

Paul
User avatar
paul
Site Admin
 
Posts: 264
Joined: Sat Jan 26, 2008 7:30 pm
Location: Newington,Ct,USA

Re: Outside United States phrase

Postby mutton on Sun Apr 06, 2008 8:30 pm

Either of the ways you suggested is fine.

Here's the code I had in V2:

<? //echo (!$no_state ? "$fUser[state], " : "").$fUser[country];

if ($fUser[state] != "Outside United States")
{echo "$fUser[state]";}
else
{echo "$fUser[country]";}
?>


I made a lot of modifications over the last few years to v2, but somehow I'm stumped on where to put the same mods in V3. I'm guessing the logic might not work the same way anyhow.
mutton
 
Posts: 100
Joined: Mon Feb 11, 2008 11:47 pm

Re: Outside United States phrase

Postby paul on Sun Apr 06, 2008 10:18 pm

Open :

engine/pages/whos_online.php

find:

Code: Select all
$state = (!$no_state ? "$fUser[state], " : "");


add the follow line after that line:

Code: Select all
if ($state=="Outside United States"){$state="";}


This should work although I did not test it so let me know...

Paul
User avatar
paul
Site Admin
 
Posts: 264
Joined: Sat Jan 26, 2008 7:30 pm
Location: Newington,Ct,USA

Re: Outside United States phrase

Postby mutton on Mon Apr 07, 2008 11:41 am

Of course, right now I've got nobody from Outside United States online.....I'll check back later.
mutton
 
Posts: 100
Joined: Mon Feb 11, 2008 11:47 pm

Re: Outside United States phrase

Postby mutton on Mon Apr 28, 2008 1:44 pm

Does not work.

I was trying to prevent: Outside United States, Russia....Outside United States, South Africa

That's the fix you gave above, but somehow it doesn't work.

The other thing I think looks ugly is:

Chicago, Illinois, United States
Tampa, Florida, United States

The code I created for V2 and pasted above took care of both situations.
mutton
 
Posts: 100
Joined: Mon Feb 11, 2008 11:47 pm

Re: Outside United States phrase

Postby paul on Mon Apr 28, 2008 7:41 pm

Mutton,

Just tested it was a small problem with the code...

near line 146 find

Code: Select all
   $state = (!$no_state ? "$fUser[state], " : "");


Add this line on a new line after the previous line

Code: Select all
   if ($state=="Outside United States, "){$state="";}


The problem was it need a , and a space after the words Outside United States

copy paste this new line and works fine

Paul
User avatar
paul
Site Admin
 
Posts: 264
Joined: Sat Jan 26, 2008 7:30 pm
Location: Newington,Ct,USA

Re: Outside United States phrase

Postby mutton on Wed Apr 30, 2008 12:28 am

Thanks, Of course there's no-one from Outside United States online to test it when needed.

The other thing I would like to do is elminate "United States" after the state names.

After $country = $fUser[country];

I added if ($country=="United States") {$country="";}

but it leaves the comma after the state name.



I want to make this same change to the preview profile display, but can't find the right script.


if ($country=="United States") {$country="";}
mutton
 
Posts: 100
Joined: Mon Feb 11, 2008 11:47 pm

Re: Outside United States phrase

Postby mutton on Mon Jul 21, 2008 1:31 pm

I tried to effect the same change to preview_profile_wp.php but can't get it to work. I added the lines:

if ($country == "United States") {$country = " ";}
if ($state == "Outside United States") {$state = " ";}


but no matter where I put them they seem to have no effect.
mutton
 
Posts: 100
Joined: Mon Feb 11, 2008 11:47 pm

Re: Outside United States phrase

Postby paul on Mon Jul 21, 2008 5:58 pm

there are 2 preview_profile.php

one is in engine/pages/preview_profile.php

the other is in:

engine/preview_profile.php (this is the one you want to modify)

open this file:

find

Code: Select all
?>
at the end of the file

add this before the last line:

Code: Select all
if ($profile['country'] == "United States") {$profile['country'] = " ";}
if ($state == "Outside United States") {$state = " ";}


try that out let me know how it goes

now open

templates/preview_profile_wp.html

fine

Code: Select all
{STATE},


remove the , after {STATE}

and save

Should be good to go.

Paul
User avatar
paul
Site Admin
 
Posts: 264
Joined: Sat Jan 26, 2008 7:30 pm
Location: Newington,Ct,USA

Re: Outside United States phrase

Postby mutton on Wed Jul 23, 2008 8:33 pm

Awesome!

How about the same thing on the Browse and Search results display, where it shows the same info for each result?
mutton
 
Posts: 100
Joined: Mon Feb 11, 2008 11:47 pm

Re: Outside United States phrase

Postby paul on Wed Jul 23, 2008 10:17 pm

for the search results open

engine/pages/search.php

find near line 813

Code: Select all
$profile_state = $profile[state];


add on the next line after this:

Code: Select all
if ( $profile_country== "United States") {$profile_country= " ";}
if ($profile_state == "Outside United States") {$profile_state = " ";}


now open

templates/search_results_detail_mode.html

find:

Code: Select all
{PROFILE_STATE},


remove the , and save the file

Paul
User avatar
paul
Site Admin
 
Posts: 264
Joined: Sat Jan 26, 2008 7:30 pm
Location: Newington,Ct,USA

Re: Outside United States phrase

Postby paul on Wed Jul 23, 2008 10:29 pm

now for the browse feature

open

engine/pages/browse.php

near line 242 find:

Code: Select all
while($profile = f($profiles))
      {


add on the next line:

Code: Select all
if ($profile['country'] == "United States") {$profile['country'] = " ";}
if ($profile['state'] == "Outside United States") { $profile['state']= " ";}


now open

templates/browse_profiles_row.html

find:

Code: Select all
{PROFILE[STATE]},


take out the , and save

Paul
User avatar
paul
Site Admin
 
Posts: 264
Joined: Sat Jan 26, 2008 7:30 pm
Location: Newington,Ct,USA

Re: Outside United States phrase

Postby mutton on Wed Jul 23, 2008 11:12 pm

Awesome Paul! You should quit your day job! Maybe WebScribble would hire you and put you in charge of support. OK, I know I'm just dreaming!
mutton
 
Posts: 100
Joined: Mon Feb 11, 2008 11:47 pm


Return to Need A Modification To Your Webdate Script?

Who is online

Users browsing this forum: No registered users and 4 guests

cron