PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
slackervaara
Worker
Worker


Joined: Aug 26, 2007
Posts: 106

PostPosted: Sat Dec 22, 2007 8:34 am Reply with quote Back to top

I have a PHP-Nuke 7.6 site patched 3.3. When I use the Search module for articles words with Scandinavian letters هنِ are not found anylonger. But if I use the original index.php for 7.6 it works correctly. I have tried to use the index.php from latest RavenNuke, but it had the problem too. Is there a simple fix for this?
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7339
Location: Arizona

PostPosted: Sat Dec 22, 2007 9:04 am Reply with quote Back to top

Unfortunately, I have found so much bubblegum and bailing wire in nuke and the patches that in some cases these are getting broken. Let us try this. Please use the index.php from RavenNuke and make these changes and let us know how this works:

=== FIND ===

Code:

            $query = stripslashes(htmlentities($query, ENT_QUOTES));


=== REPLACE WITH ===

Code:

            $query = check_html($query, 'nohtml'); // This will also take care of stripslashes but only if needed


=== FIND ===

Code:

                .'<input size="25" type="text" name="query" value="'.$query.'" />&nbsp;&nbsp;'


=== REPLACE WITH ===

Code:

                .'<input size="25" type="text" name="query" value="'.htmlentities($query, ENT_QUOTES).'" />&nbsp;&nbsp;'


=== FIND ===

Code:

            $query = stripslashes(check_html($query, 'nohtml'));


=== REPLACE WITH OR REMOVE ===

Code:

//            $query = stripslashes(check_html($query, 'nohtml'));


=== FIND WITHIN A WHILE LOOP ===

Code:

                            $query = stripslashes(check_html($query, 'nohtml'));


=== REPLACE WITH ===

Code:

//                            $query = stripslashes(check_html($query, 'nohtml'));


=== DONE ===

What a mess... Sad
View user's profile Send private message Visit poster's website
slackervaara
Worker
Worker


Joined: Aug 26, 2007
Posts: 106

PostPosted: Sat Dec 22, 2007 9:29 am Reply with quote Back to top

I used the index.php from latest RavenNuke.
After the first of your substitutions it worked normally. I then made all other changes and they also gave a fully functional Search with Scandinavian letters.
Many thanks! Excellent work!
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7339
Location: Arizona

PostPosted: Sat Dec 22, 2007 7:34 pm Reply with quote Back to top

RavensScripts
View user's profile Send private message Visit poster's website
slackervaara
Worker
Worker


Joined: Aug 26, 2007
Posts: 106

PostPosted: Sun Jan 20, 2008 1:52 am Reply with quote Back to top

There is a similar bug also in Search of the Web_Links module.

I changed the line in modules/Web_Links/index.php:

$query = htmlentities($query, ENT_QUOTES);

to

$query = check_html($query, nohtml);
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7339
Location: Arizona

PostPosted: Fri Feb 08, 2008 7:33 am Reply with quote Back to top

Unfortunately, this presents a really bad "wrinkle". The advanced editor actually mucks with the user's input and produces entities and saves these into the data within the stories (for example). Therefore, for searching, if the raw characters are used, they are not found. Sad I would have to write specific code to inspect the $advanced_editor field and do different things depending upon which module's data is being searched.

What a P.I.T.A.!

I am just going to have to deal with these things on a case-by-case basis within the forums. Sad
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum