Hi, NodeWords can create global keyword . But how to create global description ?
Thanks

Comments

joly’s picture

Hi,

I changed this function to:

----------------------------------------------------------------------
function _nodewords_load($type, $id) {
$tags = array();
$page = '';
if($type!=='page'){
$page = ' or type="page" order by type desc';
}

$result = db_query("SELECT * FROM {nodewords} WHERE (type = '%s' AND id = '%s') $page", $type, $id);
while ($row = db_fetch_object($result)) {
if(isset($tags[$row->name])){
$tags[$row->name] .= ' '.$row->content;
continue;
}
$tags[$row->name] = $row->content;
}
return $tags;
}
--------------------------------------------------------------------------------------

This adds the front-page description to each node-page.

Greetz, Joly

joly’s picture

Ooopssss
The global description is also added when editing a node.... That is not oké......

So i changed the if to:

--------------------------------------
if($type!=='page' && !strpos($_REQUEST['q'],'edit') ){
$page = ' or (type="page" and name="description") order by type desc';
}
------------------------------------------

It is getting a really bad hack :(
Sorry
I hope someone can do better

Greetz, Joly

avpaderno’s picture

Priority: Critical » Normal
Status: Active » Fixed

There is no way to edit a global description.

avpaderno’s picture

Assigned: cakka » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.