yeserich_k4 wrote:could not verify this:jareeq wrote:
im writing about 1.61 downloaded from recomended link that line is missing and problem with sort order is back again...
Version 1.61, 14.03.2006
for mysql.4
line 281 $sql .= $sqlorder;
line 298 $sql .= $sqlorder;
dont know what file you are talking about!!!!!???
or do you mean it should be before the "LIMIT" statement on line 293?
{TEASER_EX} Replacement tag v1.90 - 10.1.2007
You found it some time ago
http://www.phpwcms.de/forum/viewtopic.p ... &start=219
for me it is not a problem I know where insert the line
http://www.phpwcms.de/forum/viewtopic.p ... &start=219
for me it is not a problem I know where insert the line
Hi,
I am using the reptags {teaser_ex} and {show_content:xxx}.
Now I want to show a news archive with {teaser_ex}. So {teaser_ex} shows the news items, but only the summary of the articles.
Now I want to show certain news items on the front page. So I use {show_content:xxx}. But {show_content:xxx} shows the ful article not the summary.
My problem is that I have to enter the news twice: in the summary for {teaser_ex} and in the full article for {show_content:xxx}. My client won't like this.
Does anyone have a suggestion how to solve this?
I am using the reptags {teaser_ex} and {show_content:xxx}.
Now I want to show a news archive with {teaser_ex}. So {teaser_ex} shows the news items, but only the summary of the articles.
Now I want to show certain news items on the front page. So I use {show_content:xxx}. But {show_content:xxx} shows the ful article not the summary.
My problem is that I have to enter the news twice: in the summary for {teaser_ex} and in the full article for {show_content:xxx}. My client won't like this.
Does anyone have a suggestion how to solve this?
-- Vuurvos --
you want to show the summary text and an particular contentpart below the summary?ff123 wrote:Hi,
I am using the reptags {teaser_ex} and {show_content:xxx}.
Now I want to show a news archive with {teaser_ex}. So {teaser_ex} shows the news items, but only the summary of the articles.
Now I want to show certain news items on the front page. So I use {show_content:xxx}. But {show_content:xxx} shows the ful article not the summary.
My problem is that I have to enter the news twice: in the summary for {teaser_ex} and in the full article for {show_content:xxx}. My client won't like this.
Does anyone have a suggestion how to solve this?
if so, try this modified version:
Code: Select all
<?php
//----------------------------------------------------------------------------------------------
// {SHOW_CONTENT}
// AUTHOR: Jens Zetterström
// DESCRIPTION: Shows the content of the article content part with the specified id.
// INSTALLATION: Put the code in frontend_render (for example in a file called show_content.php)
// Note: If the article content part contains replacement tags (for example {SITE}),
// they will not be replaced because code in frontend_render is executed after those
// replacement tags already have been processed. To fix, put the code in
// content.article.inc.php instead.
// {SHOW_CONTENT:acontent_id:show_summary}
// where acontent_id is the id of the content part.
// and set show_summary to 1 if you want to show the summary, 0 to hide it -> added by Erich Munz, erich_k4
//----------------------------------------------------------------------------------------------
function show_content($id, $showsummary, $db)
{
$CNT_TMP = '';
$template_default = $GLOBALS["template_default"];
$sql = "SELECT * " .
"FROM " . DB_PREPEND . "phpwcms_articlecontent " .
"INNER JOIN " . DB_PREPEND . "phpwcms_article ON " . DB_PREPEND . "phpwcms_article.article_id = " . DB_PREPEND . "phpwcms_articlecontent.acontent_aid " .
"WHERE acontent_id = " . $id . " " .
"AND acontent_visible = 1 " .
"AND acontent_trash = 0 " .
"AND " . DB_PREPEND . "phpwcms_article.article_deleted=0 AND ".DB_PREPEND."phpwcms_article.article_begin < NOW() " .
"AND " . DB_PREPEND . "phpwcms_article.article_end > NOW() ";
"ORDER BY acontent_sorting, acontent_id;";
if($cresult = mysql_query($sql, $db) or die("error retrieving article from database"))
{
if($crow = mysql_fetch_array($cresult))
{
if ($showsummary == 1) $CNT_TMP .= '<div class="articleSummary">'.$crow["article_summary"].'</div>'; // -> added by Erich Munz, erich_k4
// Space before
if($crow["acontent_before"])
{
$CNT_TMP .= '<div style="margin:' . $crow["acontent_before"] . 'px 0 0 0; padding:0 0 0 0; clear:both;"></div>';
}
// include content part code section
include("include/inc_front/content/cnt" . $crow["acontent_type"] . ".article.inc.php");
//check if top link should be shown
if($crow["acontent_top"])
{
if($template_default["article"]["top_sign_before"].$template_default["article"]["top_sign_after"])
{
$CNT_TMP .= $template_default["article"]["top_sign_before"];
$CNT_TMP .= '<a href="#top">'.$template_default["article"]["top_sign"].'</a>';
$CNT_TMP .= $template_default["article"]["top_sign_after"];
}
else
{
$CNT_TMP .= '<br /><a href="#top">' . $template_default["article"]["top_sign"] . '</a>';
}
}
// Space after
if($crow["acontent_after"])
{
$CNT_TMP .= '<div style="margin:0 0 ' . $crow["acontent_after"] . 'px 0; padding:0 0 0 0; clear:both;"></div>';
}
}
}
return $CNT_TMP;
}
if( ! ( strpos($content["all"],'{SHOW_CONTENT:')===false ) )
{
$content["all"] = preg_replace('/\{SHOW_CONTENT:(.*?):(.*?)\}/ie', 'show_content("$1", "$2", $db);', $content["all"]);
}
?>
{SHOW_CONTENT:acontent_id:show_summary}
where acontent_id is the id of the content part.
and set show_summary to 1 if you want to show the summary, 0 to hide it
NOTE that this modified version only displays the htmlformatted summary text, without images or assigned templatesettings...
Erich
Thanx for the fast reply and the enhanced reptag!!
One thing I wonder about if it is possible to show only the summary without having made an article. This is because I only write summaries, because the {teaser_ex} only shows summaries.
Of course I could ask the client to write a summary AND a full article, but that will be more work for him.
One thing I wonder about if it is possible to show only the summary without having made an article. This is because I only write summaries, because the {teaser_ex} only shows summaries.
Of course I could ask the client to write a summary AND a full article, but that will be more work for him.
Last edited by ff123 on Mon 10. Apr 2006, 20:19, edited 1 time in total.
-- Vuurvos --
-
- Posts: 14
- Joined: Sat 6. May 2006, 17:32
- Location: Düsseldorf
- Contact:
Hi @ all:
hab mir das hier runtergeladen und wieder hochgeladen
hab den {TEASER_EX:news|-1:6:default|ASC:1:Seite:1::defaultWeiter:1:0::0} eingesetzt aber guckt selbst --> http://www.f95-fan.de.vu
Was ist falsch?
Hätte das gern wie der Andi/ndm vor mir nur mit 2 News nebeneinander!
Danke im voraus,
Alex
hab mir das hier runtergeladen und wieder hochgeladen
hab den {TEASER_EX:news|-1:6:default|ASC:1:Seite:1::defaultWeiter:1:0::0} eingesetzt aber guckt selbst --> http://www.f95-fan.de.vu
Was ist falsch?
Hätte das gern wie der Andi/ndm vor mir nur mit 2 News nebeneinander!
Danke im voraus,
Alex
-
- Posts: 14
- Joined: Sat 6. May 2006, 17:32
- Location: Düsseldorf
- Contact:
Hi @ all:
schaut mal bitte --> http://www.f95-fan.de.vu
Wie kann ich vor jede Nachricht ein Bild machen?
schaut mal bitte --> http://www.f95-fan.de.vu
Wie kann ich vor jede Nachricht ein Bild machen?
-
- Posts: 14
- Joined: Sat 6. May 2006, 17:32
- Location: Düsseldorf
- Contact:
try
save as test.tmpl and upload to /phpwcms_template/inc_cntpart/articlesummary/list/
change your RT ...
{TEASER_EX:news|-1:6:default|ASC:0:Seite:2::test.tmpl:200:Alle Seiten:0:0::0}
greez Sven
Code: Select all
<table width="300" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100" rowspan="2">[IMAGE]<a href="{ARTICLELINK}">{IMAGE}</a>[/IMAGE]</td>
<td>[TITLE]{TITLE}[/TITLE]</td>
</tr>
<tr>
<td>[SUMMARY]{SUMMARY}[/SUMMARY]</td>
</tr>
</table>
change your RT ...
{TEASER_EX:news|-1:6:default|ASC:0:Seite:2::test.tmpl:200:Alle Seiten:0:0::0}
greez Sven
jetzt kommt mein "Problem" mit teaser - trotz generator und neuester Version kommt bei mir nur EIN Resultat...
folgende Seitenkonstruktion:
Level1
Level 1.1
Level 1.1.1
Artikel zu 1.1.1
Level 1.1.2
Artikel zu 1.1.2
Level 1.1.3
Artikel zu 1.1.3
Level 1.2
Level 2
Level 2.1
Level 3
usw.
Alle Artikel und Kategorien haben Schlagtext und -1 als Anzahl...
Ich möchte nun eine Übersuiht z.B. der neuen Artikel zu Level 1.1 - das sollten dann z.B. 3 Stück sein...
Was mache ich falsch? (es wird nur ein Artikel angezeigt, also WIE es geht weis ich schon )
PHP 4.3.1
MySQL 4.1.10a
folgende Seitenkonstruktion:
Level1
Level 1.1
Level 1.1.1
Artikel zu 1.1.1
Level 1.1.2
Artikel zu 1.1.2
Level 1.1.3
Artikel zu 1.1.3
Level 1.2
Level 2
Level 2.1
Level 3
usw.
Alle Artikel und Kategorien haben Schlagtext und -1 als Anzahl...
Ich möchte nun eine Übersuiht z.B. der neuen Artikel zu Level 1.1 - das sollten dann z.B. 3 Stück sein...
Was mache ich falsch? (es wird nur ein Artikel angezeigt, also WIE es geht weis ich schon )
PHP 4.3.1
MySQL 4.1.10a
wie schaut dein teaser_Ex RT aus? haben deine level einen alias?albu wrote:jetzt kommt mein "Problem" mit teaser - trotz generator und neuester Version kommt bei mir nur EIN Resultat...
folgende Seitenkonstruktion:
Level1
Level 1.1
Level 1.1.1
Artikel zu 1.1.1
Level 1.1.2
Artikel zu 1.1.2
Level 1.1.3
Artikel zu 1.1.3
Level 1.2
Level 2
Level 2.1
Level 3
usw.
Alle Artikel und Kategorien haben Schlagtext und -1 als Anzahl...
Ich möchte nun eine Übersuiht z.B. der neuen Artikel zu Level 1.1 - das sollten dann z.B. 3 Stück sein...
Was mache ich falsch? (es wird nur ein Artikel angezeigt, also WIE es geht weis ich schon )
PHP 4.3.1
MySQL 4.1.10a
Erich