You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 667 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Language images in Forum in PHP-Nuke 7.4/7.3
Bug Fixesaenigma writes "I think to have found a little bug into phpBB port to PHP-Nuke with the language images of the forum.
Here how I have fixed the problem.

I also make a little patch to make the forum HTML4.01 compliant, read all...

While I was developing the theme for my site I found what I think to be a bug into che porting of phpBB to PHP-Nuke. I'm not 100% sure of this but to make my and other themes function properly I had to do a patch to a file of phpBB.

This "bug" does not permit the correct loading of the language images of phpBB ported to PHP-Nuke, if you select a language different from english into your portal the forum would be translated but the images used to make a new post or reply does not.

I've tested this on PHP-Nuke 7.3 and 7.4, but I think the bug should be present also in previous version. I have NOT tested the standalone versione of phpBB.


Here what I did:

The file to be patched is : html/includes/functions.php

You have to search for the line ALL ON THE SAME LINE:


$img_lang = ( file_exists(@phpbb_realpath($phpbb_root_path . $current_template_path . '/images/lang_' . $board_config['default_lang'])) ) ? $board_config['default_lang'] : 'english';


(about at line 356 in Nuke 7.4 and line 377 in Nuke 7.3)

Comment out that line and substitute with this:


$img_lang = ( file_exists(@phpbb_realpath($current_template_path . '/images/lang_' . $board_config['default_lang'])) ) ? $board_config['default_lang'] : 'english';


Now the forum would load the correct language image from the correct directory of the theme, surly if them are present, in case language file is not available it will continue loading the english one.


-----


And now a little patch if you want to make the forum HTML4.01 compliant, or at least try to make it so.

You have to patch the file : html/includes/sessions.php

You have to search for the funtions "append_sid" and "admin_sid" int othe file and patch by adding a line before the last "return $url" like below.


function append_sid($url, $non_html_amp = false)
[...]
$url = str_replace("&", "&a mp;", $url);
return $url;
}

function admin_sid($url, $non_html_amp = false)
[...]
$url = str_replace("&", "&a mp;", $url);
return($url);
}

Remove the space in "&a mp;"


Whit this patch the forum would contruct the link using the specification of HTML4.01

I'd like to know if someone could test this infos and check them. Thanks.
"
Posted on Friday, August 13 @ 04:42:11 CEST by VinDSL
 
Related Links
· More about Bug Fixes
· News by VinDSL


Most read story about Bug Fixes:
Downloads & Web Links vulnerability Patch

Article Rating
Average Score: 5
Votes: 1


Please take a second and vote for this article:

Excellent
Very Good
Good
Regular
Bad


Options

 Printer Friendly Page  Printer Friendly Page

 Send to a Friend  Send to a Friend

Threshold
The comments are owned by the poster. We aren't responsible for their content.

No Comments Allowed for Anonymous, please register

Re: Language images in Forum in PHP-Nuke 7.4/7.3 (Score: 1)
by aenigma on Saturday, August 14 @ 05:16:26 CEST
(User Info | Send a Message) http://www.thekey.it
Excuse me but I found a little problem in the patch for the HTML4.01 compliant.

The patch must be done this way:

The two bold line indicated must be integrated with this one so the code seems like :

$url = str_replace("&a mp;", "&", $url);
$url = str_replace("&", "&a mp;", $url);

The patch is now of TWO line!
If not integrated in this manner you should have problems with private_messages.

Excuse me, but my private_messages was disabled when I tested the patch.
Sorry


Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.235 Seconds - 271 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::