[43]Show Related items within Section boundaries.

Locked
pmu
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Thu Feb 21, 2008 11:15 am

[43]Show Related items within Section boundaries.

Post by pmu » Mon Feb 25, 2008 8:45 am

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!

7sins
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Fri Sep 01, 2006 6:40 pm

Re: [43]Show Related items within Section boundaries.

Post by 7sins » Wed Apr 02, 2008 3:38 pm

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!

etiger13
Joomla! Apprentice
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.

Post by etiger13 » Fri Apr 04, 2008 5:25 pm

yeah i want this too. seems like it should have had it already ....
The Ramblings of a Fosgnilbmareht: http://blog.eddiemonge.com

Tigratrus
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue Jan 29, 2008 3:29 am

Re: [43]Show Related items within Section boundaries.

Post by Tigratrus » Mon Apr 07, 2008 4:19 am

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?

Mraz
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Jul 08, 2008 11:48 am

Re: [43]Show Related items within Section boundaries.

Post by Mraz » Tue Jul 08, 2008 12:57 pm

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

Guevara
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Jun 17, 2008 11:15 am

Re: [43]Show Related items within Section boundaries.

Post by Guevara » Fri Jul 18, 2008 7:41 pm

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

User avatar
MiracleMarc
Joomla! Intern
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.

Post by MiracleMarc » Fri Aug 01, 2008 3:39 pm

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/

User avatar
dextercowley
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3286
Joined: Sun Apr 06, 2008 4:44 am
Location: Seattle, WA, USA

Re: [43]Show Related items within Section boundaries.

Post by dextercowley » Wed Oct 08, 2008 4:03 pm

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
Mark Dexter
"Well...how did I get here?"

cmadeira
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Jun 30, 2009 7:31 pm

Re: [43]Show Related items within Section boundaries.

Post by cmadeira » Tue Jun 30, 2009 7:35 pm

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.

jolynsjoomla
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sun Aug 02, 2009 7:05 pm

Re: [43]Show Related items within Section boundaries.

Post by jolynsjoomla » Wed Sep 02, 2009 4:49 pm

Thanks, cmadeira! Works perfectly!

User avatar
joomfriend
Joomla! Explorer
Joomla! Explorer
Posts: 284
Joined: Sun Feb 08, 2009 5:10 pm
Contact:

Re: [43]Show Related items within Section boundaries.

Post by joomfriend » Mon Dec 14, 2009 4:10 am

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
- https://www.adelnipet.com: Adelni Pet - Your Social Pet Network
- https://www.egliseprimitive.org: Christian Website


Locked

Return to “Under Review - Archived”