I posted a code in the php block and this is what I got
Parse error: syntax error, unexpected '<' in /home/lul2/public_html/inc/classes/BxDolPageView.php(602) : eval()'d code on line 1
Can anyone help me fix this error so when i post something else in the php block it will work correctly. Please and Thanks
|
What'd you post in the PHP block? BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
sorry for the delay but I posted this in the php block
</php><iframe allowtransparency="true" width="260px" height="180px"
marginwidth="0" marginheight="0"
hspace="0" vspace="0"
frameborder="0" scrolling="no"
src="http://radiotime-badges.s3.amazonaws.com/PresetsList.html?UserName=davidtime">
</iframe>
|
</php>
I have no idea what that is supposed to be, but it doesn't look right. And if you're trying to include an <iframe> somewhere, you should use a HTML block instead.
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
sorry for the delay but I posted this in the php block
</php> <iframe allowtransparency="true" width="260px" height="180px"
marginwidth="0" marginheight="0"
hspace="0" vspace="0"
frameborder="0" scrolling="no"
src="http://radiotime-badges.s3.amazonaws.com/PresetsList.html?UserName=davidtime">
</iframe>
doesn't go there, no need to use the php opening/closing tags in the php block,, btw.. he gave you a good advise just use the html block.
|
Yeah, it looks like he's confused about how to start and end PHP. PHP's start and end tags look like this:
<?php
?>
You're correct, you don't need to state those in a PHP block.
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
At the very least and even though he shouldn't use it, he didn't close the php tag http://towtalk.net ... Hosted by Zarconia.net! |
At the very least and even though he shouldn't use it, he didn't close the php tag
Sure he did! Didn't you see the </php>?
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
Thanks for all your help everyone. I did not put the php in that's what happen when I put the code in the php block. so I did try to put it in the html block and it did not take it. It was blank. I open the html part again to re - add the code and nothing was there. |
Dolphin is most likely filtering the use of the iframe tag.
You can try the code in a php block but it has to be handled differently. HTML when used in a php block has to be placed in a variable and echoed out to the browser.
So do something like this in a php block.
$sCode = ' Your html placed here. '; echo $sCode;
Now this will work as long as your html code does not contain any single quotes. If your html code contains both single and double quotes you can use the heredoc syntax. Like so.
$sCode = <<<EOF Your html placed here. EOF; echo $sCode;
If you use the heredoc syntax just make sure the last EOF; is at the beginning of the line by itself after your html. That ending label will not work if it's spaced or tabbed in. Must be at the beginning of the line. A little tricky, but once you understand it, it solves some problems.
https://www.deanbassett.com |
Thank you so much the 2nd code work Now I do have another problem and that is the arrow to go to the next page for the avatars is missing. What happen. I can see the first set of pictures but can not go to the next page to see the rest of them |
One more question Deano if I wanted to add another code of the same to have them side by side what would I do? I have seen your advise to many other people and you are very Good. |
I have no idea what that is supposed to be, but it doesn't look right. And if you're trying to include an <iframe> somewhere, you should use a HTML block instead.
It's an online radio station add in, it's pretty cool for some sites I would think.
You enter your zip code and stations in your area appear.
I know just a few sites that can use this.. Below is an example of a demo page..
online-radio
ManOfTeal.COM a Proud UNA site, six years running strong! |
I like yours too. I have a christian website and it has a lot christian station to listen too. |
@Deano92964
you had gave me some great advise about the php block. well, with this same php block I want to add another iframe that will post on the side of the other one. the code I used is:
$sCode = <<<EOF Your html placed here. EOF; echo $sCode;
Now how would I add this code :
<iframe src="http://files.podsnack.com/iframe/embed.html?hash=ca2e1a2169a05217892697c9aa921973&bgcolor=EEEEEE&t=1313522621" width="300" height="200" frameborder="0"></iframe>
This way I'll have two radios sitting side by side.
If any one else have a suggestion that would be great!
|
@Deano92964
you had gave me some great advise about the php block. well, with this same php block I want to add another iframe that will post on the side of the other one. the code I used is:
$sCode = <<<EOF Your html placed here. EOF; echo $sCode;
Now how would I add this code :
<iframe src="http://files.podsnack.com/iframe/embed.html?hash=ca2e1a2169a05217892697c9aa921973&bgcolor=EEEEEE&t=1313522621" width="300" height="200" frameborder="0"></iframe>
This way I'll have two radios sitting side by side.
If any one else have a suggestion that would be great!
Like this. Where is says Your html placed here. is where you put your code.
$sCode = <<<EOF <iframe src="http://files.podsnack.com/iframe/embed.html?hash=ca2e1a2169a05217892697c9aa921973&bgcolor=EEEEEE&t=1313522621" width="300" height="200" frameborder="0"></iframe> EOF; echo $sCode;
Please keep your questions in the forum.
https://www.deanbassett.com |
now this will be okay with two different codes in the same php block |
now this will be okay with two different codes in the same php block
Yes. Something like this.
$sCode = <<<EOF <iframe src="http://files.podsnack.com/iframe/embed.html?hash=ca2e1a2169a05217892697c9aa921973&bgcolor=EEEEEE&t=1313522621" width="300" height="200" frameborder="0"></iframe> <iframe src="http://files.podsnack.com/iframe/embed.html?hash=ca2e1a2169a05217892697c9aa921973&bgcolor=EEEEEE&t=1313522621" width="300" height="200" frameborder="0"></iframe>EOF; echo $sCode;
You can also throw in a div to seperate them
$sCode = <<<EOF <div style="margin-bottom:10px"> <iframe src="http://files.podsnack.com/iframe/embed.html?hash=ca2e1a2169a05217892697c9aa921973&bgcolor=EEEEEE&t=1313522621" width="300" height="200" frameborder="0"></iframe> </div> <div style="margin-top:10px"> <iframe src="http://files.podsnack.com/iframe/embed.html?hash=ca2e1a2169a05217892697c9aa921973&bgcolor=EEEEEE&t=1313522621" width="300" height="200" frameborder="0"></iframe>EOF; </div> echo $sCode;
In other words you can put in any html you want inbetween the starting <<<EOF and ending EOF; markers
https://www.deanbassett.com |
your great
|