1
deka87
Catads 1.4 - show expired ads
  • 2009/5/5 11:47

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


hi, i want to list expired ads in catads 1.4 along with active ones. i've gone ahead and made them visible when going to the url directly, but i also want them to be listed under the categories. i guess the template should be changed somehow since i didn't find anything i could do in adslist.php (but i may be wrong ofc) any help on this issue?
Mind anchors

2
zyspec
Re: Catads 1.4 - show expired ads
  • 2009/5/5 13:48

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


You'll have to change several of the .php files. I quickly glanced at index.php, adslist.php and ./blocks/catads_new.phpm all of them will need to be modified - and I'm sure there's others...

You're looking for something like:
$criteria->add(new Criteria('expired'time(),'>'));


This puts a 'qualifier' on the SQL query to exclude things that are expired (e.g. expired time before now). You can just comment out the line in most cases and then it should give you the desired results.

3
deka87
Re: Catads 1.4 - show expired ads
  • 2009/5/5 14:30

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


thanks zyspec. i have commented it out in adslist.php and it had an affect. it doesn't show me the expired ads though, but now i have several pages in the category, like it does count them but it just wont show em. guess there is something to do with templates now. will you help me out with this one?
Mind anchors

4
zyspec
Re: Catads 1.4 - show expired ads
  • 2009/5/5 17:58

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


I'll help when I can... I don't use this module (and don't have it installed anywhere) so you would probably get more thorough, and better advice from others - but I'll help when/where I can.

Having said that it looks like the ./includes/functions.php file has a function called showListAds(). Inside the function you'll see the same
$criteria->add(new Criteria('expired'time(),'>'));
that you'll need to comment out there too...

5
deka87
Re: Catads 1.4 - show expired ads
  • 2009/6/2 18:29

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


that's right zyspec! now it works alright. thanks!
Mind anchors

Login

Who's Online

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


Members: 0


Guests: 234


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