Page 5 of 27
Posted: Fri 12. Aug 2005, 07:38
by tinoo
hi susi
Schau mal ganz am Anfang dieses Postings. Da hat's ein Parameter beschrieben, mit welchem man angeben kann in wievielen Spalten die Artikel angezeigt werden sollen... vielleicht steht da bei wir 2???
Posted: Fri 12. Aug 2005, 11:19
by susi
supi, danke!
das war der fehler, das hatte ich übersehen.

)))
Posted: Sun 14. Aug 2005, 16:29
by Apollo2000
First, thanks for this great RT!
I have a site in 2 languages (de/en) with different news content.
Is it possible to get a link "mehr..." for the German news and an english link "more..." for the english news after the teaser?
Posted: Sun 14. Aug 2005, 23:31
by tinoo
Hi
Apollo2000 wrote:First, thanks for this great RT!
I have a site in 2 languages (de/en) with different news content.
Is it possible to get a link "mehr..." for the German news and an english link "more..." for the english news after the teaser?
One way to solve this:
Create two different templates.... You can put the "more" / "mehr" link as
a fix link once in the template for the german-version and once in the english
template. Just look how they are created by the standard-template and
replace the {MORE}-tag by a hardcoded <a href=.....
Posted: Mon 15. Aug 2005, 10:42
by Apollo2000
@tinoo
thanks a lot for your help! Perfect solution!

Posted: Mon 15. Aug 2005, 21:57
by iceman
Excellent RT, well done!
One question:
I have 3 different "sources" for news items (different site structure levels where articles are created), but on the front page, I only wanted to show the "latest" news item out of the 3 different categories.
I want to show it with the normal summary + more link.
I am currently using:
{TEASER_EX:repnews|1;news|1;whistlenews|1:1:article_begin|DESC:0:page:1:0}
But what I receive is a single news item, but with pagination to show the other 2 categories as single news items.
How can I get it to only display the very latest "single" news item, sourced from 3 different categories?
Thanks
Mike
Posted: Mon 15. Aug 2005, 22:26
by volkman
mike,
try
{TEASER_EX:repnews|1;news|1;whistlenews|1:3:article_begin|DESC:0:page:1:0}
the numer 3 is for three articles you wanna show.
have a good one
volkman
Posted: Mon 15. Aug 2005, 22:31
by iceman
Hi Volkman, thanks for trying.
But that is no different than what I get now, I don't *want* to display 3 articles, I only want to display 1 article, the very latest article out of a possible 3 categories.
I've had a look at the code, and it seems the way it creates an SQL statement using UNION from the list of categories, I don't think there's any way to do what I want without adding my own hack in there to do an "IN" clause with the article category in a single query, not a UNION query of each category.
Posted: Mon 15. Aug 2005, 22:43
by iceman
For now, I have hacked the hack, taking in an extra argument $latestonly (0 or 1).
An IN clause list of acat_id's is combined:
Code: Select all
$catin .= "'".aporeplace($alias[$i]['acat_id'])."',";
and if $latestonly is 1, where the query is executed, I have an additional IF statement at the start, as follows:
Code: Select all
if ($latestonly == 1)
{
$catin = substr($catin, 0, -1);
$sql .= "SELECT *, '".$alias[0]['acat_name']."' AS catname, UNIX_TIMESTAMP(article_tstamp) AS article_date FROM ".DB_PREPEND."phpwcms_article ";
$sql .= " WHERE article_cid IN (".$catin.")";
$sql .= $sql_VISIBLE_MODE;
$sql .= " AND article_deleted=0 AND article_begin < NOW() AND article_end > NOW() ";
if ($c_article_id) $sql .= " AND article_id NOT IN ($c_article_id) ";
$sql .= $sqlorder;
if ($alias[0]['topcount'] >= 1) $sql .= " LIMIT ".$alias[0]['topcount'];
}
else
{ ...
I also amended the part at the bottom to pass the extra parameter. It serves my purpose for now, unless someone comes up with another way without hacking the hack
Thanks
Posted: Tue 16. Aug 2005, 00:01
by tinoo
Hi iceman
Maybe Erich will take this into the next version. We should force him to create a backend form for all these parameters...

Posted: Tue 16. Aug 2005, 17:10
by Apollo2000
hi
I edited my sample.tmpl from articlesummary/list the way that a picture in the teaser text is shown right beside the text with a distance of about 30px. Everything is fine, except one single thing: I can´t get the text floating under the image. It should be like this:
http://de.selfhtml.org/html/grafiken/an ... _fluss.htm
The text on my article list still continues with the margin of the image, even when it passes the image.
I tried for some hours to solve this problem, expieriencing with several css-codes, but I didn´t get it.
This is the code of my sample.tml:
//-->
[SPACE]<hr>[/SPACE]
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>
<td valign="top">[SUMMARY]<div class="newstext">{SUMMARY}</div>[/SUMMARY]<br>
[MORE]<a href="{ARTICLELINK}">mehr »</a>[/MORE]
</td>
<td width="30"><img src="img/spacer.gif" border="0" width="30" height="1" alt=""></td>
<td valign="top">
<div align="right">[IMAGE]<div>{IMAGE}</a></div>[/IMAGE]</div></td>
</tr>
</table>
Maybe someone can tell me how to get the text floating below the image.
Thanks in advance!
Posted: Tue 16. Aug 2005, 17:15
by tinoo
Hi Appollo2000
Your Text can not float, because text and image are in different table-cells...
Look at the source-code of the selfhtml-site and you'll see, that the example there is not using tables...
Put summary-text and image in the same table-cell and use the parameter
align="right" for the <img>-tag, then your text will float around the image...
Posted: Tue 16. Aug 2005, 17:21
by Apollo2000
hi tinoo,
I just wanted to edit or delete my posting because I found out that stupid mistake myself a minute ago
But you were too fast
That happens when you sit 10 hours nonstop in front of your pc with an overdose of coffee
Thanks anyhow for your help!
Posted: Wed 17. Aug 2005, 13:08
by Apollo2000
hi,
it´s me again with another problem
I discoverd a small margin (~3-6 px) on the left side of the teaser text in article listing and I have no idea how and where this margin is created.
Maybe it has something to do with this:
<!-- START NEWS TABLE -->
<table id="teaserTable"><tr><td id="teaserTableLeftCell" valign="top" width="100%"><!--
I put teaserTable, teaserTableLeftCell, teaserTableRightCell in my frontend css but that doesn´t change anything.
The "Seite: 1 2 3" at the bottom of the listing page comes without margin on the left side, but not the text of the article listing.
That happens with default sample.tmpl as well as with my edited sample.tmpl.
Thanks in advance for any help!
Volker
Posted: Wed 17. Aug 2005, 13:22
by tinoo
Hi apollo2000
Yes, you're right - there is a cap... I don't know where this comes from, but
i guess it is the way html-code is rendered. Just compare the navigation-part and the text-part of the teaser_ex. One is displayed in a <div> tag, the other in a table. Maybe this causes the difference... But - does it matter?
