Support Forum

installing iframe into simple press post…

RP Robert Provencher
Robert Provencher
Member

this could be a simple question, not sure. im trying to bring my pages over from my amember site and when posting the entire page i created, with videos etc, i get

 

Unable to save
This post contains an iframe which are disallowed

 

is this fixable? thanks…Rob

24 Answers

New Answer

MP Mr Papa
Mr Papa
Member

fixable?? allowing users to post an iframe in your post content would pose a serious security risk to your site…

what videos are you trying to post?? normally, you should just paste in the url to the video (ie youtube)… the wp oembed will take over and handle everything for you…

if you want to embed it yourself, most services include an option for embedding without an iframe…

RP Robert Provencher
Robert Provencher
Member

they are links to my vimeo videos, which I already created in my amember site (which i am not going to use anymore, found amember confusing, but the videos loaded fine in it). Could i not load this as an admin? and refuse others that ability…thanks for your reply…im sorta not too techie on the ifram end….does this mean i have to go in and use the non iframe embed option (say no, please:):)…)

Rob

MP Mr Papa
Mr Papa
Member

currently, iframes are prohibited to all users… we have had discussions about a permission or letting admins do it, but still some trepidation and no final resolution…

not sure I understand what you mean by bringing videos over from your amember site… how are you getting them into sp??? and vimeo is a oembed provider… so the best, safest solution is to paste in the url instead of all that other iframe code… again, since not understanding what you mean by moving over, but doesnt seem any harder to post a url vs post an oembed code sequence… am I missing something?

RP Robert Provencher
Robert Provencher
Member

steve, thanks for your help on this.

I think I should clarify some more. I am adding videos to my SP membership site for members only. they get access as part of their membership. The watch the videos in the posts. I don’t want the videos anywhere outside the forum I am creating.

IE…Ryan Lee at founderfly.com and others, including another ubb threads based site I own, and I know of vbul sites that also do this with their videos. I assumed it was routine.

 

I am getting them over by copying the html code for the whole page. Each page represents one category and there are many, many videos…would be a pain and laborious for me to have to one by one go grab the old non Iframe code. I suppose I could if I had to.

**************************************

Here is a small sample from one of my pages, to show you what I mean…..:

<p style=”text-align: center;”>
    <img alt=”” src=”http://www.wizardoflight.com/wp-content/uploads/2011/10/wizardoflight-5001.png” style=”width: 500px; height: 123px;” /></p>
<p style=”text-align: center;”>
    Resources and updates are at the bottom of this page.</p>
<p style=”text-align: center;”>
    Watch first Only 5 minutes long. We’ll start slow….(sorry about the video quality on this video….)</p>
<p style=”text-align: center;”>
    <Iframe allowfullscreen=”” frameborder=”0″ height=”338″ mozallowfullscreen=”” src=”http://player.vimeo.com/video/35227518?title=0&byline=0&portrait=0″ webkitallowfullscreen=”” width=”600″></iframe></p>

 

**************************************

Is there anything else I could do here?? thanks

Rob

MP Mr Papa
Mr Papa
Member

you can try this… in your spFunctions.php of your sp theme, add this code:

add_filter('sph_kses_allowed_tags', 'my_kses_array');
function my_kses_array($tags) {
    global $spThisUser;
    
    if ($spThisUser->admin) {
        $tags['iframe'] = 
            array(
                'width' => array(),
                'height' => array(),
                'frameborder' => array(),
                'src' => array(),
                'frameborder' => array(),
                'marginwidth' => array(),
                'marginheight' => array()
            );
    }    
    return $tags;
}

this should let an admin on your site post an iframe… but I have not actually tested it…

RP Robert Provencher
Robert Provencher
Member

thanks… i have no idea how to do that so i sent it off to my coder person, me think they know. I’ll keep you posted….Rob

MP Mr Papa
Mr Papa
Member

make sure you do as we always suggest and create your own sp theme instead of editing ours or you may lose changes on upgrade…

see:  http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/

RP Robert Provencher
Robert Provencher
Member

thanks, again….question..is this something you can do for a fee?? it’ll take a few days to wait for my coder….gotta ask…may be quicker…Rob

MP Mr Papa
Mr Papa
Member

I can put you in touch with BrandonC if you like… he does most of the custom work for us but is reasonable and pretty quick…

RP Robert Provencher
Robert Provencher
Member

my girls just replied surprisingly fast…let me get right back…thanks

MP Mr Papa
Mr Papa
Member

and Brandon just showed up here too! ;)

just let us know…

BR Brandon
Brandon
Member

Caught me lurking. :)

Robert let me know if I can help. I can create a custom theme and add that filter Mr Papa suggested to it.

RP Robert Provencher
Robert Provencher
Member

ok….I need to get my url, login and paypal payment…let’s make it happen…how much??