Display of page names

  • ChrisC

    ChrisC - 2009-12-04


    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?



  • Rob Challen

    Rob Challen - 2009-12-04

    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.

  • ChrisC

    ChrisC - 2009-12-11

    Yes, please, I'd like to know how to do this.

  • Rob Challen

    Rob Challen - 2009-12-11

    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.


  • ChrisC

    ChrisC - 2009-12-11

    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

  • ChrisC

    ChrisC - 2009-12-11

    Ah, this forum changed str_replace into strreplace - it removed the underscore…

    So, now I have @CHILD_LABEL@ for all nodes:


    Any ideas…?

  • ChrisC

    ChrisC - 2009-12-11

    Ahhhh, another underscore had been stripped!

    it's working now :-)

  • Rob Challen

    Rob Challen - 2009-12-14

    Good. Phew. Pesky markup!


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks