4581
ghia
Re: How do I change charset=UTF-8
  • 2008/8/8 16:04

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
anderssk wrote:
If you change to latin1 in global.php and in MySQL You run with ISO encoding.
Thats a big way around instead of re-encode formulaire's language files.
No, it isn't. If you do it right from the start, you have only two entries in the XOOPS install setup to change. Otherwise you end up with converting a lot of language and sql files. English sites won't have much problems, but when multilanguage characters are heavily used as in french and german, it becomes a total different story.
Quote:
If you run the installation with UTF and uses Formulaire with english language, You don't have any problems?
I don't know. I did only the combinations as described in my post.
Quote:
Dona_Brasil wrote:
How about the compatibility for people who upgrade? The data in my database is not necessarily UTF-8, is it?
You can look up your current encoding in PHPmyAdmin, which is in most times the default MySQL setting of latin1 and the latin1_swedish_ci collation. I recommend to use these settings with the install setup of XOOPS 2.3.0.



4582
ghia
Re: Xoops editors not working with fresh install 2.3.0rc
  • 2008/8/8 15:30

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Some additional information to the problem:
- In xoops_data\caches\xoops_cache is a file created xoops_editorlist.php wich contains a list of xoopseditors.
1249662581
return array (
  
'dhtmlext' => 
  array (
    
'title' => 'Extended DHTML Form',
    
'nohtml' => 1,
  ),
  
'dhtmltextarea' => 
  array (
    
'title' => 'DHTML Form with xCode',
    
'nohtml' => 1,
  ),
  
'textarea' => 
  array (
    
'title' => 'Plain Text',
    
'nohtml' => 1,
  ),
  
'tinymce' => 
  array (
    
'title' => 'TinyMCE',
    
'nohtml' => NULL,
  ),
  
'fckeditor' => 
  array (
    
'title' => 'WYSIWYG FCKeditor',
    
'nohtml' => NULL,
  ),
  
'koivi' => 
  array (
    
'title' => 'Koivi WYSIWYG Editor',
    
'nohtml' => NULL,
  ),
);
This is hardly a PHP file and should have another extension.

The problem are the NULL values, when these are changed to 1, then the editors become usable in the forum.

This problem comes from the fact that the editors have different keys in their editor_registry.php file.
dhtml:
return $config = array(
        
"class"     =>    "FormDhtmlExt",
        
"file"      =>    XOOPS_ROOT_PATH "/class/xoopseditor/dhtmlext/dhtmlext.php",
        
"title"     =>    _XOOPS_EDITOR_DHTMLEXT,
        
"order"     =>    1,
        
"nohtml"    =>    1
    
);

tinyMCE:
return $config = array(
        
"name"      =>    "tinymce",
        
"class"     =>    "XoopsFormTinymce",
        
"file"      =>    XOOPS_ROOT_PATH "/class/xoopseditor/tinymce/formtinymce.php",
        
"title"     =>    _XOOPS_EDITOR_TINYMCE,
        
"order"     =>    3
    
);


Shouldn't they have all the same structure?

For the use of the editors under news, I guess this is totally different:
function &news_getWysiwygForm($caption$name$value ''$width '100%'$height '400px'$supplemental='')
{
    
$editor false;
    
$x22=false;
    
$xv=str_replace('XOOPS ','',XOOPS_VERSION);
    if(
substr($xv,2,1)=='2') {
        
$x22=true;
    }
    
$editor_configs=array();
    
$editor_configs['name'] =$name;
    
$editor_configs['value'] = $value;
    
$editor_configs['rows'] = 35;
    
$editor_configs['cols'] = 60;
    
$editor_configs['width'] = '100%';
    
$editor_configs['height'] = '400px';


    switch(
strtolower(news_getmoduleoption('form_options'))) {
        case 
'spaw':
            if(!
$x22) {
                if (
is_readable(XOOPS_ROOT_PATH '/class/spaw/formspaw.php'))    {
                    include_once(
XOOPS_ROOT_PATH '/class/spaw/formspaw.php');
                    
$editor = new XoopsFormSpaw($caption$name$value);
                }
            } else {
                
$editor = new XoopsFormEditor($caption'spaw'$editor_configs);
            }
            break;

        case 
'fck':
            if(!
$x22) {
                if ( 
is_readable(XOOPS_ROOT_PATH '/class/fckeditor/formfckeditor.php'))    {
                    include_once(
XOOPS_ROOT_PATH '/class/fckeditor/formfckeditor.php');
                    
$editor = new XoopsFormFckeditor($caption$name$value);
                }
            } else {
                
$editor = new XoopsFormEditor($caption'fckeditor'$editor_configs);
            }
            break;

        case 
'htmlarea':
            if(!
$x22) {
                if ( 
is_readable(XOOPS_ROOT_PATH '/class/htmlarea/formhtmlarea.php'))    {
                    include_once(
XOOPS_ROOT_PATH '/class/htmlarea/formhtmlarea.php');
                    
$editor = new XoopsFormHtmlarea($caption$name$value);
                }
            } else {
                
$editor = new XoopsFormEditor($caption'htmlarea'$editor_configs);
            }
            break;

        case 
'dhtml':
            if(!
$x22) {
                
$editor = new XoopsFormDhtmlTextArea($caption$name$value1050$supplemental);
            } else {
                
$editor = new XoopsFormEditor($caption'dhtmltextarea'$editor_configs);
            }
            break;

        case 
'textarea':
            
$editor = new XoopsFormTextArea($caption$name$value);
            break;

        case 
'tinyeditor':
            if ( 
is_readable(XOOPS_ROOT_PATH.'/class/xoopseditor/tinyeditor/formtinyeditortextarea.php')) {
                include_once 
XOOPS_ROOT_PATH.'/class/xoopseditor/tinyeditor/formtinyeditortextarea.php';
                
$editor = new XoopsFormTinyeditorTextArea(array('caption'=> $caption'name'=>$name'value'=>$value'width'=>'100%''height'=>'400px'));
            }
            break;

        case 
'koivi':
            if(!
$x22) {
                if ( 
is_readable(XOOPS_ROOT_PATH '/class/wysiwyg/formwysiwygtextarea.php')) {
                    include_once(
XOOPS_ROOT_PATH '/class/wysiwyg/formwysiwygtextarea.php');
                    
$editor = new XoopsFormWysiwygTextArea($caption$name$value'100%''450px''');
                }
            } else {
                
$editor = new XoopsFormEditor($caption'koivi'$editor_configs);
            }
            break;
        }
        return 
$editor;
}

This function in modules/news/include/functions.php has probably to be extended with an alternate choice for version 2.3 in order to use the extra editors.



4583
ghia
Re: Smarty usage from any .html template
  • 2008/8/8 10:47

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Smarty get the information (apart from some general memory var's) from arrays that the programs assemble with information especially for their purpose. Only the information directly needed is compiled in.
The tags have no other purpose then to have a smart way of filling in HTML layout blocks. So the programming and information gets separated from design and appearance.
It would be possible to accumulate more information in the blocks and sometimes there is also need or advantage to have one more information item for a particular block or template.
But having always all possible information ready would be very inefficient: All data have to be processed and retrieved from the database, which cost also power and time and when only a fraction is used, it will be nearly a total waste.
Therefore only the 'needed' information at any moment is looked up and available trough the smarty tags.
So XOOPS stays lean and mean.



4584
ghia
Re: Formulaire Select Box problem
  • 2008/8/8 1:22

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I tested Formulaire with the new XOOPS 2.3.0rc and this problem seems to be solved.
The XOOPS classes for formhandling has had a lot of modifications, which seems to resolve this select box configuration problem.
I will try to replace the class files for the XOOPS Form of my production systen 2.2.6 with these new ones.



4585
ghia
Re: How do I change charset=UTF-8
  • 2008/8/8 0:54

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


It is not only a question of language files.

It is also affecting the SQL files used at module install.
I'm evaluating Xoops 2.3.0rc and ran in the following problem:
When installing formulaire, the fields in the example form where truncated to the first accented character.
This was because the install routine of the XOOPS system proposed UTF-8. I deleted the database and did the install again this time with latin1 and latin1_general_ci. Now the tables and the database where recreated and had the correct encoding to receive these kind of SQL. Hereafter the install of the formulaire module gave complete and correct fields for the accented characters in the database. However in the display of the browser (FF 3.0.1 and also IE6) the accented characters where replaced by blockimages.
The cause of this was the english language selection, where in /language/global.php the '_CHARSET' was defined to 'UTF-8'.
The header of the html page identified also the character encoding as UTF-8.
Apparently there was no conversion done from the database character set to the html output character set.

Installing and switching to the dutch language (my sites default) where '_CHARSET' is defined as 'ISO-8859-1' let correctly appear the accented characters.

While eastern languages may need / benefit from UTF-8, it seems to me that European languages are more advantagous to use latin1.

Maybe there should be an explication note added to the selection box in the XOOPS install procedure that points out these things.



4586
ghia
Xoops editors not working with fresh install 2.3.0rc
  • 2008/8/7 13:34

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I installed Xampp and then in a cms directory under htdocs the files under htdocs from the packages for 2.3.0rc and the addons.

The XOOPS install went fine, but the extra editors are not usable. I installed the accompagnied modules News and CBB.
In the preferences from News only DHTML and Text is working, with the others like FCK, Koivi and tinyMCE there is no input area for the article text shown.

In CBB with the extra editors are not selectable. Only Extended DHTML and plain text. The third option 'DHTML form with xCode' makes Apache crash(?) and an exception message is popped up with:
Quote:
apache.exe - Application error
The exception unknown software exception (0xc00000fd)occurred in the application at location 0x01840ea4.
Click on OK to terminate the program
Click on Cancel to debug the program


Shouldn't all the editors not be readyly available with the install or did I miss something to install or configure for the editors?



4587
ghia
Re: General problem with SQL-query
  • 2008/7/31 14:34

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
The database has one table for holding the file information and there is another table holding user specific information like playlist, flashupload etc. For displaying the playlist in the specific order I have to query the database, but I don't want to loop database queries for every single file, so I came up with this code. ATM it take me two queries for getting all file information from the user specific playlist, which should be enough.
I understand you have a playlist table where an order is defined and you want your query to follow this order. What is the structure for this playlist file (see .sql)?
Normally you can do a join for this:
"SELECT p.xfid, d.title, d.artist FROM ".$xoopsDB->prefix('debaser_playlist')." p LEFT JOIN ".$xoopsDB->prefix('debaser_files')." d ON p.xfid = d.xfid  WHERE p.user = userid and p.playlist = playlistid ORDER BY p.orderfld;"



4588
ghia
Re: General problem with SQL-query
  • 2008/7/31 9:26

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
The exact order has to be 2 3 1
Why do you want this arbitrary order?



4589
ghia
Re: General problem with SQL-query
  • 2008/7/30 21:01

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
This was my first shot and surprisingly while I printed out the results, the results were ordered. Instead of 3 2 1 it was 1 2 3. Not what I wanted! I wanted the exact order where it was in the database.
Since xfid is the auto increment field, 1 2 3 is the correct database order. If you want it backwards, specify
order by xfid desc



4590
ghia
Re: Site has started sending users to wrong http:// address
  • 2008/7/30 20:27

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Your URL is faulty. You can't have any /'s before the TLD (.com).




TopTop
« 1 ... 456 457 458 (459) 460 461 »



Login

Who's Online

73 user(s) are online (40 user(s) are browsing Support Forums)


Members: 0


Guests: 73


more...

Donat-O-Meter

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

Latest GitHub Commits