hacks: inserting separator between news content
Posted: Sun Feb 05, 2006 7:05 pm
the screenshot exempel is gone..
http://www.mambohut.com/hacks__mods__in ... _news.html
http://www.mambohut.com/hacks__mods__in ... _news.html
Joomla! Community, help and support.
https://sandbox-forum.joomla.org/
// Leading story output
if ( $leading ) {
echo ''; ';
echo ''; ';
for ( $z = 0; $z < $leading; $z++ ) {
if ( $i >= $total ) {
// stops loop if total number of items is less than the number set to display as leading
break;
}
echo '';';
show( $rows[$i], $params, $gid, $access, $pop, $option, $ItemidCount );
echo '
$i++;
}
echo "
";
echo '
echo '
}
if ( $intro && ( $i < $total ) ) {
echo '';
echo '';
echo '';
// intro story output
for ( $z = 0; $z < $intro; $z++ ) {
if ( $i >= $total ) {
// stops loop if total number of items is less than the number set to display as intro + leading
break;
}
if ( !( $z % $columns ) || $columns == 1 ) {
echo ''; ';
}
echo ''; ';
// outputs either intro or only a link
if ( $z < $intro ) {
show( $rows[$i], $params, $gid, $access, $pop, $option, $ItemidCount );
} else {
echo "
";
echo '
echo '
break;
}
echo "
";
echo '';
Just play a little bit also with the other possibility at the Mambo tutorial.
Make a backup of the file first.
Re: hacks: inserting separator between news content
Posted: Sun Feb 05, 2006 10:05 pmthanks this shorty tutorial!!
how does the finished menu look like?
/Novata
Re: hacks: inserting separator between news content
Posted: Sun Feb 05, 2006 10:12 pmnovata wrote:how does the finished menu look like?
Menue? Which menue?
The Mambohut tutorial is for no menue.
It makes separators (hr) between the news in content (frontpage, blog, ...)
Re: hacks: inserting separator between news content
Posted: Sun Feb 05, 2006 10:15 pmok.sorry!
I need to take a break!
Re: hacks: inserting separator between news content
Posted: Sun Feb 05, 2006 10:20 pmHehe, know that.
Re: hacks: inserting separator between news content
Posted: Sun Feb 05, 2006 11:59 pmThere is actually no need to do this. The article referenced in your link was written in 2004. There is an existing Joomla css class for an article "seperator", and the code is already built into your pages. All you need to do is create the entry in your template_css.css file.
Like so:
.article_seperator {
display : block;
height : 15px;
background-image : url(../images/separator.gif);
background-repeat : repeat-y;
}
Example : http://www.hartlepoolcameraclub.co.uk
HTH,
John Mc
Re: hacks: inserting separator between news content
Posted: Mon Feb 06, 2006 11:54 amI was thinking about this,I have not tested yet but maybe there is another way to do it without handcoding,just upload a mosimage.. is there any difference?
Re: hacks: inserting separator between news content
Posted: Mon Feb 06, 2006 2:20 pmnovata wrote:I was thinking about this,I have not tested yet but maybe there is another way to do it without handcoding,just upload a mosimage.. is there any difference?
The difference mentioned above is that you are sure that when you upgrade to a newer version of joomla, you dont have to handcode it all over again.
This way its sure to stay the same way
/K
Re: hacks: inserting separator between news content
Posted: Fri Mar 17, 2006 6:28 pmjmc wrote:There is actually no need to do this. The article referenced in your link was written in 2004. There is an existing Joomla css class for an article "seperator", and the code is already built into your pages. All you need to do is create the entry in your template_css.css file.
Like so:
.article_seperator {
display : block;
height : 15px;
background-image : url(../images/separator.gif);
background-repeat : repeat-y;
}
Example : http://www.hartlepoolcameraclub.co.uk
HTH,
John Mc
Hi,
surely I am doing something wrong, but I copied the code, uploaded the image to /images and it is not showing anything. Using Lunar Eclipse template.
Thank you for your help.
Muller