Howdy folks - I’ve written a very simple plugin to frontend P+C DTR image replacement in EE. The image replacement script works (thought it’s VERY picky) on my server.
Here’s the code (I haven’t added any of the usage, version, or display stuff into it yet) It’s located in my plug-ins folder, and it’s called: pi.ee_pifr.php
<?php
include '[path to my PCDTR]/class.php';
class Ee_pifr
{
var $return_data = "TEST";
function Ee_pifr()
{
global $TMPL;
$containerType = $TMPL->fetch_param('containerType');
$graphicText = $TMPL->fetch_param('graphicText');
$graphicClass = $TMPL->fetch_param('graphicClass');
$this->return_data = "<".$containerType." class='".$graphicClass."'>".$graphicText."</".$containerType.">";
}
}
ob_end_flush();
?>
and here’s my test template code:
{exp:weblog:entries weblog="agent"}
{exp:ee_pifr containerType="span" graphicText="${prd_streetPrice}" graphicClass="buy"}
{/exp:weblog:entries}
Not sure what I’m doing wrong, but there’s no output, and no error. Your thoughts?
Mod Edit: Moved to the Plugins: Technical Assistance Forum
UPDATE: OK, now it’s outputting (removed the weblog=”agent”, which was wrong) But now it’s outputting text, not images. I’m investigating. I’ll post here when I get it fixed.
Bummer.
Has anyone made PCDTR work with EE?
Allows non-standard (non-Web-safe) fonts to be used, by watching the PHP output buffer for relevant tags (<h2> etc) and automatically generating replacement graphics using those fonts.
Also, creates alternate graphics for rollovers as well, if I’m not mistaken.
Unlike sIFR, does not require Flash (so it would work on an iPhone).
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.