I am still a novice with PHP but I feel like I am making this task more complicated then it needs to be.
I recently acquired a tool (dumpHTML) that is coded in php which allows me to convert mediawiki content into html. I have been trying to make minor changes to it so it looks more clean after i convert to html. All the titles of my pages end with " - Docwiki" (Example: “Hole Mounts - Docwiki”) and i do not like that. I want to write something that deletes the " - Docwiki" at the end of every title once i use the conversion tool.
Here is the original code line:
[php]<?php $this->text('pagetitle') ?>[/php]
Here is what I have attempted and i get a fatal error when i try to run the tool:
[php] <?php
$pagetitleA=text(‘pagetitle’);
chop($pagetitleA, " - Docwiki");
?>
I also had a suggestion to try this and it didn’t work:
[php]<?php echo str_replace("- Docwiki",'',$this->text('pagetitle')); ?>[/php]
Is there something I am missing or doing completely wrong? Any help or suggestions will be greatly appreciated!