Page 1 of 2
links to another page
Posted: Fri Oct 23, 2009 10:25 pm
by MonkhouseHosting
I have setup Serendipity on an internal server for my company. I want to like an RSS feed on the main page of our intranet site. I would normally use google reader to make that page but this is an internal site so thats not an option does anyone have another idea?
Re: links to another page
Posted: Sat Oct 24, 2009 1:17 am
by garvinhicking
Hi!
There is a serendipity "Aggregator" plugin available through spartacus, it can fetch RSS feeds and displays them inside your blog as if they were entries, do you mean that?
Regards,
Garvin
Re: links to another page
Posted: Sat Oct 24, 2009 4:20 pm
by MonkhouseHosting
I want to post the entries on my home page. like an RSS feed but I can't use an outside source like Google which is the problem.
Re: links to another page
Posted: Sat Oct 24, 2009 5:37 pm
by Don Chambers
Do you want to display serendipity entries on a site that is not serendipity? If so, see the last section labeled "Showing entries in foreign webpages" here:
http://www.s9y.org/78.html
Re: links to another page
Posted: Tue Oct 27, 2009 9:17 pm
by MonkhouseHosting
That is perfect thanks, for the help I just have one question I want to pull from one category and its not working. this is my code:
Code: Select all
// 4: Get the latest entries
$entries = serendipity_fetchEntries(null, true,2,$serendipity['GET']['Marketing']);
That still brings up other categories.
Re: links to another page
Posted: Wed Oct 28, 2009 10:17 am
by garvinhicking
Hi!
To fetch only entries frmo a specific category you need to set $serendipity['GET']['category'] = XXX BEFORE the serendipity_fetchEntries call.
If you want to fetch two entries from category #2, you use:
Code: Select all
$serendipity['GET']['category'] = 2;
$entries = serendipity_fetchEntries(null, true, 2);
Regards,
Garvin
Re: links to another page
Posted: Wed Oct 28, 2009 4:10 pm
by MonkhouseHosting
Is there anyway to have like a certain amount characters of an article and then have a read more button to go straight to the article?
Is that in the template?
Re: links to another page
Posted: Wed Oct 28, 2009 5:17 pm
by garvinhicking
Hi!
Yes, you can do that in your entries.tpl at the place where you emit $entry.body, you use the smarty "truncate" option ({$entry.body|@truncate:200:'...'}) and then place your {$entry.link} to link to the full version.
HOWEVER you should not do that. This is why serendipity offers you a "body" and "extended body" input field for your blog article. The "body" is always the teaser, and "extended" is already what is additionally displayed on the detail entry page. This splitting is implemented into almost every serendipity template, and you should make use of it. Plus it also splits entry based on editor's input and not randomly with a word length that might destroy an entry's introduction.
Regards,
Garvin
Re: links to another page
Posted: Fri Oct 30, 2009 2:32 pm
by MonkhouseHosting
Thats perfect, you are alot of help, I just have one thing and then everything would be perfect. How could I get rid of the Posted by" " and that stuff there.
Re: links to another page
Posted: Fri Oct 30, 2009 2:41 pm
by garvinhicking
Hi!
For that, check your entries.tpl template search for "POSTED_BY" and then you should see what you can remove.
Regards,
Garvin
Re: links to another page
Posted: Thu Dec 03, 2009 4:25 pm
by MonkhouseHosting
Is there any way to get entries from a certain category from a certain date? The thing is that we are using Serendipity as the back end put all the info is going to another web site because we do not want certain people seeing some of the categories. So if there is anyway to use a session variable to limit access that would be great.
Re: links to another page
Posted: Thu Dec 03, 2009 5:39 pm
by garvinhicking
Hi!
For PHP you can use the serendipity_fetchEntries() function, in smarty you could use {serendipity_fetchPrintEntries}. Both allow you to fetch entries from specific categories only.
Limiting access is done with serendipity authorgroups and the permission system of categories, though - and unrelated to your introductory question...?!?
Regards,
Garvin
Re: links to another page
Posted: Thu Dec 03, 2009 6:14 pm
by MonkhouseHosting
How do you use serendipity_fetchEntries() is there documentation on that?
Re: links to another page
Posted: Fri Dec 04, 2009 1:34 am
by Don Chambers
MonkhouseHosting wrote:How do you use serendipity_fetchEntries() is there documentation on that?
More info here:
http://www.s9y.org/78.html
Re: links to another page
Posted: Fri Dec 04, 2009 9:48 pm
by MonkhouseHosting
I have done that with the foreign web sites but theres no date range.