how to change "{NEW:5}" ?

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
mbecker
Posts: 2
Joined: Wed 6. Apr 2005, 18:19

how to change "{NEW:5}" ?

Post by mbecker »

hey,

I want to change the appearance of {NEW:5}, what files have I do to change ?

big thx mbecker
Pappnase

Post by Pappnase »

hello

what did you want change!?
francescom
Posts: 20
Joined: Thu 31. Mar 2005, 21:09
Location: ITALY

Post by francescom »

What is {NEW:5}? :)
mbecker
Posts: 2
Joined: Wed 6. Apr 2005, 18:19

Post by mbecker »

{NEW:5} shows the last five news on your site, for example:

2005/04/06 - Gästebuch
2005/04/06 - Kater nach der Party
2005/04/06 - 18. Geburtstag


i wnat to change the look of this display to:

{image} 2005/04/06 {image} Gästebuch


{image} stands for any picture...


how can i do this ?
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post by pico »

Hi

look at conf.func.inc.php

Code: Select all

// all new article list sorted by date
if( ! ( strpos($content["all"],'{NEW:')===false ) ) {
	$content["all"] = preg_replace('/\{NEW:(\d+):{0,1}(\d+){0,1}\}/e','get_new_articles($template_default["news"],"$1","$2",$db);',$content["all"]);
}
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

Have you ever tried to make some changing here:

// new articles --------------------------------
$template_default["news"]["before"] = "<div class=\"news\">";
$template_default["news"]["after"] = "</div>";
$template_default["news"]["link_before"] = "";
$template_default["news"]["link_after"] = "<br><br>"; // "<br>"
$template_default["news"]["link_symbol"] = "";

$template_default["news"]["link_target"] = "";$template_default["news"]["link_length"] = 0; //if 0 no limit
$template_default["news"]["cut_title_add"] = "…";


Haven't done it before... but that might be the right place, to put in your link to the images!
le block
Posts: 66
Joined: Tue 29. Mar 2005, 18:58
Location: Leipzig
Contact:

Post by le block »

Thanks for the tip.
But the problem is: the linktext(name of new article) is near the image.
I want a little space between the icon and the text (like the standard nav-row) .

le block
le block
Posts: 66
Joined: Tue 29. Mar 2005, 18:58
Location: Leipzig
Contact:

Post by le block »

The Answer:

The Key is to use a image(png,gif) with a transparent background.
For example: The whole image is width:15px, the icon is aligned to the left in the image canvas. The Rest of the image is transparent. So the hidden part will not seen and text is moved to the right.

le block
Pappnase

Post by Pappnase »

francescom wrote:What is {NEW:5}? :)
http://www.phpwcms-docu.de/index.php?link_tags
Create an List with the last new / edited articles of all structures, by editing the number you can choose how many entries the list should have.
Post Reply