1
gruessle
Code Data Management module ( CDM )
  • 2005/3/8 1:40

  • gruessle

  • Friend of XOOPS

  • Posts: 348

  • Since: 2003/9/20


Need a little help, please.

Here is what I did:

1- Installed Addresses module by Onokazu https://xoops.org/modules/repository/singlefile.php?cid=81&lid=1101

2- in header.php added include
After this:
include "../../mainfile.php";
Added this:
include XOOPS_ROOT_PATH."/modules/cdm/include/defines.php";

3- Then in submit.php
After this:
include_once XOOPS_ROOT_PATH."/include/xoopscodes.php";
Added this:
require_once CDM_PATH."/class/class.cdm.form.php";

And after this:
$country = $myts->makeTboxData4Save($HTTP_POST_VARS["country"]);
Added this:
$state = new CDMFormSelectUSStates('Select a State','state');

4- In class.cdm.form.php
After this:
class CDMFormSelectCountry extends CDMFormSelect {
function CDMFormSelectCountry($caption, $name, $value=null, $size=1, $lang=CDM_DEF_LANG) {
$this->CDMFormSelect('COUNTRY', $caption, $name, $value, $size, $lang);
}
}
Added this:
class CDMFormSelectUSStates extends CDMFormSelect {
function CDMFormSelectUSStates($caption, $name, $value=null, $size=1, $lang=CDM_DEF_LANG) {
$this->CDMFormSelect('USStates', $caption, $name, $value, $size, $lang);
}
}

The I to the insert into state,%s and $state // I am not sure if I needed that.
$sql = sprintf("INSERT INTO %s (lid, cid, title, adress, zip, city, state,country, phone, mobile, fax, contemail, opentime, url, logourl, submitter, status, date, hits, rating, votes, comments) VALUES (%u, %u, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %u, %u, %u, %u, %u, %u, %u)", $xoopsDB->prefix("addresses_links"), $newid, $cid, $title, $adress, $zip, $city, $state, $country, $phone, $mobile, $fax, $contemail, $opentime, $url, ' ', $submitter, $status, $date, 0, 0, 0, 0);

Now don't I need th make a change to the addresses_submit.html file. I would think so.
Anyway I am stuck, please help.

2
chippyash
Re: Code Data Management module ( CDM )
  • 2005/3/12 8:47

  • chippyash

  • Friend of XOOPS

  • Posts: 501

  • Since: 2004/1/29


Support for CDM is on my own website.

Regards
Ashley

Login

Who's Online

396 user(s) are online (52 user(s) are browsing Support Forums)


Members: 0


Guests: 396


more...

Donat-O-Meter

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

Latest GitHub Commits