The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 19 posts ] 
Author Message
PostPosted: Mon Oct 22, 2007 12:57 pm 
User avatar
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Sep 14, 2007 12:37 pm
Posts: 2
I'm using the Related Items module and in some cases I'm getting way too many related posts listed in the menu.

Does anyone know a way to put a limit on how many items that it can display? I really don't want more than 7-10.  ???

Any suggestions would be appreciated - thanks.


Last edited by virushead on Mon Oct 22, 2007 12:58 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Nov 29, 2007 4:14 pm 
Joomla! Intern
Joomla! Intern

Joined: Mon Oct 22, 2007 2:19 am
Posts: 57
Location: U.S.A
This is what i'm looking for also  ??? - can any one please help?

I know we can't pass a parameter, I've looked, but i might be wrong. But can we hack the code to accomplish this?

_________________
http://www.PeopleSoftGeeks.com

Life can only be understood backwards but it must be lived forwards.


Top
 Profile  
 
PostPosted: Fri Nov 30, 2007 1:41 am 
Joomla! Intern
Joomla! Intern

Joined: Mon Oct 22, 2007 2:19 am
Posts: 57
Location: U.S.A
I was able to figure this one out on my own  :pop

If have posted what i've done on my website so others can benefit from it just follow the link below

http://www.peoplesoftgeeks.com/joomla-t ... oomla.html

Later guys........

_________________
http://www.PeopleSoftGeeks.com

Life can only be understood backwards but it must be lived forwards.


Top
 Profile  
 
PostPosted: Fri Jun 27, 2008 7:27 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Feb 13, 2008 6:43 pm
Posts: 47
Location: Victoria, BC
Thanks for the fix. I too was looking for a way to limit related items.
Cheers!

_________________
"Web freelancer specializing in XHTML/CSS and web design. Currently learning Joomla 1.5."
http://www.coolnewmedia.com


Top
 Profile  
 
PostPosted: Mon Jul 07, 2008 7:12 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Aug 11, 2006 10:19 am
Posts: 11
Nice fix but I think I have just created one which works better performance wise because it only gets the desired number of articles from the database. The posted fix seems to get a query with 100 records and only limiting the number processed. It's also less to change ;-)

The fix I just created is also configurable from the administrator.

Backup \modules\mod_related_items.php and \modules\mod_related_items.xml

1. Open \modules\mod_related_items.php
2. Look for (line 17)
global $mosConfig_offset, $option, $task;
3. Below add
$count = intval( $params->get( 'count', 10 ) );
4. Find (line 59)
$database->setQuery( $query );
5. Replace with
$database->setQuery( $query, 0, $count );
6. Open \modules\mod_related_items.xml
7. Look for (line 21)
8. Above add
<param name="count" type="text" default="10" label="Count" description="The number of items to display (default 10)" />

Save and upload and configure from the modules administrator.

The way I came up with this fix is by looking how the latest items module was limited and applied the same to the related items module.

You can see this in action on http://www.sportfotografie.us in any content item (lees meer). It's the top module on the right called 'Gerelateerde items'.

Enjoy


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Tue Jul 08, 2008 4:20 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Feb 13, 2008 6:43 pm
Posts: 47
Location: Victoria, BC
Hi Xiphias,

You're solution is for Joomla 1.0.x and we're looking for a solution for Joomla 1.5.x As time permits, I look at your code and see if I can take your 1.0 example and port it to 1.5 (if possible--unfortnately I'm not the strongest coder.) Also I see if it's been proposed as a feature request.

Cheers,

Kevin

_________________
"Web freelancer specializing in XHTML/CSS and web design. Currently learning Joomla 1.5."
http://www.coolnewmedia.com


Top
 Profile  
 
PostPosted: Fri Aug 01, 2008 3:48 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Tue Mar 07, 2006 12:42 pm
Posts: 50
Location: Hilversum, The Netherlands
I developed some enhanchement to the orginal Related Items module for J1.5

- limit items
- include/exclude sections
- include/exclude categories

Still working on more options, like "show related from current section only"

Check out at http://joomlacode.org/gf/project/relatedanything/

_________________
Internetbureau Anytime Anyplace
http://www.anytime-anyplace.com
http://www.expertjoomla.com


Top
 Profile  
 
PostPosted: Fri Aug 15, 2008 11:46 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Aug 15, 2008 11:27 pm
Posts: 2
Thanks for the related anything module. I works for limiting the number and category.

I was looking desperately for a different option also. To show recently added articles. In other words to reverse the article order to show the latest articles at the top.
For example I want to show 15 latest related articles to the page.

Verr much appreciated if there is a solution...


Top
 Profile  
 
PostPosted: Mon Aug 25, 2008 6:24 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Aug 15, 2008 11:27 pm
Posts: 2
Find a solution for date order in MiracleMarc's related anything module.
In the helper.php file, you should change the line (155) as below.
Then it reversed the order to show recently added ones first.

' AND ( a.publish_down = '.$db->Quote($nullDate).' OR a.publish_down >= '.$db->Quote($now).' )';

to

' AND ( a.publish_down = '.$db->Quote($nullDate).' OR a.publish_down >= '.$db->Quote($now).' )' .
' ORDER BY a.created DESC';


Top
 Profile  
 
PostPosted: Mon Aug 25, 2008 9:07 am 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Tue Mar 07, 2006 12:42 pm
Posts: 50
Location: Hilversum, The Netherlands
Yes, that is totally correct. Thanks for this feature.

In the next release I will add this as an option in the module, so you can choose between: order by latest, order by olderst, order by most relevant, etc.

Thank you,
Marco

_________________
Internetbureau Anytime Anyplace
http://www.anytime-anyplace.com
http://www.expertjoomla.com


Top
 Profile  
 
PostPosted: Tue Sep 09, 2008 1:08 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Apr 17, 2007 10:34 am
Posts: 110
Location: Durban, South Africa.
Thanks PSGeeks, I tried to adjust the helper.php, but I just get an error on line 116...must be said that I by no means a coder :'( - I just cut and paste, but clearly I am doing something wrong. any chance you could upload the adjusted helper.php file as a whole?


Top
 Profile  
 
PostPosted: Tue Sep 09, 2008 2:00 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Tue Mar 07, 2006 12:42 pm
Posts: 50
Location: Hilversum, The Netherlands
I will update the code, today end of day.
So no need to code yourself ;)

_________________
Internetbureau Anytime Anyplace
http://www.anytime-anyplace.com
http://www.expertjoomla.com


Top
 Profile  
 
PostPosted: Tue Sep 09, 2008 2:22 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Apr 17, 2007 10:34 am
Posts: 110
Location: Durban, South Africa.
Superb. Let me know when...

Thanks again!


Top
 Profile  
 
PostPosted: Thu Sep 11, 2008 5:54 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Tue Mar 07, 2006 12:42 pm
Posts: 50
Location: Hilversum, The Netherlands
It is there to download -> http://joomlacode.org/gf/project/relatedanything/

_________________
Internetbureau Anytime Anyplace
http://www.anytime-anyplace.com
http://www.expertjoomla.com


Top
 Profile  
 
PostPosted: Fri Sep 12, 2008 5:57 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Apr 17, 2007 10:34 am
Posts: 110
Location: Durban, South Africa.
Fantastic! Thanks.

A nice feature may be a negative keyword option? For example I have a site that is about a rugby board game. The keywords board game, and rugby appear often, but I don't want the articles to relate on those words as every article would show up.

If you could assign a negative keyword list to ignore those 'site generic' terms it would be great. It's a feature I would find useful - but maybe not so useful for others...

Thanks again.


Top
 Profile  
 
PostPosted: Fri Sep 12, 2008 3:16 pm 
Joomla! Intern
Joomla! Intern

Joined: Thu Jan 03, 2008 12:06 pm
Posts: 51
Sorry for asking... ;-)
But i would really need your great advanced related Module for J!1.0x ! I know the only alternative "Related XTD" is not exactly what i needed. Though it is really rich on features and.

If i read it right, your module is able to limit the search in specific Cat/Sec...
I need a relation from the current article to articles from OTHER categories or sections – IMHO a must have. But there seems no solution or requests for this alternative way?!?

Can you adapt your module to J!1.0 ?
Please!!!
TIA!!! !!!


Top
 Profile  
 
PostPosted: Wed Oct 08, 2008 9:33 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Sun Apr 06, 2008 4:44 am
Posts: 3290
Location: Seattle, WA, USA
Hi. Here is a link to a new, free related items extension that might help: http://joomlacode.org/gf/project/freejoomla/wiki/.

Hope this helps. Mark

_________________
Mark Dexter
"Well...how did I get here?"


Top
 Profile  
 
PostPosted: Wed Dec 31, 2008 12:22 am 
Joomla! Intern
Joomla! Intern

Joined: Thu Jan 03, 2008 12:06 pm
Posts: 51
dextercowley wrote:
Hi. Here is a link to a new, free related items extension that might help: http://joomlacode.org/gf/project/freejoomla/wiki/.

Hope this helps. Mark


Some time ago ;-)
Thank you for the link... this project seems to evolve in the right direction!
Now even with component and new options.
CU


Top
 Profile  
 
PostPosted: Fri Apr 02, 2010 8:16 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Jul 15, 2009 11:01 am
Posts: 26
dextercowley wrote:
Hi. Here is a link to a new, free related items extension that might help: http://joomlacode.org/gf/project/freejoomla/wiki/.

Hope this helps. Mark


great module.
thanks for the heads up

_________________
http://urbanwireless.info | http://[red d].weed-products.org


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ] 



Who is online

Users browsing this forum: No registered users and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group