1
meldra
Hacking Xdirectory module map search for Australia
  • 2005/2/4 4:35

  • meldra

  • Just popping in

  • Posts: 32

  • Since: 2005/2/2 9


I am using xdirectory for a business directory in Australia. I've managed to fix the sql to take 3 letter state abbreviations, but still it needs more altering.

Xdirectory has a wonderful little button that when clicked on, shows a map of where the address location is, using Yahoo maps. However, Yahoo maps does not have maps for Australia.

Has anyone hacked the module to show maps for Australia say with whereis.com.au?

If not, has anyone hacked it for their own site and knows where to do it?

2
meldra
Re: Hacking Xdirectory module map search for Australia
  • 2005/2/4 8:58

  • meldra

  • Just popping in

  • Posts: 32

  • Since: 2005/2/2 9


Although I am not a programmer, I know how to and hence how code works. Because of this I decided that I might as well mess around with the module and see if I can get it working as I want it to. I have messed with phpNuke themes before, but never a module and never in xoops.

If I succeed in doing this, I'll release it so that it can be distributed along side the origional xDirectory module, but under the name xDirectoryOz.

I think I have all the necessary changes done, I am about to upload the 'new' module and see if it works.

Here goes!

3
evylrat
Re: Hacking Xdirectory module map search for Australia
  • 2005/2/4 9:51

  • evylrat

  • Not too shy to talk

  • Posts: 164

  • Since: 2004/2/25


If you look in your templates dir for xdir_link.html and xdir_listingfull.html you'll find

Quote:
< form name=mapForm2 action="http://us.rd.yahoo.com/maps/home/submit_a/*-http://maps.yahoo.com/maps" target="_new" method=get>
< input type="hidden" name="addr" value="<{$link.address}>">
< input type="hidden" name="csz" value="<{$link.city}>, <{$link.state}> <{$link.zip}>">
< input type="hidden" name="country" value="us">
< input type=hidden name=srchtype value=a>
< input type=submit name="getmap" value="Map">
< /form>


I use multimap on my UK site, so I changed it to

Quote:
< form name=mapForm2 action="http://www.multimap.com/map/browse.cgi" target="_new" method=get>
< input type="hidden" name="pc" value="<{$link.zip|replace:" ":""}>">
< input type=submit name="getmap" value="Map">
< /form>


You just need to workout what needs to go in the address bar to get your map.

Oh yeah, remove the spaces I've added!*/

4
meldra
Re: Hacking Xdirectory module map search for Australia
  • 2005/2/4 9:57

  • meldra

  • Just popping in

  • Posts: 32

  • Since: 2005/2/2 9


evylrat,

I eventually found your previous thread :) and I've used it as a guide. Atm I have a little issue with either sql or one of my templates and cannot test to see if my map link hack has worked yet.

Thanks for your help :)

btw, I also found it necessary to update the map search in the xdir_premiumlink.html as well.

5
evylrat
Re: Hacking Xdirectory module map search for Australia
  • 2005/2/4 10:08

  • evylrat

  • Not too shy to talk

  • Posts: 164

  • Since: 2004/2/25


Thanks! I can't remember if I changed that one... must've!
I'd done a previous thread about it? Well I....

6
meldra
Re: Hacking Xdirectory module map search for Australia
  • 2005/2/4 10:30

  • meldra

  • Just popping in

  • Posts: 32

  • Since: 2005/2/2 9


I've done it! Yay!

Now, how do I go about submitting it for distribution?

Login

Who's Online

234 user(s) are online (128 user(s) are browsing Support Forums)


Members: 0


Guests: 234


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits