Page 1 of 1
related news
Posted: Wed Jan 21, 2009 10:36 pm
by tannos
Hi
i think it would be a nice feature.
This is the idea: develop a module or a function : "related news" or "related item" (if i wrote a page based on a movie with bruce willis it will give me all pages wich speak about bruce willis).
Re: related news
Posted: Wed Jan 21, 2009 11:32 pm
by JeremyBASS
um.. I can do that now with out a mod... for what it's worth....
cheers
jeremyBass
Re: related news
Posted: Thu Jan 22, 2009 6:06 am
by tannos
JeremyBASS wrote:
um.. I can do that now with out a mod... for what it's worth....
cheers
jeremyBass
Cool
I am very interesting and I think it may be very helpful
Re: related news
Posted: Thu Jan 22, 2009 6:13 am
by JeremyBASS
tannos wrote:
Cool
I am very interesting and I think it may be very helpful
I bet you are..

j/p are you meaning your interested in how to simulate that?... It may be nice to do nothing but point at some thing thou It may be harder to mod that in general then just to do it in a template... may-be... I was just letting you know that you can do what you asked now...
cheers
jeremyBass
Re: related news
Posted: Thu Jan 22, 2009 6:31 am
by tannos
Re:
Thanks for your answer
I am newbie

and I don't know anything in php and smarty. MAybe if you guve me some help i wll find a way to o it but I need some help to start
Re: related news
Posted: Thu Jan 22, 2009 7:20 am
by JeremyBASS
I suppose one of many ways to do this would be to go off the titles... so
reassing the current $entry->title what have you to a new var
{assign var=matchME value=$entry->title}
in a that same template you'd call another... via {capture} etc... then do something like
{assign var=matching value=$entry->title|regex_replace:"/*(?!`$matchME`)*/":""}
from
post element scrubber| Good for dropdowns of form templates in NEWs etc...
so you would replace the $entry->title in the for statment of the captured mod call that was in the first template... so you'd be useing $matching as the "related items"
now this is just one of many many ways you can do this... finding the right one comes down to what all do you want... how are you using what it... etc... thou it may not be click click done... you can do this with out a mod, or funky php, or even UDTs... smartys should be just fine...
Hope this helped a little...
cheers
jeremyBass
Re: related news
Posted: Thu Jan 22, 2009 7:04 pm
by tannos
Hello,
Just comeback to the office.
I had a quick look at your answer and ...I've one's work cut out.
I will try it this week-end.
If you can give me more details, i'll appreciate.
Thanks for all
mike
Re: related news
Posted: Thu Jan 22, 2009 8:01 pm
by JeremyBASS
Will... to be honest one... I'd need more from you in details, but two... to much more and I’d be writing it for you...

.... Let us start with explaining more on what you want to see and I'll see what I can do...
Cheers
jeremyBass
Re: related news
Posted: Thu Jan 22, 2009 10:17 pm
by nhaack
Theoretically, you could use the content_dump plug-in with it's filter parameter. It allows you to fulltext search the content DB for matching pages. However, this feature is experimental as it requires you to add a fulltext index for the content table by hand and I haven't tested this specific feature very much yet - I use it for context sensitive content snippets and it seems to work fine. Keep in mind that it will only search content blocks that appear on regular content pages. Access to other modules is not provided.
Read more in the wiki:
http://wiki.cmsmadesimple.org/index.php ... ntent_dump
Probably this can be a solution for your problem.
Best
Nils
Re: related news
Posted: Fri Jan 23, 2009 12:33 am
by JeremyBASS
Like I said before there are 50 ways to skin this cat.. but it's the info on what you want fully that makes the dif...
Two more possible solutions are to use the tagclould mod... with just a little modification of the output, it'll do what you want the best, as "related" is what a tag cloud is about... the other is to use the search in the core... it also has a tag cloud feature...
cheers
jeremyBass
Re: related news
Posted: Sat Jan 24, 2009 2:06 pm
by tannos
Hi
Thanks to both of you for your answers.
JeremyBASS: To better explain to you I would like a module or UDT or tag... which allows for:
I have an article on my page and I would like to have in a content block with links to other articles on the same subject.
what other details do you need?
Like I said I'm a beginner in php, but even though I don't know it well I can understand the code.
Re: related news
Posted: Sat Jan 24, 2009 4:32 pm
by JeremyBASS
like this?
http://www.calamshriners.com/Hospitals/ ... ere-i-sit/
sorry... I ask because I can think of a couple ways that you meant...
cheers
jeremyBass