[43]Show Related items within Section boundaries.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Thu Feb 21, 2008 11:15 am
[43]Show Related items within Section boundaries.
This should be a minor adaption to the Module parameters of the Related Items Module.
1.1 WHAT
The situation now is that when you use the Related items Module on your joomla site, you always see the related items articles from ALL Sections. I would like to be able to limit these.
1.2 HOW
I would like to see a check box in the Module parameters of the Related Items Module, where you can select between the following options:
1. Show Related Items from ALL Sections
2. Show Related Items only from CURRENT Section
2.1 WHAT
One more whish concerning the Related items Module would be to also be able to limit the number of Related Articles shown.
1.2 HOW
I would like to see a Field in the Module parameters of the Related Items Module, where you can set the maximum number of Related items shown, also in taking into account the issue of 1.1 :
List lenght for Related Items from ALL Sections = ...
List lenght for Related Items only from CURRENT Section = ...
Thanx!
1.1 WHAT
The situation now is that when you use the Related items Module on your joomla site, you always see the related items articles from ALL Sections. I would like to be able to limit these.
1.2 HOW
I would like to see a check box in the Module parameters of the Related Items Module, where you can select between the following options:
1. Show Related Items from ALL Sections
2. Show Related Items only from CURRENT Section
2.1 WHAT
One more whish concerning the Related items Module would be to also be able to limit the number of Related Articles shown.
1.2 HOW
I would like to see a Field in the Module parameters of the Related Items Module, where you can set the maximum number of Related items shown, also in taking into account the issue of 1.1 :
List lenght for Related Items from ALL Sections = ...
List lenght for Related Items only from CURRENT Section = ...
Thanx!
-
- Joomla! Apprentice
- Posts: 23
- Joined: Fri Sep 01, 2006 6:40 pm
Re: [43]Show Related items within Section boundaries.
The Related Items module is virtually useless for me too. I have a large site, and my "Related Items" list returns dozens of results ... often longer than the articles themselves.
If there is a solution, third-party module or even $$ answer, I would jump on it in a heartbeat!
If there is a solution, third-party module or even $$ answer, I would jump on it in a heartbeat!
-
- Joomla! Apprentice
- Posts: 8
- Joined: Wed Mar 12, 2008 5:40 pm
- Location: Pleasant Hill, CA
- Contact:
Re: [43]Show Related items within Section boundaries.
yeah i want this too. seems like it should have had it already ....
The Ramblings of a Fosgnilbmareht: http://blog.eddiemonge.com
-
- Joomla! Apprentice
- Posts: 6
- Joined: Tue Jan 29, 2008 3:29 am
Re: [43]Show Related items within Section boundaries.
I'd extend this just a bit more to include the ability to *specify* what section and even category(s) to include related items from.
This would greatly extend the functionality and allow you to use multiple Related Items modules to present categorized lists of related content. If I'm showing an article about building a project, I could have one module that shows related products, another module that shows related sets of instructions, and another that shows related articles.
Graphically I'd use a multiselect list like we use when assigning what menus a module should show up on with the radio buttons on the top being:
0All 0Current Section 0Select Item(s) from the list
By defaulting to All, you would preserve the same default behavior as we have currently, but you would also be able to accomplish all the requirements in both my scenario and those above.
Thoughts?
This would greatly extend the functionality and allow you to use multiple Related Items modules to present categorized lists of related content. If I'm showing an article about building a project, I could have one module that shows related products, another module that shows related sets of instructions, and another that shows related articles.
Graphically I'd use a multiselect list like we use when assigning what menus a module should show up on with the radio buttons on the top being:
0All 0Current Section 0Select Item(s) from the list
By defaulting to All, you would preserve the same default behavior as we have currently, but you would also be able to accomplish all the requirements in both my scenario and those above.
Thoughts?
-
- Joomla! Apprentice
- Posts: 5
- Joined: Tue Jul 08, 2008 11:48 am
Re: [43]Show Related items within Section boundaries.
I totally agree with Tigratus.
Additionally it would be nice to be able to render section/category names to the frontend in order to establish a userfriendly "journey".
Best regards.
Mraz, Munich
Additionally it would be nice to be able to render section/category names to the frontend in order to establish a userfriendly "journey".
Best regards.
Mraz, Munich
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue Jun 17, 2008 11:15 am
Re: [43]Show Related items within Section boundaries.
Hi All,
a quick solution:
1. Copy the related items module with all files into the tmp folder
2. Rename the file mod_related_items.php (e.g: mod_related_bands.php, if this mod schould show related items from the category bands, or whatever you like).
3. Rename the file mod_related_items.xml (e.g.: mod_related_bands.xml)
4. Open the mod_related_bands.xml in an editor.
5. Edit <name> to whatever you want. Edit <filename module="mod_related_items">mod_related_items.php</filename> to e.g. <filename module="mod_related_bands">mod_related_bands.php</filename>.
6. Open mod_related_bands.php in an editor.
7. Edit $list = modRelatedItemsHelper::getList($params); to e.g. $list = modRelatedBandsHelper::getList($params); and
require(JModuleHelper::getLayoutPath('mod_related_bands'));
8. Open the helper.php in an editor.
9. Edit class modRelatedItemsHelper to e.g. class modRelatedBandsHelper
10. After ' AND a.state = 1' . add ' AND a.sectionid = 6' . and ' AND a.catid = 37' . (don´t forget the dots! 6 would be your section id and 37 your category id, you would like to filter for.)
11. Go to your Administration. Go to the Legacy mode. Install the new module from your tmp folder. (After installation, you can disable the legacy mode).
12. Copy the missing files (helper.php, index.html, tmpl folder) from the tmp folder to the module folder.
You can copy and edit so much related_items modules you like.
But: I cannot any php and don´t know, how the joomla framework works... so it would be nice, if a real developer could add these to the related items module, so any user can set section id´s and category id´s for the related items module in the joomla administration...
Guevara
a quick solution:
1. Copy the related items module with all files into the tmp folder
2. Rename the file mod_related_items.php (e.g: mod_related_bands.php, if this mod schould show related items from the category bands, or whatever you like).
3. Rename the file mod_related_items.xml (e.g.: mod_related_bands.xml)
4. Open the mod_related_bands.xml in an editor.
5. Edit <name> to whatever you want. Edit <filename module="mod_related_items">mod_related_items.php</filename> to e.g. <filename module="mod_related_bands">mod_related_bands.php</filename>.
6. Open mod_related_bands.php in an editor.
7. Edit $list = modRelatedItemsHelper::getList($params); to e.g. $list = modRelatedBandsHelper::getList($params); and
require(JModuleHelper::getLayoutPath('mod_related_bands'));
8. Open the helper.php in an editor.
9. Edit class modRelatedItemsHelper to e.g. class modRelatedBandsHelper
10. After ' AND a.state = 1' . add ' AND a.sectionid = 6' . and ' AND a.catid = 37' . (don´t forget the dots! 6 would be your section id and 37 your category id, you would like to filter for.)
11. Go to your Administration. Go to the Legacy mode. Install the new module from your tmp folder. (After installation, you can disable the legacy mode).
12. Copy the missing files (helper.php, index.html, tmpl folder) from the tmp folder to the module folder.
You can copy and edit so much related_items modules you like.
But: I cannot any php and don´t know, how the joomla framework works... so it would be nice, if a real developer could add these to the related items module, so any user can set section id´s and category id´s for the related items module in the joomla administration...
Guevara
- MiracleMarc
- Joomla! Intern
- Posts: 50
- Joined: Tue Mar 07, 2006 12:42 pm
- Location: Hilversum, The Netherlands
- Contact:
Re: [43]Show Related items within Section boundaries.
I developed some enhanchement to the orginal Related Items module
- limit items
- include/exclude sections
- include/exclude categories
- show related from current section
- show related from current category
Still some Alpha code, but seems pretty stable.
Check out at http://joomlacode.org/gf/project/relatedanything/
- limit items
- include/exclude sections
- include/exclude categories
- show related from current section
- show related from current category
Still some Alpha code, but seems pretty stable.
Check out at http://joomlacode.org/gf/project/relatedanything/
- dextercowley
- Joomla! Virtuoso
- Posts: 3286
- Joined: Sun Apr 06, 2008 4:44 am
- Location: Seattle, WA, USA
Re: [43]Show Related items within Section boundaries.
Hi. There is a new extension that, among other things, allows you to limit related items to a list of sections or categories. Also, it fixes a problem where multiple word phrases didn't work correctly. It is new but I have tested it as thoroughly as I know how. Here is the link: http://joomlacode.org/gf/project/freejo ... icles+Plus
Hope this helps. Thanks. Mark
Hope this helps. Thanks. Mark
Mark Dexter
"Well...how did I get here?"
"Well...how did I get here?"
-
- Joomla! Fledgling
- Posts: 2
- Joined: Tue Jun 30, 2009 7:31 pm
Re: [43]Show Related items within Section boundaries.
Hi,
Limiting the number of items shown is very simple:
1. Locate modules/mod_related_items/helper.php
2. Make a backup copy, in case you mistype something and you need to go back to the original version.
3. Locate this line (probably on line 84):
' AND ( a.publish_down = '.$db->Quote($nullDate).' OR a.publish_down >= '.$db->Quote($now).' ) ' ;
4. Change it to this:
' AND ( a.publish_down = '.$db->Quote($nullDate).' OR a.publish_down >= '.$db->Quote($now).' ) LIMIT 5 ' ;
5. Change the number 5 for whatever fits your needs.
That's all.
Limiting the number of items shown is very simple:
1. Locate modules/mod_related_items/helper.php
2. Make a backup copy, in case you mistype something and you need to go back to the original version.
3. Locate this line (probably on line 84):
' AND ( a.publish_down = '.$db->Quote($nullDate).' OR a.publish_down >= '.$db->Quote($now).' ) ' ;
4. Change it to this:
' AND ( a.publish_down = '.$db->Quote($nullDate).' OR a.publish_down >= '.$db->Quote($now).' ) LIMIT 5 ' ;
5. Change the number 5 for whatever fits your needs.
That's all.
-
- Joomla! Fledgling
- Posts: 4
- Joined: Sun Aug 02, 2009 7:05 pm
Re: [43]Show Related items within Section boundaries.
Thanks, cmadeira! Works perfectly!
- joomfriend
- Joomla! Explorer
- Posts: 284
- Joined: Sun Feb 08, 2009 5:10 pm
- Contact:
Re: [43]Show Related items within Section boundaries.
There are plenty extensions that achieve the same result without the need of hacking the Joomla Core file.
For example:
http://extensions.joomla.org/extensions/4744/details
For example:
http://extensions.joomla.org/extensions/4744/details
- https://www.adelnipet.com: Adelni Pet - Your Social Pet Network
- https://www.egliseprimitive.org: Christian Website
- https://www.egliseprimitive.org: Christian Website