Erstellungsdatum des Artikels falsch

If you've problems with unsupported - non official ;-) - functionalities use this forum please.
Post Reply
digidotter
Posts: 33
Joined: Thu 7. Dec 2006, 22:10
Location: Düren, Germany
Contact:

Erstellungsdatum des Artikels falsch

Post by digidotter »

Ich nutze den RT {WAK_ARTICLE_CREATED:SHORT} in einem Template, welches das Erstellungsdatum von Artikeln in einem Teaser-Content ausgeben soll. Leider wird nicht das Erstellungsdatum dieses jeweiligen Artikels ausgegeben, sondern das Erstellungsdatum des Artikels, in welchem der CP Teaser liegt. Das ist recht unerquicklich, da dann überall das gleiche Datum steht und es mit dem eigentlichen Beitrag nichts zu tun hat.
Kann jemand helfen? :?:
Der Tag hat 24 Stunden, deshalb schlafe in der Nacht!
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

dies gehört hier nicht rein, da kein offizieller RT. Also an den Autor wenden und im Hacks Bereich nachfragen.

Verschoben.

Oliver
Last edited by Oliver Georgi on Sun 8. Jul 2007, 13:20, edited 1 time in total.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
kubens
Posts: 168
Joined: Sat 6. Nov 2004, 15:29
Location: Duesseldorf near Cologne ;-)

Post by kubens »

I had not expected that anybody is still using this RT :lol: I checked your issue. If you have the article id then you can use the the RT inside a teaser template:

Code: Select all

{WAK_ARTICLE_CREATED:SHORT:{ARTICLEID}}
But as far as I was able to point out the article id is not available. I personally do not like to modify original source, because this will prevent that you can update to next versions by a simple mouse click. However you can achieve this by a little enhancement of the original source which I checked in a fresh installed 1.3.3 and it works.

\include\inc_front\content\cnt8.article.inc.php

Code: Select all

// line 218
$content['alink']['tr'][$key]	= str_replace('{ARTICLELINK}', 'index.php?aid='.$row['article_id'], $content['alink']['tr'][$key]);

// add this line  
$content['alink']['tr'][$key]	= str_replace('{ARTICLEID}', $row['article_id'], $content['alink']['tr'][$key]);
\template\inc_cntpart\teaser\teaser_block.html

Code: Select all

<!--TEASER_HEAD_START//-->
<div style="margin:15px 0 15px 0;background-color:#E6E9F0;padding:7px;width:250px;">
<!--TEASER_HEAD_END//-->

<!--TEASER_ENTRY_START//-->
	<div>
		<h3>{WAK_ARTICLE_CREATED:SHORT:{ARTICLEID}}:<a href="{ARTICLELINK}">{TITLE} &raquo;</a></h3>
		[IMAGE]<div style="float:left; margin:2px 5px 2px 0">{IMAGE}[CAPTION]<p>{CAPTION}</p>[/CAPTION]</div>[/IMAGE]
		<p>{DATE:d/m/y:EN}[SUBTITLE] <b>{SUBTITLE}.</b>[/SUBTITLE]
		{SUMMARY} <a href="{ARTICLELINK}">&raquo;</a></p>
	</div>
<!--TEASER_ENTRY_END//-->

<!--TEASER_SPACER_START//-->
	<hr style="margin:7px 0 7px 0;padding:0;height:0;border:0;border-bottom:1px dotted #CCCCCC;clear:both" />
<!--TEASER_SPACER_END//-->

<!--TEASER_FOOTER_START//-->
	<div style="clear:both;height:1px"></div>
</div>
<!--TEASER_FOOTER_END//-->


Br
Wolfgang
Post Reply