11
Peekay
Re: Classified Ads Beta 2
  • 2006/9/2 19:27

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


@jlm69

Glad to see you are not enjoying your weekend too much...

Problems Admin side

None... that I can see.

Problems - user side:

All now working nicely except:

Send Friend. Good news - no blank page (form appears). Bad news - doesn't send mail (for me).

Email still doesn't work for me either. I'm using IIS on a localhost but mail functions work for other modules and XOOPS notifications etc.

Observations

As far as the message in the email form is concerned - I would just lose it. The form either auto-completes a registered user's details... or it doesn't. If an anonymous user wants the seller to contact them, they have to add their phone number and email themselves. They just need to fill in the blank fields.

Print ad page is nicely formatted.

IP logging is cool too, although make sure you don't log proxy servers.

The 'login to reply' permissions is also a nice touch, but if site admins allow anons to see user profiles, it is somewhat circumvented.

Summary

Compared to other mods on my 2.0.10 system, only the mail issue left to resolve AFAIK.
A thread is for life. Not just for Christmas.

12
jlm69
Re: Classified Ads Beta 2
  • 2006/9/2 21:04

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


Peekay,

Can I ask how your mailer is setup, is it phpmail()?

John

13
Peekay
Re: Classified Ads Beta 2
  • 2006/9/2 21:29

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Yes. the default XOOPS mail method.
A thread is for life. Not just for Christmas.

14
jlm69
Re: Classified Ads Beta 2
  • 2006/9/2 22:34

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


It is hard to try to fix something that I can not recreate. Everything works great on my site, but that's the way it goes.
I have tried something but I need you to test it. I will put just the contact.php file for download, if you could test it.

It will be at:

contact page

unzip it and overwrite the contact.php page.
If it works I will also make the fix to the send to a friend.

Thanks,

John

15
irmtfan
Re: Classified Ads Beta 2
  • 2006/9/9 4:14

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


doesnt work in 2.2+ but works fine in 2.0

im using:
- Classified Ads beta 2
- XOOPS 2.2.4
- php5 and mysql5

16
Peekay
Re: Classified Ads Beta 2
  • 2006/9/9 10:35

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


@jlm69

Installed this now on XOOPS 2.0.13.2, which will (eventually) be my production site. I cannot use 2.0.14 due to conflicts with the forum I will be using.

Email to a friend now works perfectly, but...

Problems - User side:

1) Mail form still does not work. I replaced contact.php and the page now appears to work properly - a 'your message sent...' screen appears after hitting submit. The old one just refreshed the page. However, still not getting the email.

2) If users fail to complete the 'Real Name' field in their profile (not a required field) their name does not appear in the mail form. This generates a 'name is required' error with the form validation. (sorry, missed that one last time!). Could perhaps do with an addition to the alert - "Please complete the real name field in your user profile"

My XOOPS setup uses 'mail()' as the pref which is the default setting most users will have. I guess something changed in XOOPS mail handling method between 2.0.10 and 2.0.13.2. because your 'send to friend' feature now works, however the email form doesn't (for me).

@irmtfan

Hi. Could you say:

Which XOOPS 2.0.n version did you test this on?
Which mail method is set in your prefs?
Did the email form work for you?
A thread is for life. Not just for Christmas.

17
Peekay
Re: Classified Ads Beta 2
  • 2006/9/14 19:03

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


OK. Fixed the email form!

It's a register_globals thing. Mine are off.

I defined the vars in the new contact.php you posted and made a few other minor changes so the price and price 'type' now show in the email.

After line 12, add:
if ($_POST['submit']) { // line 12

$id = !isset($_REQUEST['id'])? NULL $_REQUEST['id'];
$date = !isset($_REQUEST['date'])? NULL $_REQUEST['date'];
$namep = !isset($_REQUEST['namep'])? NULL $_REQUEST['namep'];
$ipnumber = !isset($_REQUEST['ipnumber'])? NULL $_REQUEST['ipnumber'];
$message = !isset($_REQUEST['message'])? NULL $_REQUEST['message'];
$monnaie = !isset($_REQUEST['monnaie'])? NULL $_REQUEST['monnaie'];
$typeprice = !isset($_REQUEST['typeprice'])? NULL $_REQUEST['typeprice'];
$pk_price = !isset($_REQUEST['pk_price'])? NULL $_REQUEST['pk_price'];


Line 19, change:
$result $xoopsDB->query("select email, submitter, title, type, description, price FROM  ".$xoopsDB->prefix("ads_listing")." WHERE lid = '$id'");


to:
$result $xoopsDB->query("select email, submitter, title, type, description, price, typeprice FROM  ".$xoopsDB->prefix("ads_listing")." WHERE lid=$id");


Line 34, rem out:
if ($price) {
$price ""._ADS_PRICE." ".$xoopsModuleConfig['ads_monnaie'].$price";
}  else {
$price "";
}


And add:
// pk build new price var
if ($price 0) {
$pk_price .= ""._ADS_PRICE." "$xoopsModuleConfig['ads_monnaie'].$monnaie $price - $typepricen";
}


Line 49 change:
$message .= "$type : $titlen$pricen"._ADS_ANNONCE." :n $descriptionnn";


to:
$message .= "$type : $titlen$pk_pricen"._ADS_ANNONCE." :n$descriptionnn";


It now correctly adds the IP address to the database too.

Only issue remaining AFAIK is the error generated if users fail to complete their 'real name' field in their profile.
A thread is for life. Not just for Christmas.

18
jlm69
Re: Classified Ads Beta 2
  • 2006/9/15 22:46

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


Peekay,

I have register globals off on my site also, and the current version in the download works for me, I have not tested your work below, but if it works for you great. I will look into it to see what I find. You are the only one who has reported your problem, If other users are also having this problem please report it to me.

Thanks again,

John

19
Peekay
Re: Classified Ads Beta 2
  • 2006/9/15 23:05

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Yes, I agree. Would be nice to get some feedback from other users to see if everything works. It could just be me (it often is )
A thread is for life. Not just for Christmas.

20
jlm69
Re: Classified Ads Beta 2
  • 2006/9/16 2:15

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


Peekay,

No, it was not you. It was me. My site is now under phpsuexec, and it was with register globals off, but I accidently deleted the php.ini files in that module so I guess they were not off. I have incorporated some of your fix and added the xoopsSecurity to that page, to prevent hitting the back button and sending it again, it seems to work good. I will update the download tomorrow.

Thanks for your contribution.

John

Login

Who's Online

240 user(s) are online (145 user(s) are browsing Support Forums)


Members: 0


Guests: 240


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