{TEASER_EX} Replacement tag v1.90 - 10.1.2007
-
- Posts: 56
- Joined: Thu 7. Jul 2005, 16:05
Hi
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=.....
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=.....
Greetz, tinoo
-
- Posts: 56
- Joined: Thu 7. Jul 2005, 16:05
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
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
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.
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.
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:
and if $latestonly is 1, where the query is executed, I have an additional IF statement at the start, as follows:
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
An IN clause list of acat_id's is combined:
Code: Select all
$catin .= "'".aporeplace($alias[$i]['acat_id'])."',";
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
{ ...

Thanks
-
- Posts: 56
- Joined: Thu 7. Jul 2005, 16:05
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:
Thanks in advance!
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:
Maybe someone can tell me how to get the text floating below the image.//-->
[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>
Thanks in advance!
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...
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...
Greetz, tinoo
-
- Posts: 56
- Joined: Thu 7. Jul 2005, 16:05
-
- Posts: 56
- Joined: Thu 7. Jul 2005, 16:05
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:
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
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:

I put teaserTable, teaserTableLeftCell, teaserTableRightCell in my frontend css but that doesn´t change anything.<!-- START NEWS TABLE -->
<table id="teaserTable"><tr><td id="teaserTableLeftCell" valign="top" width="100%"><!--
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
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?
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?

Greetz, tinoo