| View previous topic :: View next topic |
| Author |
Message |
billnguyen
Joined: 01 Jan 1970 Posts: 30
 |
Posted: Fri Jun 01, 2007 6:39 am
Post subject: Limit # of old issues listed in mod_magazine_issues
|
|
|
Can I limit the number of past issues (in mod_magazine_issues)? Currently it is listing ALL of them. How can I limit the number of past issues to be display?
Thanks
Bill Nguyen |
|
| Back to top |
|
 |
Robbo
Joined: 28 Feb 2007 Posts: 47

 |
Posted: Wed Jun 13, 2007 4:22 am
Post subject:
|
|
|
Hi Bill,
sure you can, but the module doesn't have an otion to do it at this time.
I can tell you which file and which line to change though.
/modules/mod_magazine_issues.php
Go to line 151.
You should see on this line:
. "\n WHERE A.section='".$section_id."' ".$qdef."AND A.published=1 AND C.published=1 AND A.section=C.id AND A.access <my>gid." ORDER BY A.ordering ASC;
Change it to:
. "\n WHERE A.section='".$section_id."' ".$qdef."AND A.published=1 AND C.published=1 AND A.section=C.id AND A.access <my>gid." ORDER BY A.ordering ASC Limit 2;
Where the limit 2 at the end, is the max number of issues to you want to display.
I hope this helps. |
|
| Back to top |
|
 |
billnguyen
Joined: 01 Jan 1970 Posts: 30
 |
Posted: Wed Jun 13, 2007 11:52 pm
Post subject:
|
|
|
Dear Merav;
This will work.
However, how can I list ALL issues again? Can I call the mod the 2nd time with the "LIMIT" removed?
Thanks again
Bill |
|
| Back to top |
|
 |
Robbo
Joined: 28 Feb 2007 Posts: 47

 |
Posted: Thu Jun 14, 2007 4:37 am
Post subject:
|
|
|
hi Bill,
the solution I gave you was a permanent one.
We havn't built this feature into our modules yet.
Perhaps inthe future. |
|
| Back to top |
|
 |
billnguyen
Joined: 01 Jan 1970 Posts: 30
 |
Posted: Tue Jun 19, 2007 3:50 pm
Post subject:
|
|
|
Rob;
I am curious if we, as ijoomla users, can invoke a module twice, even if we have to copy the module to a different name? In this case, mod_magazine_issues. I love to be able to do that so we can modify the query to serve different purposes.
Thanks
Bill |
|
| Back to top |
|
 |
|