hacks: inserting separator between news content
Moderator: mcsmom
hacks: inserting separator between news content
the screenshot exempel is gone..
http://www.mambohut.com/hacks__mods__in ... _news.html
http://www.mambohut.com/hacks__mods__in ... _news.html
Last edited by guilliam on Sun Feb 05, 2006 8:59 pm, edited 1 time in total.
Re: need a guide for this tutorial
Hi,
Just played a little bit and it works (more or less elegant)
Open the file /components/com_content/content.php and insert the red bold lines.
The code snipped starts at beginning on line 896 with Joomla! 1.0.7.
Just played a little bit and it works (more or less elegant)
Open the file /components/com_content/content.php and insert the red bold lines.
The code snipped starts at beginning on line 896 with Joomla! 1.0.7.
// 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.Last edited by FrankS on Sun Feb 05, 2006 7:53 pm, edited 1 time in total.
Re: hacks: inserting separator between news content
thanks this shorty tutorial!!
how does the finished menu look like?
/Novata
Re: hacks: inserting separator between news content
novata 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
ok.sorry!
I need to take a break!
Re: hacks: inserting separator between news content
Hehe, know that.
Re: hacks: inserting separator between news content
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
Re: hacks: inserting separator between news content
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?
- Joomlawebber
- Joomla! Apprentice
- Posts: 14
- Joined: Wed Aug 17, 2005 10:12 pm
- Location: Denmark
- Contact:
Re: hacks: inserting separator between news content
novata 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
/KIf there is a bird flue, what happened to the egg flue?
Re: hacks: inserting separator between news content
jmc 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