351
goffy
Re: TDMCreate 1.91 alpha 1 for Testing
  • 2014/8/3 9:55

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


hi timgno

i'll test in the next days

can you tell me:
Quote:
editing fields: what does checkbox "Field: Is parent" mean/cause?

creating table: what does checkbox "Permissions for this table" mean/cause?



352
goffy
Re: Adoptions of uploader.php
  • 2014/7/31 9:38

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


Additional comment:
Quote:
'Error occured: error #1. ...'

What does us the error number say? Only, that this is the first error. If we use error numbers, that real error numbers (each number means a specific error).



353
goffy
Adoptions of uploader.php
  • 2014/7/31 9:36

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


Suggestion for adopting uploader.php

example:
Upload limit defined in module preferences: 1 MB
upload limit from upload_max_filesize directive in php.ini: 4 MB

if you try to upload a picture with 2MB, you get the error, that file size is too big, only 1MB allowed. Fine.
if you try to upload a picture with 5MB, you get the error, that file was not uploaded, but no reason. Not good.
The reason for this is, that in the $_FILES-array there is no value for $_FILES['userfile']['tmp_name'].
Comparing the defined limit with the real file size is also not possible, because $_FILES['userfile']['size'] is also empty.

To get a clear error message, uploader.php should also handle all file upload errors

In my opinion function fetchMedia should be like this
function fetchMedia($media_name$index null)
    {
        
$this->errors = array();
        if (empty(
$this->extensionToMime)) {
            
$this->setErrors(_ER_UP_MIMETYPELOAD);
            return 
false;
        }
        if (!isset(
$_FILES[$media_name])) {
            
$this->setErrors(_ER_UP_FILENOTFOUND);
            return 
false;
        } else if (
is_array($_FILES[$media_name]['name']) && isset($index)) {
            
$index intval($index);
            
$this->mediaName = (get_magic_quotes_gpc()) ? stripslashes($_FILES[$media_name]['name'][$index]) : $_FILES[$media_name]['name'][$index];
            
$this->mediaType $_FILES[$media_name]['type'][$index];
            
$this->mediaSize $_FILES[$media_name]['size'][$index];
            
$this->mediaTmpName $_FILES[$media_name]['tmp_name'][$index];
            
$this->mediaError = !empty($_FILES[$media_name]['error'][$index]) ? $_FILES[$media_name]['error'][$index] : 0;
        } else {
            
$media_name =& $_FILES[$media_name];
            
$this->mediaName = (get_magic_quotes_gpc()) ? stripslashes($media_name['name']) : $media_name['name'];
            
$this->mediaType $media_name['type'];
            
$this->mediaSize $media_name['size'];
            
$this->mediaTmpName $media_name['tmp_name'];
            
$this->mediaError = !empty($media_name['error']) ? $media_name['error'] : 0;            
        }       
        if ((
$ext strrpos($this->mediaName'.')) !== false) {
            
$ext strtolower(substr($this->mediaName$ext 1));
            if (isset(
$this->extensionToMime[$ext])) {
                
$this->mediaRealType $this->extensionToMime[$ext];
            }
        }
        
//check first for file-upload errors
        
if ($this->mediaError 0) {
            
$this->setErrors(sprintf(_ER_UP_ERROROCCURRED$this->mediaError));
            switch (
$this->mediaError) {
                case 
1//UPLOAD_ERR_INI_SIZE
                    
$this->setErrors(_ER_UP_PHPERR_INI_SIZE);
                    break;
                case 
3//UPLOAD_ERR_PARTIAL
                    
$this->setErrors(_ER_UP_PHPERR_PARTIAL);
                    break;
                case 
4//UPLOAD_ERR_NO_FILE
                    
$this->setErrors(_ER_UP_PHPERR_NO_FILE);
                    break;
                case 
6//UPLOAD_ERR_NO_TMP_DIR
                    
$this->setErrors(_ER_UP_PHPERR_NO_TMP_DIR);
                    break;
                case 
7//UPLOAD_ERR_CANT_WRITE
                    
$this->setErrors(_ER_UP_PHPERR_CANT_WRITE);
                    break;
                case 
8//UPLOAD_ERR_EXTENSION
                    
$this->setErrors(_ER_UP_PHPERR_EXTENSION);
                    break;                
                case 
2//UPLOAD_ERR_FORM_SIZE, should be done by checkMaxFileSize
                
case 0//UPLOAD_ERR_OK: no error
                
default:
                    break;
            }
            return 
false;
        }
        
//than checks by xoopsuploader
        
if (intval($this->mediaSize) < 0) {
            
$this->setErrors(_ER_UP_INVALIDFILESIZE);
            return 
false;
        }
        if (
$this->mediaName == '') {
            
$this->setErrors(_ER_UP_FILENAMEEMPTY);
            return 
false;
        }
        if (
$this->mediaTmpName == 'none' || ! is_uploaded_file($this->mediaTmpName)) {
            
$this->setErrors(_ER_UP_NOFILEUPLOADED);
            return 
false;
        }
        return 
true;
    }


We would need following new lang vars:
define('_ER_UP_PHPERR_INI_SIZE',        'The uploaded file exceeds the upload_max_filesize directive in php.ini');
define('_ER_UP_PHPERR_PARTIAL',         'The uploaded file was only partially uploaded');
define('_ER_UP_PHPERR_NO_FILE',         'No file was uploaded');
define('_ER_UP_PHPERR_NO_TMP_DIR',      'Missing a temporary folder');
define('_ER_UP_PHPERR_CANT_WRITE',      'Failed to write file to disk');
define('_ER_UP_PHPERR_EXTENSION',       'A PHP extension stopped the file upload');


Now we get a clear error: Quote:
'Error occured: error #%s. The uploaded file exceeds the upload_max_filesize directive in php.ini'


Any other suggestions/opinions?



354
goffy
Re: TDMCreate 1.91 alpha 1 for Testing
  • 2014/7/13 15:23

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


Hi timgno

The results of my tests:

tdmcreate 1.91
downloaded from github, 12.07.2014 11:50
Xoops 2.5.7.

1) some outputs from testing are still active

2) if you create a new table, you will be redirected automatically to field editing. In all dropdowns (type, attributes,...) you have preselected "1"

3) you create a new table and define 4 fields for this table. if yo later change the number of fields (e.g. you say now 5), you get only 4 fields in editing mode of table fields

4) if you are in the field list of a table, there is in column "action" a blue double-headed arrow without function or link. should there be one?

5) if you are in the field list of a table, there is in column "id" a black four-headed arrow without function or link. should there be one?

6) after the first table I created a second one. after submit and redirect to field editing I see in the head the testing output: string(3) "257" string(1) "2" string(1) "4" string(2) "mb"
if I look in database in table tdmcreate_tables, I see in field "table_mid" the value 257
my new table is not available in table overview of my new module.
if I change value in table_mid to 1 (the id of my new module) the new table appears in table overview.
if table tdmcreate_fields in column "field_mid" you find also 257, but it seems that this has no consequences

7) editing fields: what does checkbox "Field: Is parent" mean/cause?

8) creating table: what does checkbox "Permissions for this table" mean/cause?

9) missing language var "_AM_TDMCREATE_MODULE_NBFIELDS"

10) you can select "Table: Main Field" for each field

11) shown protocol after click on building the module says: all action worked fine

12) creation of file mysql.sql doesn't work
example of created sql string:
CREATE TABLE `ggteam_groups` (
`grp_id` 2(8) 3 2 AUTO_INCREMENT,
`grp_name` 14(100) 3 2 DEFAULT '',
`grp_textarea` 14(100) 3 3 DEFAULT '',
`grp_text2` 14(100) 3 3 DEFAULT '',
PRIMARY KEY (`grp_id`)
) ENGINE=MyISAM;

13) I corrected mysql.sql and tried to install my new module and got following error:
Error : Smarty error: [in db:ggteam_admin_groups.tpl line 19]: syntax error: unrecognized tag: $list. (Smarty_Compiler.class.php, line 446)

14) in the class files for the tables there is no initVar (e.g. $this->initVar('field_id', XOBJ_DTYPE_INT)) in the function public function __construct()
in TDMCreate\class\files\classes\classes.php in function private function getInitVars($fields) the switch looks for e.g. "INT", but in table tdmcreate_fields you find in the field "field_type" the value 2 (instead of INT)



let me know, if you have fixed this than I retest it



355
goffy
Re: voted
  • 2014/7/9 11:08

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


done



356
goffy
Re: vieuw of download pages
  • 2014/5/29 15:30

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


Hi fla-ts

1) which download module and version?
2) did you check module options?



357
goffy
Re: TinyMCE4XOOPS 2.0 available
  • 2014/5/11 9:12

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


hi alain01

It is the first time I use github.
I tried to edit readme.txt and added the 2 german language files.

Did it work correct?



358
goffy
Re: TinyMCE4XOOPS 2.0 available
  • 2014/5/9 14:14

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


hi alain01

great job, but two remarks

first remark:
some of the functions (xoops code,...) are only available with french language
please add again the other language files

second remark:
I tried to change to german language and got a blank editor
the reason was, that there is no german language file in external plugin codemirror
I fixed the problem, but maybe not everybody can do this

so maybe you can add to descrition of installation following:
if you change the language to another language than english (en) or french (fr), e.g. to german (de), than you have to do following:
1) create language file "german.php" in \tinymce4\language\ (the file name must be the same as language in xoops settings)
in this file you must define the language code
Quote:
define("_XOOPS_EDITOR_TINYMCE4_LANGUAGE","de");

this language code must be the same as the name of the language files himself, e.g. "de" -> de.js
2) check, whether your language files are existing:
a) \tinymce4\tinymce\js\tinymce\langs\de.js
b) \tinymce4\external_plugins\codemirror\langs\de.js
c) \tinymce4\external_plugins\youtube\langs\de.js

I will continue testing, because tinymce in the current version is really great.



359
goffy
Re: XOOPS 2.5.7 Beta 1 Released for Testing
  • 2014/3/24 16:56

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


Hi

can you please add
'xml' => 'text/xml'
in /include/mimetypes.inc.php

I'm working on a new module, where I need XML-upload
When I tried to upload XML, it always failed, while upload of txt worked.
it took our almost two hour to find out the problem.

To avoid this for next time and for other users, please add



360
goffy
Re: cant change image
  • 2014/2/2 9:46

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


hi

if you want to implement SWF you have to do it with an object like this:
<object data="myswf.swf" type="application/x-shockwave-flash" width="600" height="400">
  <
param name="movie" value="myswf.swf">
  <
param name="quality" value="high">
  <
param name="scale" value="exactfit">
  <
param name="menu" value="true">
  <
param name="bgcolor" value="#000040">
</
object>




TopTop
« 1 ... 33 34 35 (36) 37 38 39 ... 43 »



Login

Who's Online

154 user(s) are online (93 user(s) are browsing Support Forums)


Members: 0


Guests: 154


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