xoops forums

deka87

Friend of XOOPS
Posted on: 2009/5/5 11:47
deka87
deka87 (Show more)
Friend of XOOPS
Posts: 1124
Since: 2007/10/5
#1

Catads 1.4 - show expired ads

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

zyspec

Module Developer
Posted on: 2009/5/5 13:48
zyspec
zyspec (Show more)
Module Developer
Posts: 1056
Since: 2004/9/21
#2

Re: Catads 1.4 - show expired ads

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.

deka87

Friend of XOOPS
Posted on: 2009/5/5 14:30
deka87
deka87 (Show more)
Friend of XOOPS
Posts: 1124
Since: 2007/10/5
#3

Re: Catads 1.4 - show expired ads

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

zyspec

Module Developer
Posted on: 2009/5/5 17:58
zyspec
zyspec (Show more)
Module Developer
Posts: 1056
Since: 2004/9/21
#4

Re: Catads 1.4 - show expired ads

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...

deka87

Friend of XOOPS
Posted on: 2009/6/2 18:29
deka87
deka87 (Show more)
Friend of XOOPS
Posts: 1124
Since: 2007/10/5
#5

Re: Catads 1.4 - show expired ads

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