{NEW:5} {RELATED:5:news} tags

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Lenny de Vee
Posts: 2
Joined: Thu 25. Nov 2004, 07:37

{NEW:5} {RELATED:5:news} tags

Post by Lenny de Vee »

Hi
Quick question relating to the above tags. I understand how they both work but what I need is a combination of the 2 .
So of the articles that are related by keword are displayed with date and heading.
So if news was the keyword the links would be displayed as such
25/11/2004: heading news1
24/11/2004: heading news2
24/11/2004: heading news3
22/11/2004: heading news4


can this be done ?

Thanks
jmeyknecht
Posts: 112
Joined: Sun 11. Jan 2004, 23:13
Location: Merseburg, Germany
Contact:

Post by jmeyknecht »

http://www.emediafabrik.de/index.php?de ... t_download

Usage: {NEW:10:cat:lang}

don't forget to specify cat, lang in the keywords meta data of articles

for example: you have some articles related to the topic "projects"

--> add in keywords of these articles: cat:projects

use the RT {NEW:5:projects:ALL} and you will get the latest 5 articles which have been categorized as projects
Lenny de Vee
Posts: 2
Joined: Thu 25. Nov 2004, 07:37

Post by Lenny de Vee »

Thankyou
mr.gamesbay
Posts: 4
Joined: Mon 21. Mar 2005, 07:17

Post by mr.gamesbay »

Hi Com!

I use phpwcms v1.2.1, is there a hack for this Version?

--------------

Hallo Com

Ich nutze die phpwcms v1.2.1-DE Version. Gibt es eine auch eine Hack für die v1.2.1 Version? Sonst kommt die alte wieder drauf :)
Last edited by mr.gamesbay on Mon 21. Mar 2005, 13:41, edited 1 time in total.
Paal
Posts: 204
Joined: Wed 6. Oct 2004, 19:54
Location: Budapest, Hungary
Contact:

Customize {NEW} render

Post by Paal »

Hello,

How to customize {NEW} tag for frontend render?

What I need:
2005.03.21 - summary [url=http://#]Read more...[/url]
2005.03.20 - summary [url=http://#]Read more...[/url]
2005.03.19 - summary [url=http://#]Read more...[/url]
2005.03.18 - summary [url=http://#]Read more...[/url]
absolutely exactly:

Code: Select all

2005.03.21 <strond>article title</strong>
           Summary summary summary summary summary
           Summary summary summary summary summary
           Summary summary summary <a href="#">Read more...</a>
2005.03.20 <strond>article title</strong>
           Summary summary summary summary summary
           Summary summary summary summary summary
           Summary summary summary <a href="#">Read more...</a>
I added this line in conf.template_default.inc.php (in "new" section):

Code: Select all

$template_default["news"]["read_more_link"]     = 'Read more...';
and hack the "new" function in front.func.inc.php:

Code: Select all

function get_new_articles....
.
.
.
.
			}
			$new_links .= $template_default["link_before"].$template_default["link_symbol"];
//			$new_links .= '<a href="index.php?id='.$row[2].','.$row[0].',0,0,1,0"';
//			$new_links .= $target." id=\"target\">".$article_title."</a>&nbsp;&nbsp;";
			
			$new_more_link  = "$article_title&nbsp;&nbsp;";
			$new_more_link .= '<a href="index.php?id='.$row[2].','.$row[0].',0,0,1,0"';
			$new_more_link .= $target.">".$template_default["read_more_link"]."</a>&nbsp;&nbsp;";
			
			//try to remove possible unwanted after - if not enclosed before.link.after
			if($new_links && !$template_default["link_before"] && $count < $count_results) {
				$new_links .= $new_more_link . $template_default["link_after"] ."\n";
			}
		}
		mysql_free_result($result);
	}

	//enclose whole
	if($new_links) $new_links = $template_default["before"].$new_more_link.$new_links.$template_default["after"];
	
	return $new_links;
}

// -------------------------------------------------------------
but nothing appears... :(

If I uncomment 2 commented line, result:
[url=http://#]2005.03.20 - summary[/url] 2005.03.20 - summary [url=http://#]Read more...[/url]
[url=http://#]2005.03.19 - summary[/url] 2005.03.20 - summary [url=http://#]Read more...[/url]
[url=http://#]2005.03.18 - summary[/url] 2005.03.20 - summary [url=http://#]Read more...[/url]
etc.
Vhy?

Thx, Paul
Post Reply