I mean images like when i do a story on the orioles and want to add a picture of melvin mora scoring the winning run type image. Not just a topic image
Even with the wysiwyg editor ver 7.7 - there are effects that you do that still get stripped out when posted -
Where do I make the change that will allow these other tags - not strip out. I've looked through main.php; config.php but am too noob to see it. I am hoping it will separate admin story/news from reg user allowed tags but either way still want to know how to do it.
kodetech.com has the latest version of the WYSIWYG SPAW editor. In the documentation for the editor there is a section on allowing the admin to enter more HTML tags than a user. There are some very large security risks that you open yourself up to when you change the $AllowableHTML variable in the config.php file, so here's another way to skin the cat.
This is copied and pasted from the tips and enhancements page of the documentation.
Quote:
Thanks to Aidan Steele for the following update:
You can now allow admins to use all html tags possible with the following instructions. What it does is allow for an admin to use any html tag they want, but still restricts the users to the $AllowableHTML above.
foreach ($_GET as $secvalue) {
if ((eregi("<[^>]*script*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*object*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*iframe*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*applet*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*meta*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*style*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*form*\"?[^>]*>", $secvalue)) ||
(eregi("\([^>]*\"?[^)]*\)", $secvalue)) ||
(eregi("\"", $secvalue))) {
die ("<center><img src=images/logo.gif><br><br><b>the html tags you attempted to use are not allowed</b><br><br>[ <a href=\"javascript:history.go(-1)\"><b>go Back</b></a> ]");
}
}
foreach ($_POST as $secvalue) {
if ((eregi("<[^>]*script*\"?[^>]*>", $secvalue)) || (eregi("<[^>]*style*\"?[^>]*>", $secvalue))) {
die ("<center><img src=images/logo.gif><br><br><b>the html tags you attempted to use are not allowed</b><br><br>[ <a href=\"javascript:history.go(-1)\"><b>go Back</b></a> ]");
}
}
if (!is_admin($admin)) {
foreach ($_GET as $secvalue) {
if ((eregi("<[^>]*script*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*object*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*iframe*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*applet*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*meta*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*style*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*form*\"?[^>]*>", $secvalue)) ||
(eregi("\([^>]*\"?[^)]*\)", $secvalue)) ||
(eregi("\"", $secvalue))) {
die ("<center><img src=images/logo.gif><br><br><b>the html tags you attempted to use are not allowed</b><br><br>[ <a href=\"javascript:history.go(-1)\"><b>go Back</b></a> ]");
}
}
foreach ($_POST as $secvalue) {
if ((eregi("<[^>]*script*\"?[^>]*>", $secvalue)) || (eregi("<[^>]*style*\"?[^>]*>", $secvalue))) {
die ("<center><img src=images/logo.gif><br><br><b>the html tags you attempted to use are not allowed</b><br><br>[ <a href=\"javascript:history.go(-1)\"><b>go Back</b></a> ]");
}
}
}
4. Save file and re-upload to your site. When you log in as an Admin you will have full HTML access on your WYSIWYG for PHPNuke 7.4 with Spaw Editor.
Hope this helps, and like everything else, make sure you back up everything you're going to play with.....
I have a similar need to allow my users to post img tags in their stories (SubmitNews modulde).
I have made progress with editing config.php adding img, 2 tag.
Also made the changes to the mainfile.php file as suggested here... (I found that same post in SPAW site and tried it even though I do not use SPAW but have my users using Enahanced Submit news by NukeScripts.)
The problem is in the Admin stries approval section. I can confirm by logging in as a registered user that I can "create" the img embedded, use div tags etc and the article looks great on preview. When I submit however then log out and log back in as admin level user and log into the Admin Module to "post" the article, if find that the IMG tag have been stripped out.
I have tried modifications as suggested in config.php and mainfile php... even commenting out the entire section... still NO rendering of the img tag for the admin! I suspect it is stripped out before or after the post being written to the SQL database or when it is called from the admin module for review.
Any ideas??? I am running phpNUKE 7.5 patched 3.0 with Chatserv great code! For this application I need to enable img tags for the registered users.
P.S. I CAN POST post IMG tags when I am creating a news article DIRECTLY from the Admin Module. I would have to repost evey user post with then sending me their image links myself from the Admin module ... obviously unacceptable !! Appreaciate any help that can be given here !!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum