Page 1 of 1

PHP Code confusion

Posted: Sat Nov 06, 2010 1:37 am
by togotutor
Team,
I have this current code in my website.

public function showLeaderboard($action)
{
$action->element('img',
array('width' => 720,

'height' => 90,
'src' => common_path('plugins/BlankAd/redpixel.png')),
'');
}


Instead of the image --> 'redpixel.png' I want to add an html file. But It`s not happening. Please let me know how is it going to be posssible.

Re: PHP Code confusion

Posted: Sat Nov 06, 2010 10:50 am
by twinedev
Well since we have no idea how this code is being used, all I can do is offer the suggestion to :

Code: Select all

public function showLeaderboard($action)
{
    $action->element('iframe',
                     array('width' => 720,
                           'height' => 90,
                           'src' => 'http://www.cnn.com'
                          ),
                     ''
                    );
}
Again this is just guessing that what ever is using this function can handle it (kinda like saying, "my GPS says to turn left on step 10 of 20 directions to get to point A, but which way do i turn in step 10 to get to point B")

Re: PHP Code confusion

Posted: Sat Nov 06, 2010 12:06 pm
by togotutor
Thanks and Appreciated!!! ...Is there any alternate of iframe. As iframe is looking wiered when i put addinto it.