Home · sNews Development · [Addon] iframe function

cms-zen dot com

online web development :: art and design :: fun stuff
best-budd
sNews Development cms road trip PHP Scripts Photoshop Guides Css Guides Music and video clips Art Gallery Low Light Photography Impression Photography

sNews 17 released

NEW: sNewsCMS v1.7 Release has been made available for download.
Get it while it's hot!

[Addon] iframe function

This function let admin add iframe into any article text area.
just add this function to snews.php file, and while in edit mod,
use the func adition to add your iframe.

         <?php
    
function dyn_iframe($dfbaseurl='') {
        if(!empty(
$dfbaseurl)) {
                
$dfbaseurl;
            } else {
            
/// any default url for the iframe.
                
$dfbaseurl 'http://google.com'
                }
                
$dfname 'fram'.rand();
                
$dfwidth='98%';
                
$dfheight='350px';        
                echo 
'
                <iframe 
                    src="'
.$dfbaseurl.'" 
                    name="'
.$dfname.'" 
                    width="'
.$dfwidth.'" 
                    height="'
.$dfheight.'" 
                    border="0" 
                        frameborder="0">
                    </iframe>
                '
;
        }
    
?> 

e.g use: in your articles/pages/extra call the function,
give it the function name and URL of the site wanted,
no need for any thing else.

 func dyn_iframe:|:http://cnn.com func
  

05.06.2008. 17:52

This article hasn't been commented yet.

Write a comment

* = required field

:

:

:


7 + 5 =