NukeXchange Network

          

NukeZone Hosting - Fast, Affordable and Dependable
Nuke Fixes · NukeForums · NukeZone Hosting · NukeUnited · Nuke Sites · Nuke Skins · NukeLance
Nuke Resources
 :: Home  :: Downloads  :: Your Account  :: Forums  :: Advertise :: 
Login or Register
Main Menu
General
 Main
 AvantGo
 Banner_Clients
 cfaq
 Donations
 Downloads
 Forums
 Members_List
 Private_Messages
 Search
 Stories_Archive
 Submit_News
 Surveys
 Topics
 Web_Links
 Your_Account

Your Account
 Login
 Register
 Lost Pass

Modules
Quick Links
· CMS Focus
· Domain Names
. Game Quest
· Learning Linux
. MateMaker
· NukeFixes
· NukeForums
· NukeLance
· Nuke Sites
· Nuke Skins
· NukeZone Hosting
. SearchDevil
Other Options

Download Resources
· Nuke Downloads
· Add a Link
· New Files
· Top Rated
· Most Popular

Web Site Resources
· Nuke Sites
· Add A Site
· New Sites
· Top Rated
· Most Popular

Support
· NukeZone Hosting
· NukeSkins.com
· NukeForums.com
· phpnuke.org
· NukeFixes.com
Information
NukeForums
·Creating a Gaming PHP Nuke Site - Newbie
·Issues with GIF Images
·Installation Issues
·Please Help Question about Siggy's
·Hi My name is Rukasuzu, where is the introduction?
·Include file as block?
·How Do I make a Website?
·Array of strings as parameter
·Theme Change, just white? :(
·How can i disable upload t download by other users?Php-Nuke8

read more...
Top10 Links
· 1: Nuke Forums
· 2: PHPNukeFiles
· 3: NukeSkins
· 4: Nuke Templates
· 5: EcomJunk
· 6: MDesign
· 7: Windows Installation: PHP
· 8: FLASH-FOR-NUKE
· 9: Dezina
· 10: Global Dream News Sharing Portal!
Site Visitors
User Login:

Nickname:
Password:
Security Code: Security Code
Type Security Code Here:

Members List Membership:
Latest: carlosmafud
Today: 0
Yesterday: 1
Overall: 15026

Visitation:
Guests: 371
Members: 0
Total: 371


You are Anonymous user. You can register for free by clicking here
Sponsor Links
Nuke Sites Link Directory
Nuke Sites Link Directory

NukeResources :: View topic - Images in stories help
NukeResources Forum Index

NukeResources Forum Index -> Random Thoughts -> Images in stories help
Post new topic  Reply to topic    View previous topic :: View next topic 
Images in stories help
PostPosted: Sat Oct 23, 2004 8:04 am Reply with quote
vectoerby
Resource Seeker
Resource Seeker
 
Joined: Oct 22, 2004
Posts: 11




Is there a replacement file or a module that will have a image insertion button when adding a story or while doing admin messages?
View user's profile Send private message
PostPosted: Tue Oct 26, 2004 11:47 am Reply with quote
Dove
Resourceful
Resourceful
 
Joined: Mar 17, 2004
Posts: 140
Location: USA




Topics have images, and if you add a story, then
assign it to that topic, the image will show with it.
Is that what you mean?
View user's profile Send private message
images that go in story line
PostPosted: Sun Oct 31, 2004 9:19 pm Reply with quote
vectoerby
Resource Seeker
Resource Seeker
 
Joined: Oct 22, 2004
Posts: 11




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
View user's profile Send private message
Pictures in articles and messages
PostPosted: Tue Jan 11, 2005 8:44 am Reply with quote
revspalding
Resource Seeker
Resource Seeker
 
Joined: Mar 28, 2003
Posts: 5
Location: NW Colorado




WYSIWYG module does that fine. uploading into different libraries, You can find the module around the Nuke scene.
View user's profile Send private message
Allowed html tags - ?where to add?
PostPosted: Tue May 31, 2005 10:30 am Reply with quote
danMc
Resource Seeker
Resource Seeker
 
Joined: May 09, 2005
Posts: 12




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.

Thanks!
View user's profile Send private message
allowed HTML for admin only
PostPosted: Wed Jun 01, 2005 1:54 am Reply with quote
revspalding
Resource Seeker
Resource Seeker
 
Joined: Mar 28, 2003
Posts: 5
Location: NW Colorado




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.


--------------------------------------------------------------------------------

OPEN your phpnuyke mainfile.php file:

Find and delete:


Code:
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> ]");
    }
}


2. Find this:

Code:
function is_admin($admin) {
        global $prefix, $db;
        if(!is_array($admin)) {
          $admin = addslashes($admin);
          $admin = base64_decode($admin);
          $admin = explode(":", $admin);
             $aid = "$admin[0]";
          $pwd = "$admin[1]";
       } else {
          $aid = "$admin[0]";
          $pwd = "$admin[1]";
       }
       if ($aid != "" AND $pwd != "") {
         $aid = trim($aid);
         $sql = "SELECT pwd FROM ".$prefix."_authors WHERE aid='$aid'";
         $result = $db->sql_query($sql);
         $row = $db->sql_fetchrow($result);
         $pass = $row[pwd];
            if($pass == $pwd && $pass != "") {
            return 1;
            }
        }
        return 0;
        }



3. After the above scripts, insert this:

Code:
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.....
View user's profile Send private message
Thanks for that detailed answer!
PostPosted: Wed Jun 01, 2005 8:00 pm Reply with quote
danMc
Resource Seeker
Resource Seeker
 
Joined: May 09, 2005
Posts: 12




Made the change and have great results.

dang!
View user's profile Send private message
PostPosted: Fri Jun 03, 2005 11:08 am Reply with quote
zzb
Resource Seeker
Resource Seeker
 
Joined: May 10, 2005
Posts: 3




Have a question off this thread.....

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 !!

ZZB
View user's profile Send private message
Images in stories help
 NukeResources Forum Index -> Random Thoughts
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
All times are GMT - 4 Hours  
Page 1 of 1  

  
  
 Post new topic  Reply to topic     



Powered by phpBB © 2001-2005 phpBB Group.     Theme created by Vjacheslav Trushkin.
There have been 139 unique hit(s) in the past 24 hours.
Forums ©
Download the Best Archiver in the World


Best viewed with a Browser
All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2001 - 2007 by NukeResources.com
You can syndicate our news using the file .backend.php or ultramode.txt
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.37 Seconds

:: Eos phpbb2 style by Cyberalien :: PHP-Nuke theme by www.nukemods.com ::