[thelist] studly cubes! (was: Breadcrumbs for CF) <w/tip>

Joe Crawford jcrawford at avencom.com
Thu Aug 23 18:10:56 CDT 2001


"Daniel J. Cody" wrote:
> Bruce H had a cf_breadcrumb tag a couple months ago that i saw, but i
> dont know if he ever released it.. it would make a nice article though
> to compilment the others :)
> 
> (and you get a spiffy cube next to your name on the evolt site if you
> write articles now( http://evolt.org/cubes_definition ) anyone notice
> yet? :)

Dang! My one cube looks lonely. :-(
http://evolt.org/user/artlung/122/index.html
And sheesh, my one article is 2 years old. I've been hanging around here
a long time!

And Mr. Cody is all studly and whatnot! :-)
http://evolt.org/user/djc/5/index.html

Okay, I owe.

<tip type="php, easy map links!">
If you already have a database of physical addresses, it's really simple
to add a map link - just add this function to your php files and pass it
your address, city, state and zipcode fields (I know evolt is
international - you will have to adjust and adapt for jurisdictions
outside the USA.

<?php
function mapurl($address, $city, $state, $zip) {
  $url='';
  $url.='http://www.mapquest.com/cgi-bin/ia_find?';
  $url.='link=btwn%2Ftwn-map_results&amp;random=986&';
  $url.='event=find_search&amp;address=';
  $url.=rawurlencode($address);
  $url.='&amp;city=';
  $url.=rawurlencode($city);
  $url.='&amp;State=';
  $url.=rawurlencode($state);
  $url.='&amp;Zip=';
  $url.=rawurlencode($zip);
  $url.='&amp;Find+Map.x=35&amp;Find+Map.y=4';
  return "<a href='$url'
             title='View a map of this location.'>Map</a>";
};
?>

then just do a call to mapurl($Address,$City, $ST, $ZIP) and this will
return you a link! Very nifty and easy to do. The rawurlencode thing is
in there because only lazy programmers allow blank spaces to creep into
their URLs. :-)

</tip>

	- Joe <http://artlung.com/>
-- 
...................  Joe Crawford \\ Web Design & Development
.....  mailto:jcrawford at avencom.com \\ http://www.avencom.com
.... San Diego \\ CA \\ USA \\ AVENCOM: Set Your Sites Higher




More information about the thelist mailing list