Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Sun Jul 08, 2012 8:40 am Reply with quote

Hey guys!

The next issue with utf-8 specialchars is placed in the forum admin section. If i try store "üöä" as forumname or forum_desc, then it doesn't stored. If i use ü then it works, but this is not the solution. There is here the problem? It seems here are working stripslashes but i don't found it.

nuke charset: UTF-8
database: utf8_gerneral_ci

Confused

Edit: This issue is only with a UTF-8 charset!


Last edited by neralex on Mon Jul 09, 2012 8:28 am; edited 1 time in total 
View user's profile Send private message
neralex







PostPosted: Sun Jul 08, 2012 9:24 am Reply with quote

I was able to solve the the save functions with utf8_decode and utf8_encode. But why i must use it with an utf-8 setup, is very strange for me.:

search in /modules/Forums/admin/admin_forums.php:

Code:
$forumname = $row['forum_name'];

$forumdesc = $row['forum_desc'];


replace it:

Code:
$forumname = utf8_decode($row['forum_name']);

$forumdesc = utf8_decode($row['forum_desc']);


search in /modules/Forums/admin/admin_forums.php:

Code:
            SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) .", attached_forum_id = " . intval($HTTP_POST_VARS['attached_forum_id']) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "


replace it:

Code:
      $forumname = $db->sql_escape_string(htmlspecialchars_decode(check_html(utf8_encode(str_replace("\'", "''", $HTTP_POST_VARS['forumname'])), 'nohtml'), ENT_QUOTES));

      $forumdesc = $db->sql_escape_string(htmlspecialchars_decode(check_html(utf8_encode(str_replace("\'", "''", $HTTP_POST_VARS['forumdesc'])), 'nohtml'), ENT_QUOTES));   
         $sql = "UPDATE " . FORUMS_TABLE . "
            SET forum_name = '" . $forumname . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) .", attached_forum_id = " . intval($HTTP_POST_VARS['attached_forum_id']) . ",forum_desc = '" . $forumdesc . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
            WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);


search for output of forumname and forumdesc in /modules/Forums/admin/admin_forums.php:

Code:
                  'FORUM_NAME' => $forum_rows[$j]['forum_name'],

                  'FORUM_DESC' => $forum_rows[$j]['forum_desc'],


replace it:

Code:
                  'FORUM_NAME' => utf8_decode($forum_rows[$j]['forum_name']),

                  'FORUM_DESC' => utf8_decode($forum_rows[$j]['forum_desc']),


Last edited by neralex on Mon Jul 09, 2012 5:00 pm; edited 5 times in total 
montego
Site Admin



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

PostPosted: Sun Jul 08, 2012 9:25 am Reply with quote

neralex, I do want to start off by thanking you for letting us know of these issues, as it will help us in our work with RN 3.0. Just realize, however, that we do not officially support UTF-8 until RN 3.0. So, just ask for your patience and understanding in this regards. A ton of changes have already been made for 3.0 around UTF-8 and related filtering. We cannot possibly release individual one-off solutions when everything is so interrelated. Maybe you would be willing to be a alpha/beta tester when we're closer to having the core changes complete? (But, there would have to be stipulations that you use at your own risk.)

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
neralex







PostPosted: Sun Jul 08, 2012 9:52 am Reply with quote

You're welcome. This is an good idea. I work atm on a new version for my radio page with a utf-8 setup and it would also be beneficial for me. Let me know if you have everything ready.
 
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1122

PostPosted: Mon Jul 09, 2012 4:47 am Reply with quote

Thanks neralex for this solutions. Can u upload the whole file in order to get rid of the space. I tried to do it but I guess there are some spaces in between. Thanks in advance
 
View user's profile Send private message
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Mon Jul 09, 2012 6:41 am Reply with quote

Unicornio, the transition to utf-8 requires changes to be made to the entire CMS. This is a very complicated transition. RavenNuke 3 will use uft-8. Unless you are prepared to make all the changes to your site on your own, you should wait until RN3 is released as there will be issues if everything is not converted over.

_________________
Tricked Out News 
View user's profile Send private message Send e-mail Visit poster's website
neralex







PostPosted: Mon Jul 09, 2012 8:18 am Reply with quote

Nuken is right.

I work on a new page and need there utf-8 as charset for scripts, they work with the nuke together but have an own stand alone panel, too. I will implement my stand alone systems into the nuke as module and here is utf-8 as charset needed. This is the reason why i go step by step through all modules and check the utf-8 issues. I work at the moment with two charsets in three systems, but in some combinations is it very complicated.

speedtype
 
neralex







PostPosted: Mon Jul 09, 2012 4:25 pm Reply with quote

The hole forum admin section must be "prepare" with a new filtering for utf-8. I hope in RN30 is it much better.
 
montego







PostPosted: Tue Jul 10, 2012 7:36 am Reply with quote

neralex,

Not so sure on the Forum code as we are also wanting to severe the close integration with phpBBx a go with more of a bridge model. This way, we are hoping to allow connecting up any version of phpBB to RN or possibly even other BB type apps.

I would suspect that the newer phpBB versions have much better support for UTF-8... probably support it natively. Another good reason why to do the above "severing". Hope this makes sense.
 
neralex







PostPosted: Tue Jul 10, 2012 3:30 pm Reply with quote

The next one is, i can not store the searched words into the forum search table. Only the session and search arrays are stored. So i can not use the forum search. The forum postings are stored fine but not the searched words.

Edit: I was able to solve this issue. I must save all postings again. Its an DB import from RN24. Now it works.


Last edited by neralex on Wed Jul 11, 2012 2:40 am; edited 2 times in total 
nuken







PostPosted: Tue Jul 10, 2012 3:37 pm Reply with quote

My site running RN2.5 has no problem with the search of the forums.
 
neralex







PostPosted: Tue Jul 10, 2012 4:18 pm Reply with quote

...your site is runnig with iso not with utf-8.
 
hicuxunicorniobestbuildpc







PostPosted: Tue Jul 10, 2012 7:05 pm Reply with quote

I volunteer to test and modify whatever time it takes. If anybody send me all the files I need to change; then I do it asap but I guess it is a lot of work. Neralex, as I told you before. Upload the files to test it. Count on me on any beta version guys.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©