Closed (won't fix)
Project:
Drupal core
Version:
8.0.x-dev
Component:
node system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Feb 2007 at 22:00 UTC
Updated:
29 Jul 2014 at 17:37 UTC
Drupal V5.2
Synonyms.module
Would you please consider adding the / a Synonyms.module to Core.
below is the code I believe that should work - found it at http://drupal.org/node/83027
<?php
function synonyms_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
if ($op == 'update index') {
$text = '';
//---------------------------
$getTerms = taxonomy_node_get_terms($node->nid);
foreach($getTerms as $nodeTerm) {
$text .= ' '. $nodeTerm->name .' ';
$childSynonyms = taxonomy_get_synonyms($nodeTerm->tid);
foreach($childSynonyms as $childSynonym){
$text .= $childSynonym .' ';
}
$parents = taxonomy_get_parents($nodeTerm->tid);
foreach($parents as $parent) {
$text .= ' '. $parent->name .' ';
$synonyms = taxonomy_get_synonyms($parent->tid);
foreach($synonyms as $synonym){
$text .= $synonym .' ';
}
}
}
//-----------------
return $text;
}
}
?>
thank you for considering. It would be very useful if Term Synonyms were searchable by Core.
Thank you for considering
Comments
Comment #1
marcingy commentedFeatures go to head
Comment #2
marcingy commentedSynonyms on terms are no longer a feature in core.