Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
iframe
Avatar
DAVE RITCHIE
PHX , AZ
Member
Free Members
Offline
Dec 10, 2012 - 2:01 pm

is there a way to allow it 

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Dec 10, 2012 - 2:18 pm

https://simple-press.com/suppo.....ress-post/

That shows you how to set it up so a forum admin can use iFrames in posts. If you want everyone to be able to do it then just remove the check for admin... but as always be very aware that this is a gaping security hole that anyone could exploit to do just about anything with.

andy-signature.png
YELLOW
SWORDFISH
Avatar
DAVE RITCHIE
PHX , AZ
Member
Free Members
Offline
Dec 10, 2012 - 2:25 pm

sorry to be such a newb .... is there a place that shows how to do that .... i know my way around code but not a pro ...

Avatar
DAVE RITCHIE
PHX , AZ
Member
Free Members
Offline
Dec 10, 2012 - 2:26 pm

 

in spfuctions right ???

 

<?php
# --------------------------------------------------------------------------------------
#
# Simple:Press Theme custom function file
# Theme : Default
# File : custom functions
# Author : Simple:Press
#
# The 'functions' file can be used for custom functions & is loaded with each template
#
# --------------------------------------------------------------------------------------

add_action('init', 'spDefault_textdomain');

# load the theme textdomain for tranlations
function spDefault_textdomain() {
sp_theme_localisation('spDefault');
}

if (function_exists('sp_FontResizer')) {
add_action('sph_BeforeDisplayStart', 'spDefault_spShowFontResize');
}

function spDefault_spShowFontResize() {
$tipMinus = __sp('decrease forum font size');
$tipReset = __sp('reset forum font size');
$tipPlus = __sp('increase font size');
sp_FontResizer('tagClass=spFontSizeControl spRight', $tipMinus, $tipReset, $tipPlus);
sp_InsertBreak('direction-right');
}

?>

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Dec 10, 2012 - 2:35 pm

Yes - as good a place as any.
As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/.....g-a-theme/)

andy-signature.png
YELLOW
SWORDFISH
Avatar
DAVE RITCHIE
PHX , AZ
Member
Free Members
Offline
Dec 10, 2012 - 2:37 pm

so after the last question mark ? or before 

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Dec 10, 2012 - 2:39 pm

All php needs to be within the php tags so somewhere before the end of the file.

andy-signature.png
YELLOW
SWORDFISH
Avatar
DAVE RITCHIE
PHX , AZ
Member
Free Members
Offline
Dec 10, 2012 - 2:49 pm

so like this correct

<?php
# --------------------------------------------------------------------------------------
#
# Simple:Press Theme custom function file
# Theme : Default
# File : custom functions
# Author : Simple:Press
#
# The 'functions' file can be used for custom functions & is loaded with each template
#
# --------------------------------------------------------------------------------------

add_action('init', 'spDefault_textdomain');

# load the theme textdomain for tranlations
function spDefault_textdomain() {
sp_theme_localisation('spDefault');
}

if (function_exists('sp_FontResizer')) {
add_action('sph_BeforeDisplayStart', 'spDefault_spShowFontResize');
}

function spDefault_spShowFontResize() {
$tipMinus = __sp('decrease forum font size');
$tipReset = __sp('reset forum font size');
$tipPlus = __sp('increase font size');
sp_FontResizer('tagClass=spFontSizeControl spRight', $tipMinus, $tipReset, $tipPlus);
sp_InsertBreak('direction-right');
}
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;
?>

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Dec 10, 2012 - 5:10 pm

Well - did it work?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Dec 11, 2012 - 5:59 am

Please ignore - performing messaging test

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626