You can use the (un*x-like) patch command ... the what?...
still not sure what all this means.... but i will say it looks better pasted in here than it did in notepad...
diff -urN cmsmadesimple-0.13/lib/classes/class.content.inc.php cmsmadesimple-0.13.tglx/lib/classes/class.content.inc.php
--- cmsmadesimple-0.13/lib/classes/class.content.inc.php 2006-05-09 01:41:15.000000000 +0200
+++ cmsmadesimple-0.13.tglx/lib/classes/class.content.inc.php 2006-05-27 16:12:17.000000000 +0200
@@ -2352,6 +2352,28 @@
these are the lines to take out and add?
}
+ function GetPageTitleFromID( $id )
+ {
+ global $gCms;
+ $db = &$gCms->GetDb();
+
+ if (!is_numeric($id) && strpos($id,'.') == TRUE && strpos($id,',') == TRUE)
+ {
+ return $id;
+ }
+
+ $params = array($id);
+ $query = "SELECT * FROM ".cms_db_prefix()."content WHERE content_id = ?";
+ $row = $db->GetRow($query, $params);
+
+ if ( !$row )
+ {
+ return false;
+ }
+ return $row['content_name'];
+ }
+
+
function CheckAliasError($alias, $content_id = -1)
{
global $gCms;
diff -urN cmsmadesimple-0.13/modules/News/action.default.php cmsmadesimple-0.13.tglx/modules/News/action.default.php
--- cmsmadesimple-0.13/modules/News/action.default.php 2006-05-17 04:05:58.000000000 +0200
+++ cmsmadesimple-0.13.tglx/modules/News/action.default.php 2006-05-27 16:15:14.000000000 +0200
@@ -36,6 +36,13 @@
if (isset($params["category"]) && $params["category"] != '')
{
+ if ($params["category"] == 'content_alias')
+ {
+ $alias = '*';
+ $alias .= ContentManager::GetPageAliasFromID( $returnid );
+ $alias .= '*';
+ $params['category'] = $alias;
+ }
$categories = explode(',', $params['category']);
$query = "SELECT mn.*, mnc.news_category_name FROM " . cms_db_prefix() . "module_news mn LEFT OUTER JOIN " . cms_db_prefix() . "module_news_categories mnc ON mnc.news_category_id = mn.news_category_id WHERE status = 'published' AND (";
$count = 0;
@@ -143,6 +150,11 @@
$onerow->link = $this->CreateLink($id, 'detail', $detailpage!=''?$detailpage:$returnid, '', $sendtodetail,'', true, false, '', true, $prettyurl);
$onerow->titlelink = $this->CreateLink($id, 'detail', $detailpage!=''?$detailpage:$returnid, $row['news_title'], $sendtodetail, '', false, false, '', true, $prettyurl);
$onerow->morelink = $this->CreateLink($id, 'detail', $detailpage!=''?$detailpage:$returnid, $moretext, $sendtodetail, '', false, false, '', true, $prettyurl);
+ $catid = ContentManager::GetPageIDFromAlias($onerow->category);
+ if ($catid != false && $catid != $returnid) {
+ $contenttitle = ContentManager::GetPageTitleFromID($catid);
+ $onerow->categorylink = $this->CreateContentLink($catid, $contenttitle);
+ }
$sendtoprint = array('articleid'=>$row['news_id'],'showtemplate'=>'false');
if (isset($params['lang']))
{