Closed (fixed)
Project:
Nodewords: D6 Meta Tags
Version:
6.x-1.0-rc1
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 Nov 2008 at 08:30 UTC
Updated:
15 Jul 2009 at 22:40 UTC
Hi, NodeWords can create global keyword . But how to create global description ?
Thanks
Comments
Comment #1
joly commentedHi,
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
Comment #2
joly commentedOoopssss
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
Comment #3
avpadernoThere is no way to edit a global description.
Comment #4
avpaderno