21
theCat
Re: Catads 1.30 - Array submission error...
  • 2005/5/26 10:38

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


Is it an upgrade or fresh install ?
Wich config (xoops, php, server) ?

For test, can you add in class/ads.php the 4 lines echo and post the result ?
function insert(&$ads)
    {
        if (
get_class($ads) != 'CatadsAds') {
echo 
"Error 1 </ br>";
            return 
false;
        }
        if (!
$ads->cleanVars()) {
echo 
"Error 2 </ br>";
            return 
false;
        }
        foreach (
$ads->cleanVars as $k => $v) {
            ${
$k} = $v;
        }
        if (empty(
$ads_id)) {
            
$ads_id $this->db->genId('catads_ads_ads_id_seq');
            
$sql 'INSERT INTO '.$this->db->prefix('catads_ads').' (ads_id, cat_id, ads_title, ads_type, ads_desc, price, monnaie, price_option, email, uid, phone, town, codpost, created, published, expired, photo, view, notify_pub, poster_ip, contact_mode, countpub, suspend, waiting) VALUES ('.$ads_id.', '.$cat_id.', '.$this->db->quoteString($ads_title).', '.$this->db->quoteString($ads_type).', '.$this->db->quoteString($ads_desc).', '.$price.', '.$this->db->quoteString($monnaie).', '.$this->db->quoteString($price_option).', '.$this->db->quoteString($email).', '.$uid.', '.$this->db->quoteString($phone).', '.$this->db->quoteString($town).', '.$this->db->quoteString($codpost).', '.$created.', '.$published.', '.$expired.', '.$this->db->quoteString($photo).', '.$view.', '.$notify_pub.', '.$this->db->quoteString($poster_ip).', '.$contact_mode.', '.$countpub.', '.$suspend.', '.$waiting.')';
        } else {
            
$sql 'UPDATE '.$this->db->prefix('catads_ads').' SET cat_id='.$cat_id.', ads_title='.$this->db->quoteString($ads_title).', ads_type='.$this->db->quoteString($ads_type).', ads_desc='.$this->db->quoteString($ads_desc).', price='.$price.', monnaie='.$this->db->quoteString($monnaie).', price_option='.$this->db->quoteString($price_option).', email='.$this->db->quoteString($email).', uid='.$uid.', phone='.$this->db->quoteString($phone).', town='.$this->db->quoteString($town).', codpost='.$this->db->quoteString($codpost).', created='.$created.', published='.$published.', expired='.$expired.', photo='.$this->db->quoteString($photo).', view='.$view.', notify_pub = '.$notify_pub.', poster_ip='.$this->db->quoteString($poster_ip).', contact_mode='.$contact_mode.', countpub='.$countpub.', suspend='.$suspend.', waiting='.$waiting.' WHERE ads_id='.$ads_id;
        }
        if (!
$result $this->db->queryF($sql)) {
echo 
$sql."</ br>";
echo 
"Error 3 </ br>";
            return 
false;
        }
        if (empty(
$ads_id)) {
            
$ads_id $this->db->getInsertId();
        }
        
$ads->assignVar('ads_id'$ads_id);
        return 
$ads_id;
    }

{Edit]
If the query is displayed, try to copy and paste this query in phpmyadmin.



22
theCat
Re: Xfguestbook
  • 2005/5/24 8:48

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


It's a bug in sign.php (header is sent 2 times ).
You have just to remove (or comment) this line
case 'form':
default:
[
d][color=CC3300]include XOOPS_ROOT_PATH."/header.php";[/color][/d]
    
$xoopsOption['template_main'] = 'xfguestbook_signform.html';



23
theCat
Re: My xfguestbook attacked/filled by spam
  • 2005/5/4 16:21

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


I'm working on a new version of Xfguestbook to prevent this problem.
- against spam done manually, I think include a "nofollow" in the url of message, with a warning in the form.
I don't want hack the core, and the solution is perhaps to replace the line 92 in xfguestbook/include/functions.php with
$a_msg['message'] = str_replace('target="_blank"','target="_blank" rel = "nofollow"'$onemsg->getVar('message'));


- against spam done with script, an adaptation of this hack of D.J. (human recognition of a random code)



24
theCat
Re: Problem with Catads 1.23: not been added - Array ?¿
  • 2005/3/4 18:40

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


For compatibilty with Php5, in class/ads.php change
if (get_class($ads) != 'catadsads') {

with
if (get_class($ads) != 'CatadsAds') {

lines 126 and 153

little bug, but php5 is case sensitive !



25
theCat
Re: Problem with Catads 1.23: not been added - Array ?¿
  • 2005/2/21 7:31

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


@ mrguitar
Are you sure that catads_adsform.html is in folder templates ?
Try to update the module.

@zeronesystem
You have this message because catads cannot insert a record in the db.
Are you sure that the structure of xoops_catads_ads is correct?
To check you can do that:
in class/ads.php insert in line 140
echo 'sql '.$sql.'<br>';
Try to submit an ad.
Copy and paste the query in phpmyadmin: the error will be displayed.

@gestroud
Sorry, but I don't understand your post



26
theCat
Re: CatAds 1.23 C.Félix
  • 2005/2/16 8:05

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


1.3...when ???
Approximately a week

If you need spanish languaje for 1.3 send me a MP.
OK, I appreciate your proposal



27
theCat
Re: CatAds 1.23 C.Félix
  • 2005/2/16 4:36

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


In index.php after (line 133)
$arr_cat[$i]['title'] = $title;
add this lines
if (in_array($cat_id$lastchildren)) {
$arr_cat[$i]['nb'] = (array_key_exists($cat_id$nbadspercat)) ?  "(".$nbadspercat[$cat_id].")"'';
$arr_cat[$i]['new'] = (array_key_exists($cat_id$newads)) ? $newads[$cat_id]: '';
}


and in your template catads_index.html after
<a href ="<{$cat.link}>"><{$cat.title}></a>

insert
<{$cat.nb}>
<{if 
$cat.new > 0}>
<
img src="<{$xoops_url}>/modules/catads/images/new_green.gif"
<{/if}>



28
theCat
Re: CatAds 1.23 C.Félix
  • 2005/2/15 10:38

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


Normally you must have minimum 2 levels of categories (for example):
- fish
-- angelfish
-- catfish
-- Killifish
- equipment
-- air pump

In this case, the 2nd level display the # of ads

But many people use only one level ...
I'm working about v1.3 with news features and I can try to display # of ads if there is only one level of categories.


[size=x-small]Sorry for my poor English[/size]



29
theCat
Re: Can I delete the sql folders in the modules after setup is complete?
  • 2005/2/8 15:25

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


Quote:
I assume that if I do, uninstalling will not be possible

No,uninstalling remains possible.
The uninstall needs only xoops_version.



30
theCat
Re: javascript for calendar appears before the html tag
  • 2005/2/7 7:29

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


Up !
No problem with this class in the administration, but I cannot use it in a form for the members.
A solution?




TopTop
« 1 2 (3) 4 5 6 ... 8 »



Login

Who's Online

104 user(s) are online (78 user(s) are browsing Support Forums)


Members: 0


Guests: 104


more...

Donat-O-Meter

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

Latest GitHub Commits