I'm using the application to generate graphs of categories and was wondering if there was a way of *not* displaying "Category:" at the start of every page title on the graph?
it was a bug fix to put the full page name of category pages back in. I didn't make it configurable. The answer is it is a very easy behaviour to change by tweaking the code but not simple to do as an option for each individual graph. If you want to change the behaviour everywhere then I can let you know where to adapt the code.
Yes, please, I'd like to know how to do this.
Right. I think the answer is:
replace line 29 in renderer (
SemanticGraph/includes/SemanticGraphRenderer.php ) from:
> $temtext = str_replace("@CHILD_LABEL@",$this->prettyText($args->getPrefixedText()),$temtext);
> $temtext = str_replace("@CHILD_LABEL@",$this->prettyText($args->getText()),$temtext);
This will affect behaviour globally.
I tried that but I get blank pages and this in the apache error log:
<blockquote>PHP Notice: Object of class Title could not be converted to int in /home/www/web557/html/wiki/extensions/SemanticGraph/includes/SemanticGraphRenderer.php on line 26
PHP Fatal error: Call to undefined function strreplace() in /home/www/web557/html/wiki/extensions/SemanticGraph/includes/SemanticGraphRenderer.php on line 29
Ah, this forum changed str_replace into strreplace - it removed the underscore…
So, now I have @CHILD_LABEL@ for all nodes:
Ahhhh, another underscore had been stripped!
it's working now :-)
Good. Phew. Pesky markup!