1
toddherrold
XDirectory Problem - address fields don't add to dbase

I'm having a problem with xdirectory in which data that is submitted in certain fields doesn't make it into the dbase. The only fields that work are: Business name, Fax, Website, Category, and Description.

For some reason I can't figure out, Address, City, State, Zip, Country, Phone, and email fields do not function. On modify and submit pages, these are "yellowed" out as inactive? The dbase in mySQL seems fine.

How do I activate these fields? Running XOOPS 2.0.7, MySQL 12.22/4.0.16, and php 4.3.4

see example at: http://www.hotdogblog.com/modules/xdirectory/modlink.php?lid=1336

and:

http://www.hotdogblog.com/modules/xdirectory/

Any help is greatly appreciated in advance!

2
builderb
Re: XDirectory Problem - address fields don't add to dbase
  • 2004/6/30 15:12

  • builderb

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/8/4 2


I would need to look at the code in the submit.php page as well as the DB Structure.

If you want, I can take a look at your site but I'll need better access.

Let me know

-Builderb

3
toddherrold
Re: XDirectory Problem - address fields don't add to dbase

thanks a lot. that would be great. i can email you submit.php and dbase access info. let me know what else you need.

todd

4
toddherrold
Re: XDirectory Problem - address fields don't add to dbase

Thanks to builderb, this issue has been resolved!

5
rserrano
Re: XDirectory Problem - address fields don't add to dbase
  • 2004/7/5 17:15

  • rserrano

  • Just popping in

  • Posts: 10

  • Since: 2004/5/31


Is there anyway you can share te code I am having the same problem with Xdirectory.

thanks

Robert

6
builderb
Re: XDirectory Problem - address fields don't add to dbase
  • 2004/7/6 4:14

  • builderb

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/8/4 2


Yes, Here is the fix for the submit.php file.

@ line 79 replace the following code:

$url = $myts->makeTboxData4Save($url);
$title = $myts->makeTboxData4Save($HTTP_POST_VARS["title"]);
$description = $myts->makeTareaData4Save($HTTP_POST_VARS["message"]);
$date = time();

with this:

$url = $myts->makeTboxData4Save($url);
$title = $myts->makeTboxData4Save($HTTP_POST_VARS["title"]);
$address = $myts->makeTboxData4Save($HTTP_POST_VARS["address"]);
$address2 = $myts->makeTboxData4Save($HTTP_POST_VARS["address2"]);
$city = $myts->makeTboxData4Save($HTTP_POST_VARS["city"]);
$state = $myts->makeTboxData4Save($HTTP_POST_VARS["state"]);
$zip = $myts->makeTboxData4Save($HTTP_POST_VARS["zip"]);
$country = $myts->makeTboxData4Save($HTTP_POST_VARS["country"]);
$phone = $myts->makeTboxData4Save($HTTP_POST_VARS["phone"]);
$fax = $myts->makeTboxData4Save($HTTP_POST_VARS["fax"]);
$email = $myts->makeTboxData4Save($HTTP_POST_VARS["email"]);
$url = $myts->makeTboxData4Save($HTTP_POST_VARS["url"]);
$premium = $myts->makeTboxData4Save($HTTP_POST_VARS["premium"]);
$description = $myts->makeTareaData4Save($HTTP_POST_VARS["message"]);
$date = time();



7
builderb
Re: XDirectory Problem - address fields don't add to dbase
  • 2004/7/6 4:17

  • builderb

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/8/4 2


you will also need to make this change to modlink.php.

@ line 64 replace the following:

$url = $myts->makeTboxData4Save($HTTP_POST_VARS["url"]);
$logourl = $myts->makeTboxData4Save($HTTP_POST_VARS["logourl"]);
$cid = intval($HTTP_POST_VARS["cid"]);
$title = $myts->makeTboxData4Save($HTTP_POST_VARS["title"]);
$description = $myts->makeTareaData4Save($HTTP_POST_VARS["description"]);


With this code:

$url = $myts->makeTboxData4Save($HTTP_POST_VARS["url"]);
$logourl = $myts->makeTboxData4Save($HTTP_POST_VARS["logourl"]);
$cid = intval($HTTP_POST_VARS["cid"]);
$title = $myts->makeTboxData4Save($HTTP_POST_VARS["title"]);
$description = $myts->makeTareaData4Save($HTTP_POST_VARS["description"]);
$address = $myts->makeTboxData4Save($HTTP_POST_VARS["address"]);
$address2 = $myts->makeTboxData4Save($HTTP_POST_VARS["address2"]);
$city = $myts->makeTboxData4Save($HTTP_POST_VARS["city"]);
$state = $myts->makeTboxData4Save($HTTP_POST_VARS["state"]);
$zip = $myts->makeTboxData4Save($HTTP_POST_VARS["zip"]);
$country = $myts->makeTboxData4Save($HTTP_POST_VARS["country"]);
$phone = $myts->makeTboxData4Save($HTTP_POST_VARS["phone"]);
$fax = $myts->makeTboxData4Save($HTTP_POST_VARS["fax"]);
$email = $myts->makeTboxData4Save($HTTP_POST_VARS["email"]);
$url = $myts->makeTboxData4Save($HTTP_POST_VARS["url"]);
$premium = $myts->makeTboxData4Save($HTTP_POST_VARS["premium"]);

8
toddherrold
Re: XDirectory Problem - address fields don't add to dbase

thanks again to builderb! the submit and modlink.php fixes worked like a charm!

Only one outstanding issue on my implementation of xdir: hitting the email button drawing contact.php results in a blank page. Debug gives only the following message:

Notice [PHP]: Undefined variable: lid in file modules/xdirectory/contact.php line 50

any ideas out there would be much appreciated.

cheers.

Login

Who's Online

166 user(s) are online (126 user(s) are browsing Support Forums)


Members: 0


Guests: 166


more...

Donat-O-Meter

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

Latest GitHub Commits