Support Forum
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.
YELLOW
SWORDFISH
|
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');
}
?>
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/)
YELLOW
SWORDFISH
|
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;
?>
1 Guest(s)