Recent Topics

1 Jan 13, 2006 23:08    

im trying to cut the posts at a certain amount of words, i know that the cut parameter does the work, but i cant make it work.

any help please ?

2 Jan 13, 2006 23:39

 <?php $Item->content('#', '#', '#', '#', '#', '#', 'xml', 10) ?>

That should limit you to the first 10 words of the post.

3 Jan 14, 2006 01:48

that's what i did but with htmlbody instead of xml, and that's why it wasnt working.

why is that ?

4 Jan 14, 2006 02:25

I don't know. Does it work with xml?

5 Jan 14, 2006 02:49

yes thanks, works fine with xml but there's no html format

why the cut variable doesnt work with htmlbody ?

7 Jan 16, 2006 15:27

Can't say for sure because I'm not an insider with the dev team, but here's what I think might be the 'why' behind the 'what': the !M (read more) button is what you can use to provide a teaser in your html pages. It doesn't happen after X words - it happens at the exact point you want it to happen, which to my mind is better than forcing each and every post to get it's teaser done in X words. The 'cut' feature supports the idea of truncating your syndication feed for the feeds that offer a snippet. I forget which of them do that, but not all of them. In fact at least one of them that allows a snippet also gives the full post, so it's kinda wierd. Anyway what you're doing with this function is to say "give me the exact number of words from the XML side of town only put it into the HTML that browser visitors will see".

Dunno if that's accurate or just total crap from my empty head, but it sounds good!

8 Jan 17, 2006 15:21

i see your point and the !M button makes sense if you are the only blogger, but with multiblogs this is not always the case because most of the users dont use it, dont want to use it or maybe because they forgot.

i thought that the 'cut' feature was meant to give the control to the "admin" and not to the users, so all the posts in the main page will look similar regardless if the user used the !M button.

9 Jan 18, 2006 20:44

I've looked at the code..

$cut only gets recognized for format == 'xml'. Seems like a bug..

To fix it, remove the "($format == 'xml') &&" part from

if( ($format == 'xml') && $cut )

in /evocore/_item.class.php.

10 Jan 29, 2006 14:00

thanks!

now it works fine :D


Form is loading...