Jump to content

Replacing default content with personalized (need help on php to html translation)


zc5

Recommended Posts

I am a novice php coder and I have been trying to figure out how to personalize dumpHTML (a tool in php i use to convert MediaWiki content into html). When i use this tool it places a footer tag at the bottom of every page. I want to replace some of that content with my own personalized one. The problem I am having is i know what html content i want but i do not know how to implement it using php. 

 

This is the original default code:

 



<div id="footer">
<?php if($this->data['poweredbyico']) { ?><div id="f-poweredbyico"><?php $this->html('poweredbyico') ?></div><?php } ?>
<?php if($this->data['copyrightico']) { ?><div id="f-copyrightico"><?php $this->html('copyrightico') ?></div><?php } ?>
<ul id="f-list">
<?php if($this->data['lastmod' ]) { ?><li id="f-lastmod"><?php $this->html('lastmod') ?></li><?php } ?>
<?php if($this->data['numberofwatchingusers' ]) { ?><li id="f-numberofwatchingusers"><?php $this->html('numberofwatchingusers') ?></li><?php } ?>
<?php if($this->data['credits' ]) { ?><li id="f-credits"><?php $this->html('credits') ?></li><?php } ?>
<?php if($this->data['copyright' ]) { ?><li id="f-copyright"><?php $this->html('copyright') ?></li><?php } ?>
<?php if($this->data['about' ]) { ?><li id="f-about"><?php $this->html('about') ?></li><?php } ?>
<?php if($this->data['disclaimer']) { ?><li id="f-disclaimer"><?php $this->html('disclaimer') ?></li><?php } ?>
<?php if($this->data['tagline']) { ?><li id="f-tagline"><?php echo $this->data['tagline'] ?></li><?php } ?>
</ul>
</div>


 

I would like to replace this content so that instead it spits out this html code when it translate:

 



<div class="memitem" id="footer" align=right>
<em>&copy 1993-2014 Company XX.</em>
| Visit Us: <a href="http://www.website.com">www.website.com</a>
| Send Feedback: <a href="mailto:[email protected]">[email protected]</a>
| See: 
<a href="../../../../Terms_of_Use.html">Terms of Use</a>
<a href="../../../../Privacy_policy.html">Privacy Policy</a>
</DIV>


 

What i have been doing is completely removing the original code and the manually pasting that html code into my pages which sometimes takes a while. I want this process to be automatic.

 

Thank you so much for the help guys!

Not very clear on how the default code is being generated. Obviously you want to tell whatever "other" code is generating that to generate your new code. So - can you show the "other" culprit?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.