want to add Intro content easy ?
this lil addon will display your intro content while on category page ( teaser ),
when article is in full view this content will not show.
For sNews v17 just add the function and use the FUNC in
article editor to call the function and to add your Teaser.
For sNews v1.6 Best Use with - [MOD] Function use in articles (snews1.6) by philmoz,
Read here How to install http://snewscms.com/forum/index.php?topic=4583.0
In article editor, use the func button to add content.
EG:
Demo:
Note: do not use the chart ( , ) with in the function,
one of snews function cut the text if this chart is used.
this lil addon will display your intro content while on category page ( teaser ),
when article is in full view this content will not show.
For sNews v17 just add the function and use the FUNC in
article editor to call the function and to add your Teaser.
For sNews v1.6 Best Use with - [MOD] Function use in articles (snews1.6) by philmoz,
Read here How to install http://snewscms.com/forum/index.php?topic=4583.0
<?php
/*
Very Simple Intro Mod for sNewsCMS v1.6/1.7 ( Auto Detected ).
by Moshe Gil Lamberger.
date: Jun 7, 2008 :: 23:12 ::
website: http://www.cms-zen.com
Note: For v1.6 Best use with ( built in 17 )
[MOD] Function use in articles (snews1.6) by philmoz.
location: http://snewscms.com/forum/index.php?topic=4583.0
*/
function intro($introtxt=''){
// test if we are on sNews v.16 else we are on sNews v.17 ,
// and set A Var for article id.
if (function_exists('get_id')) {
$_ID = get_id('article');
} else {
global $_ID;
}
// Display the Intro if we are not in full article view
if( !$_ID ) {
if(!empty($introtxt)) {
echo '<div class="intro-Div">';
echo '<div class="intPad">';
echo $introtxt;
echo '</div>';
echo '</div>';
}
}
//////
}
?>
Style for use with function, can be changed to your needs.
<style type="text/css">
.intro-Div{ }
.intPad{ }
.intro-Div img { padding:1%; }
.intro-Div a img { border:1px solid #f5f5f6; }
.intro-Div a:hover img {
border:1px solid #ccc;
background:#f4f4f5;
}
.intro-Div p { padding:2px 1%;
border-left:12px solid #00FF33;
}
</style>
In article editor, use the func button to add content.
add break tag after func tag.
EG:
Demo:
Note: do not use the chart ( , ) with in the function,
one of snews function cut the text if this chart is used.





on 2008-07-12 14:41:47
on 2008-07-12 14:47:06
They destroy everything good and nice. And they can't do anything else, just destroying things.
Well, this is not big deal... the big deal (and very hard) is to make something good. And only THAT is a reason to be proud.
on 2008-07-12 16:59:00
i think you have a point, i will go read about akismet.
you are so right, some ppl do not have nothing GOOD to do,
so they messup others.
all i can is feel sorry for them.
on 2009-01-31 22:42:55
something like this
$ReplacementArray[$i]["***.description"] = _fnc("strtrim", $RandomezineRow["description"], 350);
strtrim will solve all this in simple way
on 2009-02-11 20:24:16
trim functions will cut text,
but not as flexible as this mod.