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
·Website optimization
·Multilingual search engine optimization
·Rapidshare script/mini host script not allowing downloads
·Members Cant Logon My Site or View Forums & Member Profi
·Approved Membership for 8.0
·I want to use full HTML content in the welcome page...
·Changed style from subsilver, folder images now dont display
·Installing the forum upadates
·PHP-Nuke SQL Injection Vulnerability Fix
·New Story Links Problem

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: Tebbes
Today: 1
Yesterday: 1
Overall: 14901

Visitation:
Guests: 650
Members: 1
Total: 651


You are Anonymous user. You can register for free by clicking here
Sponsor Links
Download the Best Archiver in the World
Download the Best Archiver in the World

NukeResources :: View topic - bugfixes for 8.1.3.4
NukeResources Forum Index

NukeResources Forum Index -> Bug Fixes -> bugfixes for 8.1.3.4
Post new topic  Reply to topic    View previous topic :: View next topic 
bugfixes for 8.1.3.4
PostPosted: Fri Feb 08, 2008 5:31 pm Reply with quote
diegocr
Resource Seeker
Resource Seeker
 
Joined: Feb 08, 2008
Posts: 2




Hi all,

I'm new on this site, hence a big Hello! to everyone Smile

I am also new using php-nuke, which the CMS I've chossen for a website for a family member he has assigned me to create.

on a week of work with it, i've noticed some little issues, already explained around the world, as it's the issue(s) inserting html into content, the first bugfix from mine is about it...

...I think I've fixed, or better say, improved the delQuotes() function, unlike the original one, mine can handle attrib's values without being between quotes (which I needed so that Word documents saved as html can be easly inserted into content), and also it recognices ' delimiters, apart normal quotes.

let me know what you think, I hope my work is usefull for you/others and can be integreted into further php-nuke builds Smile, the new function is as follow:

Code:

function delQuotes($string)
{
   /* no recursive function to add quote to an HTML tag if needed */
   /* and delete duplicate spaces between attribs. */
   $tmp="";    # string buffer
   $result=""; # result string
   $i=0;
   $attrib=-1; # Are us in an HTML attrib ?   -1: no attrib   0: name of the attrib   1: value of the atrib
   $quote=0;   # Is a string quote delimited opened ? 0=no, 1=yes
   
   # improved version by diegocr starts here: mine handles attrib's values
   # without being between quotes, and using ' as well
   # $Id: delQuotes.php,v 8.1.34.0.1 2008/02/06 20:37:16 diegocr Exp $
   $apos=0;    # means the same as for $quotes, but for '
   $noquote=0; # handling attrib value without quotes?
   
   $len = strlen($string);
   while ($i<$len) {
      switch($string[$i])
      {
         case "'":
           if($quote==0 AND $noquote==0) { # do not handle if we are into normal quotes
            if ($apos==0) {
               $apos=1;
            } else {
               $apos=0;
               if (($attrib>0) && ($tmp != "")) { $result .= "=\"$tmp\""; }
               $tmp="";
               $attrib=-1;
            }
           } else $tmp .= "'";
         break;
         
         case "\"":
           if($apos==0 AND $noquote==0) { # do not handle if we are into single quote
            if ($quote==0) {
               $quote=1;
            } else {
               $quote=0;
               if (($attrib>0) && ($tmp != "")) { $result .= "=\"$tmp\""; }
               $tmp="";
               $attrib=-1;
            }
           } else $tmp .= "\"";
         break;
         
         case "=":
            if($quote==0 AND $apos==0) # do not handle if we are into any quotes
            {
               $attrib=1;
               
               if ($tmp!="") $result.= " $tmp";
               
               // FIXME: I assume there are no spaces between <attrib>=<value>
               if(($string[$i+1] != "\"") AND ($string[$i+1] != "'"))
               {
                  $noquote = 1;
               }
               
               $tmp="";
            } else $tmp .= '=';
         break;
         
         case "\t":
         case " ":
            if($noquote==1) {
               
               if($tmp != "")
                  $result .= "=\"$tmp\"";
               
               $noquote=0;
               $tmp="";
               $attrib=-1;
            }
            else if($attrib>-1) {  # add it to the string, if one opened.
               $tmp .= $string[$i];
            }
         break;
         
         default:            # Other
            if ($attrib<0)    # If we weren't in an attrib, set attrib to 0
               $attrib=0;
            $tmp .= $string[$i];
         break;
      }
      $i++;
   }
   if ((($quote!=0) OR ($apos!=0)) && ($tmp != "")) {
      if ($attrib==1) {
         $result .= "=";
      }
      /* If it is the value of an atrib, add the '=' */
      $result .= "\"$tmp\"";  /* Add quote if needed (the reason of the function ;-) */
   }
   return $result;
}


bugfixes for my function are as well welcome, and greatly appreciated Smile


next, i dunno if that was already already, under modules/Forums/modcp.php at line 243 $module_name is being used incorrectly.

where:

include('modules/$module_name/includes/functions_search.'.$phpEx);

it must be:

include('modules/'.$module_name.'/includes/functions_search.'.$phpEx);

OR

include("modules/$module_name/includes/functions_search.".$phpEx);


Well, thats all for now..

Greetings.
View user's profile Send private message
bugfix for Your_Account
PostPosted: Sun Feb 10, 2008 2:16 pm Reply with quote
diegocr
Resource Seeker
Resource Seeker
 
Joined: Feb 08, 2008
Posts: 2




Hi again,

There is a bug in Your_Account which causes users unable to change theme:

under modules/Your_Account/index.php at line 1399 (function savetheme())

REPLACE:

Code:

   $row = $db->sql_fetchrow($db->sql_query("SELECT overwrite_theme from ".$prefix."_config"));


BY

Code:

   $row = $db->sql_fetchrow($db->sql_query("SELECT overwrite_theme from ".$user_prefix."_config"));



Gretz.
View user's profile Send private message
bugfixes for 8.1.3.4
 NukeResources Forum Index -> Bug Fixes
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 178 unique hit(s) in the past 24 hours.
Forums ©
Game Quest Online - Games and more!


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.28 Seconds

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