1
wizanda
Re: Question About Unicode In PHP 5.3 to 5.6+
  • 2021/7/5 22:56

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Quote:

geekwright wrote:
This is odd, because the problems switching to PHP 5.6 are usually solved by making sure the PHP configuration specifies
default_charset "utf-8"


You mentioned you just see question marks. Are those question marks or unicode replacement characters - question marks in diamonds?

What is the define for _CHARSET in language/*/global.php ?

Πρέπει να λειτουργεί;

They're plain question marks: ????

The_CHARSET in language/*/global.php was: ISO-8859-1.

Can set that as UTF-8, yet when posting it still makes question marks.

With global.php as ISO-8859-1, and ini_set("default_charset", ""), it then encodes it... Yet then has odd character errors across the site.

Thank you for the help.



2
wizanda
Re: Question About Unicode In PHP 5.3 to 5.6+
  • 2021/7/5 9:11

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Quote:

Mamba wrote:

Are they stored in the DB? If yes, couldn't you just convert the DB to UTF-8? This way the existing text would be displayed correctly, and new text would be stored as UTF-8.

Or am I missing something?

It is on posting on the forum, articles, PM, comments, etc, when the system has an empty string for the character set in PHP 5.3, it translates characters to UTF8 into the database... Wiwimod doesn't translate them, and works on posting.

On PHP 5.6+ where it has UTF8 set as the default character set , it doesn't translate the characters, and instead puts them as question marks into the database.

The database is already UTF8.

Don't worry if you don't know what causes it, as got that many issues that need attending to, might have to archive the site, and start a new one.

Think really this is just to say thank you Xoops for teaching me to code; as I recoded the whole system of our site based on what Skalpa did, and then learned loads of ways to be smarter.



3
wizanda
Re: Question About Unicode In PHP 5.3 to 5.6+
  • 2021/7/3 12:31

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


The only issue with that solution of setting the same character set across the site, is any characters posted that don't fit into that system, then don't encode properly.

Could edit the files that post, to have an undefined character set; which then partially works, yet still doesn't encode properly in PHP 5.6+.

So guess I'm stuck, where I don't know how to solve this easily.



4
wizanda
Re: Question About Unicode In PHP 5.3 to 5.6+
  • 2021/7/3 5:36

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Basically it is because since PHP 5.6+ the default value for the default_charset configuration setting is UTF-8, before that it was an empty string.

This can be fixed by adding this to the common.php file:

ini_set( 'default_charset', "" );

Which then makes sure the character set is the same as it was before, an empty string across the site.

Thanks for the help; I've learned to code because of Xoops.



5
wizanda
Question About Unicode In PHP 5.3 to 5.6+
  • 2021/7/2 21:23

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


My site still runs an optimized form of Xoops, and my server is upgrading to only allow PHP 5.6+...

When I post on the forum, PM, comments, etc... With 5.3 it would convert Hebrew, Smilies to unicode; yet when trying 5.6 it puts question marks.

What in Xoops would be processing the code before it is posted, and where would need editing to fix it please?



6
wizanda
Idea for a Themes Module
  • 2016/2/2 19:46

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Was just pondering changing the many CSS settings on the site, and thought how could add it into XOOPS core....To have CSS edit spaces for changing the theme, built into XOOPS.

Yet you could do the same in a module, create a users theme generator, having one default main layout theme with everything required, such as clear CSS titles, and places to adjust everything.

Then you could have it each user, could have their own CSS driven layout.

There would need to be a CSS cache folder; where each user has its own CSS, loaded into the default theme.

Anyways just an idea, and not really a request; just thought to share it.



7
wizanda
Re: Xoops 2.3.3 and PHP 5.3
  • 2009/7/25 21:44

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


On line 94 remove the & from =& it wasn't needed.
$xoops = new xos_kernel_Xoops2();

Add @set_magic_quotes_runtime() will stop it showing.



8
wizanda
Xoops Assigning a Variable by Reference
  • 2009/4/21 12:19

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Just to let you all know, that if you assign a variable by reference; it’s as stated a variable and not a function or class….
The reason being is from research found; it’s a reference point by variable….
So for example:
$tpl =& $xoopsTpl;

Will make the data in $xoopsTpl, change when anything in $tpl is changed….
$tpl =& new Funky($monkey);

How can it be referenced, if there is no variable associated with the transaction?
$tpl =& $handler->Funky($monkey);

This implies to use the $handler as a reference point… If you change $tpl how would it be sent into a function to change a variable, same within classes…..



9
wizanda
Newbb Sync by Case Admin Hack for Dev
  • 2008/9/17 11:12

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Something I mentioned to some of you awhile ago, yet never got around to actually making was really very simple to accomplish….
...To be placed in the current Misc form...

$form .= '<select name="synCase">';
$form .= '<option value ="rate">rate</option>';
$form .= '<option value ="report">report</option>';
$form .= '<option value ="post">post</option>';
$form .= '<option value ="topic">topic</option>';
$form .= '<option value ="forum">forum</option>';
$form .= '<option value ="category">category</option>';
$form .= '<option value ="moderate">moderate</option>';
$form .= '<option value ="read">read</option>';
$form .= '</select>';

...
Changing the original to not be as default and only when per itemreducing server load...

if(
$case $_GET['synCase']){mod_loadFunctions("recon""newbb");
newbb_synchronization($case);}


This is from the Admin sync of Newbb 4 and partially 3, and is for the Dev to incorporate. These then make it perform one action per request on a large site, else it will fail otherwise.



10
wizanda
Re: Plan on how to merge 2.2 and 2.0
  • 2008/7/27 15:19

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Since on topic of merge sorry this wasn't earlier, yet had a think about it and here is a better way for future compatibility :
common.php
$xTheme = new XTheme($xoopsConfig['banners'] == 1in_array(3$xoopsConfig['debug_mode']));
<--------------------------
add below here
$xoTheme 
=& $xTheme;

That for our $xoTheme object....Next in class/theme.php somewhere within the class xTheme:
/* added for compatibility */
function addStylesheet($src ''$attributes = array(), $content ''){$XaddStyle $this->addCSS($src,$attributes,$content);
return 
$XaddStyle;}
function 
addScript($src ''$attributes = array(), $content ''){$XaddScript $this->addJS($src,$attributes,$content);
return 
$XaddScript;}

Then that's to redirect all references automatically to the other version doing the exact same thing




TopTop
(1) 2 3 4 ... 131 »



Login

Who's Online

208 user(s) are online (135 user(s) are browsing Support Forums)


Members: 0


Guests: 208


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits