SSI question...

Started by Uchiha, May 18, 2010, 06:54:00 PM

Previous topic - Next topic

Uchiha

Well, i want to make something like a portal and i'm not intrested in use any of the portal mods, then, i want to use the SSI, but i see, when i include X board, the posts appears, but, complete, and i only want to appear 300 characters, no more, if someone knows how to do this with SSI, please help me, thanks a lot, regards
Sorry For My Bad English, I Dont Speak Good, But I Try

Arantor

What SSI function are you using?

Uchiha

This is the line

ssi_boardNews($include_boards = 95);
Sorry For My Bad English, I Dont Speak Good, But I Try

Arantor

Use:
ssi_boardNews(95, null, null, 300);

Btw, ssi_boardNews doesn't support $include_boards, it only does one board.

Uchiha

You're wrong, i'm using exactly that line, and works good, but, show all posts, and i just want to see 300 characters,
Sorry For My Bad English, I Dont Speak Good, But I Try

Arantor

Oh, so you want to argue with the source of SSI.php?

// Show the latest news, with a template... by board.
function ssi_boardNews($board = null, $limit = null, $start = null, $length = null, $output_method = 'echo')
{
global $scripturl, $db_prefix, $txt, $settings, $modSettings, $context;
global $smcFunc;


It works because when you do an assignment, the value is passed right to left into the placeholder.

You doing ssi_boardNews($include_boards = 95) is IDENTICAL to ssi_boardNews(95).

If you don't believe me, try it. Then try the line I gave you and see if it works for you.

Uchiha

i think you don't understand me, i never say "how to make it work?", i say "how i can limit the number of characters?", 'cause appear the post complete, and i just want to appear 300 characters, not all the post.
Sorry For My Bad English, I Dont Speak Good, But I Try

Arantor

I gave you the actual line of code to use several posts back.

Uchiha

you still not understand, the line works perfectly, but, the result is the post complete, if the post have 950k characters, the 950k characters appears, but, i just need to appear 300 characters, no more than that.

Example:
Actually, i see this


This is what i want:


If you see, in the first image the post is complete, but, in the second, at the bottom of the post appear "read more"  and beside says "escribir comentario(write comment)", this is exactly what i want

Thanks for your answers
Sorry For My Bad English, I Dont Speak Good, But I Try

Arantor

Quote from: Arantor on May 18, 2010, 08:13:11 PM
Use:
ssi_boardNews(95, null, null, 300);

Btw, ssi_boardNews doesn't support $include_boards, it only does one board.

And what happens if you use that line?

Uchiha

thx, this line woks perfectly, just what i want, thx again, topic solved
Sorry For My Bad English, I Dont Speak Good, But I Try

Advertisement: