{TEASER:alias} Replacement tag
hi Plauderer
and thanx for your answer
but,
(search for "structure-points alias" or "alias" on phpwcms-docu.de didnt return anything)
i have followed the instructions here:
--...--/index.php/topic,64.0.html
made my article templates as described in this thread at "Thu Sep 30, 2004 11:05" and used these on the article i want to "teaser" on the frontpage. (btw. the title of this article isnt shown in the news section anymore)
but as you said
yeah, im a n00b
ps. i just wanna do this: http://www.phpwcms.de/forum/viewtopic.php?t=6694 (meanwhile i prefer it not get the newest article automaticly)
and thanx for your answer
but,
where do i get/set "structure-points alias" ?Plauderer wrote:The alias with which you reference it is the structure-points alias!
(search for "structure-points alias" or "alias" on phpwcms-docu.de didnt return anything)
i have followed the instructions here:
--...--/index.php/topic,64.0.html
made my article templates as described in this thread at "Thu Sep 30, 2004 11:05" and used these on the article i want to "teaser" on the frontpage. (btw. the title of this article isnt shown in the news section anymore)
but as you said
would be very nice if someone who has this working on 1.2.3-dev could do a tutorial on this subject (or doesnt this work with 1.2.3-dev?)Plauderer wrote:The phpwcms-version i wrote for was Release 1.1-RC4 22-06-2004. I haven't tested it on newer versions although some said it works just aswell
yeah, im a n00b
ps. i just wanna do this: http://www.phpwcms.de/forum/viewtopic.php?t=6694 (meanwhile i prefer it not get the newest article automaticly)
hmm,
am i the onlyone who wants to use teaser with phpwcms1.2.3-dev ?!
is there no "built-in" way to display title,date,summary of desired article ?
btw. i've read (dunno where) that phpwcms2.0 will have "news" content type, will that atleast have this feature ?
as i know (php+mysql), this task is "very" easy, i wonder why its not implemented...
well, instead of waiting for someone to help, ill start to (dirty)hack it my self...
cheers,
osku
am i the onlyone who wants to use teaser with phpwcms1.2.3-dev ?!
is there no "built-in" way to display title,date,summary of desired article ?
btw. i've read (dunno where) that phpwcms2.0 will have "news" content type, will that atleast have this feature ?
as i know (php+mysql), this task is "very" easy, i wonder why its not implemented...
well, instead of waiting for someone to help, ill start to (dirty)hack it my self...
cheers,
osku
FYI: quick dirty n00b hack
Code: Select all
<?php
function get_article_teaseme($article_id){
$sql = 'select article_title,article_subtitle,article_summary,article_cid from '.
DB_PREPEND.'phpwcms_article where article_id = ' .$article_id;
if($result = mysql_query($sql)) {
$row = mysql_fetch_row($result);
$mylink = 'index.php?id='.$row[3].','.$article_id.',0,0,1,0';
return '<div class="listEntry"><h1>'.$row[0].'</h1><h2>'.$row[1].
'</h2><p class="topText">'.$row[2].
' <a href="'.$mylink.'">Mehr...</a></p></div>';
mysql_free_result($result);
}
}
if( ! ( strpos($content["all"],'{TEASEME')===false ) ) {
$content["all"] = preg_replace('/\{TEASEME:(.*?)\}/ie',
'get_article_teaseme("$1");',$content["all"]);
}
?>