Previous Thread
Next Thread
Print Thread
Hop To
#184439 05/18/2007 6:59 PM
Joined: May 2007
Posts: 8
M
stranger
stranger
M Offline
Joined: May 2007
Posts: 8
Hi!

I'm not sure is my problem bug or it is a feature. smile
We're working on the Russian version of the forum an came across a problem. When one of my designers clicks Update General Display Options (CP->General Display Settings->HTML includes), the file "community_intro.php" gets overwritten with a wrong text encoding. Is there way (or an option) for me to be able to overwrite/update this file manually only?

Best,
Michael


Big Monsters - Big prizes!
Joined: Jun 2006
Posts: 16,532
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,532
Likes: 150
If you've set your encoding through the language editor it should save all files in that character set.

By default this is "iso-8859-1". The setting itself is "CHARSET" in the "generic.php" file in the "languages/english" directory.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: May 2007
Posts: 8
M
stranger
stranger
M Offline
Joined: May 2007
Posts: 8
Originally Posted by Gizmo
it should save all files in that character set.

Sure.
First time file community_intro.php was saved with correct encoding. But in case somebody clicking Update General Display Options, the file gets OVERwritten with "??????". I can correct this file in CP, and it'll be saved with correct text encoding... until one click Update General Display Options. One thing I need - disable automatic update for this one file smile

Last edited by Mikhail_D; 05/18/2007 7:58 PM.

Big Monsters - Big prizes!
Joined: Jun 2006
Posts: 16,532
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,532
Likes: 150
chmod it 644 so it can't be written?


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: May 2007
Posts: 8
M
stranger
stranger
M Offline
Joined: May 2007
Posts: 8
Exactly.
But, designer still working with site and forum.
Ok. Forget. This is not extremely important for our work. smile
Thank you.

Best,
Michael


Big Monsters - Big prizes!
Joined: May 2007
Posts: 8
M
stranger
stranger
M Offline
Joined: May 2007
Posts: 8
My English is very poor, so I shall write as I can. Sorry.
I have found interesting feature of htmlentities() function. Htmlentities using ISO-8859-1 codepage by default. That is why:
htmlentities($User), htmlentities($Line) etc giving us wrong result, in case var contents is something in other codepage than ISO-8859-1 (may be UTF-8 ok. I don't know).
We can use something like that:
Code
 htmlentities($User,ENT_QUOTES,$ubbt_lang['CHARSET'])

May be, it will help us to save time in the future smile

By the way, I had to include in to shoutit.inc.php code:
Code
$text = iconv("utf-8","cp1251", $text)
and in to checkrecipient.inc.php
Code
$User = iconv("utf-8","cp1251", $User)
Such includes is necessary only for some vars and fragments where AJAX is used and vars content is something in international codepage.
May be using iconv is not good idea, but it has worked for me.

And another one little correction.
viewmessages.inc.php script, near #109:
Code
$type = $ubbt_lang['TEXT_NEW']

and in viewmessages.tpl near #60
Code
{if $message[mess].type == "N"}

than we can see new message icon. But, if someone has changed his $ubbt_lang['TEXT_NEW'] = "N" from "N" to "New" or something else, then new mesages flag will never be shown.

Best,
Michael.


Big Monsters - Big prizes!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
8.0.1 Patch Changelog Discussion
by isaac - 11/26/2025 1:34 PM
Upgraded to ver8 - now can't login
by phoenix011235 - 10/24/2024 8:50 AM
Who's Online Now
1 members (Phun), 259 guests, and 127 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)