| Author |
Message |
cberks
Joined: 06 Aug 2007 Posts: 36
|
|
RELATED POSTS BASED ON CATEGORY |
|
Has anyone developed a "related posts" plugin which show titles of posts in same category as part of the template for short or full story?
- or -
Can someone point me to which *.php or *.inc are where the substitution is done for the template tags as I would like to add processing for a tag for relatedbycategory which does not need any extra fields etc like the current related posts plugin - or - would it be it be better to approach this by including php code in the short or full story templates to pull the titles fopr all posts in the posts category
|
|
| Tue Jul 22, 2008 12:19 am |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
|
FI-DD made this plugin:
http://forums.cutenewsru.com/viewtopic.php?t=675&highlight=related
If you haven't seen that already.
I also found a way using xfields OR cutefields to display related posts using any template you'd like in an iframe on the {full-story}
How are you trying to display your related results? Although my method didn't care what category content was in, as long as it had the right keyword.
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Tue Jul 22, 2008 1:00 am |
|
 |
cberks
Joined: 06 Aug 2007 Posts: 36
|
|
|
|
I am presuming that the "related posts pluging requires one to go back and update all posts if one wants to add another new item to the set of related posts.
I would like to be able to add automatically in either short or full story -- by placing a template tag -- show titles/links of all posts in the category (categories) of the item being displayed and have this automatic even if new items are posted in the category (categories)
Further I have added to my database some additional fields including an "image " field. (I needed to add fields to database rather than use xfields as there is a bug and templates-by-category do not work if xfields are used -- and I would further like to have an alternative to the above which places at top or side or bottom etc of the displayed item thumbnails of the images associated with each of the items in the same category as the item being displayed.
So do I approach this by creating new template tags and function(s) or by using php in the templates??? I presume I cannot nest shownews.php within a template using php-in-template!!
Ultimately being able to mimic my PICAVIEW adapted website http://www.gmcbennington.info/picaru in CNRU
click on an album name to get a blog view
click on a foto to get single image view
|
|
| Tue Jul 22, 2008 10:21 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
|
Unfortunately, I believe it's impossible to have it automatically redo all your news ever for you. I believe the fastest solution to redo news in lump sums with the new feature is FI-DD's ajax solution.
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Wed Jul 23, 2008 12:30 am |
|
 |
Torstein
Joined: 03 Aug 2006 Posts: 96
|
|
|
|
There is a way to display the latest posts from whichever category the post is in:
 |  |
$number = 5;
include $cutepath.'/show_news.php';
if ($id and $ucat){
$static['template'] = 'Headlines';
$static['number'] = 7;
$static['category'] = $ucat;
include $cutepath.'/show_news.php';
} |
This will show the headlines of the 7 latest posts from the category the news item you are viewing is in.
Use this code as the include code on the page you include your news/display your news.
*I haven't actually tested this code*
|
|
| Wed Jul 23, 2008 3:50 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
|
Very neat Torstein 
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Thu Jul 24, 2008 12:37 am |
|
 |
Torstein
Joined: 03 Aug 2006 Posts: 96
|
|
|
|
Well I took it from the readme 
|
|
| Thu Jul 24, 2008 7:57 pm |
|
 |
|