Page 12 of 27

Any news on code problem?

Posted: Sun 11. Dec 2005, 14:59
by Kvist
Hi Erich

I saw that you were back on the board and wanted to ask you if you noticed the problem with the rendering of code such as , [PHP] etc.?

If that problem could be fixed it would really make my day - or year even! :)

/Kvist

Re: Any news on code problem?

Posted: Sun 11. Dec 2005, 15:19
by StudioZ
Hello Kvist
Erich as posted the solution at page 10 of this thread.
Check for Erich's post at the bottom: Tue Nov 22, 2005 05:55 :wink:
It solves the parsing of different formating tags but not sure about th PHP tag... :roll: 8)
Kvist wrote:Hi Erich

I saw that you were back on the board and wanted to ask you if you noticed the problem with the rendering of code such as , [PHP] etc.?

If that problem could be fixed it would really make my day - or year even! :)

/Kvist

Oooh

Posted: Sun 11. Dec 2005, 15:27
by Kvist
Oh, so you actually have to have your eyes open on this board?? Thanks! :oops:
Replace line 482 (v1.0.6) with

Kode:
return str_replace("<br /><br />", "<br />", html_parser(render_PHPcode($listing)));
Am I being stupid if I ask whicht file he's referring to and that the text in line 482 originally is? (Never comprehended the line numbers - I guess you have to have a special editor whereas I use notepad.)

/Kvist

Posted: Sun 11. Dec 2005, 16:22
by StudioZ
I added the file here for you, to be able to download the latest :wink:
http://www.malouin.ws/design/downloads-phpwcms.phtml

Cheers,

Merci

Posted: Sun 11. Dec 2005, 16:40
by Kvist
Merci bien mec, C très gentile! :D

Re: Oooh

Posted: Sun 11. Dec 2005, 19:00
by DeXXus
Kvist wrote:I guess you have to have a special editor whereas I use notepad.)

/Kvist
In notepad:

CTRL + G = goto line :wink:

Re: Oooh

Posted: Sun 11. Dec 2005, 19:43
by Kvist
DeXXus wrote:
Kvist wrote:I guess you have to have a special editor whereas I use notepad.)

/Kvist
In notepad:

CTRL + G = goto line :wink:
VERY handy information - thanks! :D

Posted: Tue 13. Dec 2005, 20:34
by ssyfrig
Hi

Is it possibly to show just one page.... in place of several?

Example.
I have a news section on my site witch contains 20 news article.
on my Homepage I just want to show the teasers from the last 2 Article.

at the moment I use the tag like this:
{TEASER_EX:news:2:article_tstamp|DESC:0:Seite:1:159}

Thanks, Sven

Posted: Tue 13. Dec 2005, 21:01
by kobos
Hi

it would look something like this

{TEASER_EX:news|2:2:article_created|DESC:0:Page:1:}

then put a link on the bottom directing the user too http://yourdomain/?news

Posted: Tue 13. Dec 2005, 21:03
by kobos
What is the difference between Page and Seite? As in what effect do they have.

Posted: Tue 13. Dec 2005, 21:15
by ssyfrig
Seite is page in German ...

@kobos

thanks it works ... :D :D

greez Sven

Posted: Thu 15. Dec 2005, 17:26
by JensZ
Hi All,

If you don't want the updated version of the reptag_teaser_ex file to cause your old reptags to crash then ADD this line

Code: Select all

$content["all"] = preg_replace('/\{TEASER_EX:(.*?):(.*?):(.*?):(.*?):(.*?):(.*?):(.*?)\}/ie', 'get_teaser_ex_content("$1", "$2", "$3", "$4", "$5", "$6", "$7", "", -1, "", $db);', $content["all"]);
AFTER the following

Code: Select all

$content["all"] = preg_replace('/\{TEASER_EX:(.*?):(.*?):(.*?):(.*?):(.*?):(.*?):(.*?):(.*?):(.*?):(.*?)\}/ie', 'get_teaser_ex_content("$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", "$9", "$10", $db);', $content["all"]);
Erich, correct me if I'm wrong.

Here's another enhancement to allow you to show the article creation date in the article listing:

in reptag_teaser_ex ADD:

Code: Select all

$tmpl = render_cnt_date($tmpl, $article_list[$key]["article_created"], "CREATEDATE");


BELOW this line:

Code: Select all

$tmpl = render_cnt_date($tmpl, $article_list[$key]["article_date"]);
You'll also need to REPLACE the function render_cnt_date() in include/inc_front/front.func.inc.php with this:

Code: Select all

function render_cnt_date($text='', $date, $tag='DATE') {   
	// render date by replacing placeholder tags by value
	//$language="EN", $format="Y/m/d", $date_now=0
	$text = preg_replace('/\{'.$tag.':(.*?):(.*)\}/ie', 'international_date_format("$2","$1","'.$date.'")', $text);
	$text = preg_replace('/\{'.$tag.':(.*?)\}/ie', 'date("$1",'.$date.')', $text);
	return $text;
}

Great work, Erich, and good idea with the generator! This reptag is really awesome, a little tricky to set up, but the generator takes care of that I hope.

A suggestion for next release: Maybe make it backwards compatible with previous versions. Seems like this thread gets flooded with formatting issues...

Cheers,

Jens

Posted: Fri 16. Dec 2005, 23:07
by ssyfrig
Hi

I update the RT to V 1.5. it works all fine except the template usage.

Do I understand right? If I define a template (temp.tmpl) the teaser should use this template for listing the article not the one that was defined in the article. Because if I change the Art. List. Temp. to temp.tmpl it works fine...

{TEASER_EX:news|2:2:article_tstamp|ASC:0:seite:1::temp.tmpl:150:}

Ich habe auf die aktuelle Version 1.5 upgedatet, alles funktioniert. Ausser das der Teaser nicht das Template verwendet welches ich angeben. Zum Beispiel temp.tmpl. Verstehe ich das richtig, der Teaser sollte das Template verwenden welches im RT angeben ist und nicht das im Artikel selber.

Wenn ich es im Artikel umstelle funktioniert es....


{TEASER_EX:news|2:2:article_tstamp|ASC:0:seite:1::temp.tmpl:150:}

thanks for help, Sven

Posted: Wed 21. Dec 2005, 13:26
by erich_k4
Hi Sven!

Fixed in ver 1.51!

Att.: now we have three possible values for the parameter "listtemplate":

default: to render all articles with the default-template settings
system: to render the articles with the template set in the backend
or the Templatename of the template you want to use for rendering, regardless of which template is set in the backend

Erich

Posted: Wed 21. Dec 2005, 14:34
by ssyfrig
Hi Erich

rock & roll :D :D cool, it works. thanks man!

Gruss Sven