Fork me on GitHub
Get XOOPS XOOPSXOOPS FAQFAQ ForumsForums NewsNews ThemesThemes ModulesModules
New Posts New Topics All Posts All Forums Index General Modules Themes Development International XOOPS.org

Search

Nominate XOOPS!

Learn XOOPS Core

Donat-O-Meter

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

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 3.0 4 6 adslight Android AntiHarvesting AntiMalUser AntiSpam API Apple Battlefield billige Blocks Bootstrap Captcha cell chronolabs content CĂN demo docek download Dresses evden eve facebook Fat floor Food for free Gateway Google Guide herre Home Honeypot HP html5 Human HỘ IP iPhone jQuery Language List log Loss module modules Monster new newbb news NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher Rapid RESIDENCE responsive review Rights rmcommon Room security Sentry site Smartphone Smarty Spam stem Studio support tag tdmcreate template The Theme themes User userlog weight xoops Xortify XPayment ZendFramework

New Users

Registering user

# 137636

mzmaker05

Welcome to XOOPS!

Forum Index


Board index » All Posts

Bottom   Previous Topic   Next Topic

(1) 2 3 4 ... 29745 »


#1 Posted on: Yesterday 4:38 Re: Adoptions of uploader.php
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).


Top

goffy
Not too shy to talk
Not too shy to talk
Joined:
2010/12/27 7:39
From Austria
Group:
Registered Users
Posts: 115
(Show More) (Show Less)
Topic | Forum


#2 Posted on: Yesterday 4:36 Adoptions of uploader.php
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?


Top

goffy
Not too shy to talk
Not too shy to talk
Joined:
2010/12/27 7:39
From Austria
Group:
Registered Users
Posts: 115
(Show More) (Show Less)
Topic | Forum


#3 Posted on: 7/30 3:08 Re: Olderion
It is possible interconnect module Oledrion and Profile?
I need to Oledrion while paying used user data, to be entered in Profile. To them he did not re-fill. If purchased not logged visitor, would have on its own fill so as in Oledrion now. But logged user should not have been.

Next, add the ability to add multiple contact forms.
It would also help in that, it would be possible add to the form custom fields, such as VAT and other. Companies usually need to fill in the billing information. Also can make a difference between billing and shipping address.

So what is most lacking, as payment modules.
Does anyone supplement least known payment gateways? Nowhere on the web I can not find even locally, let alone international.

Each product can only add one image.
It would be possible to add there possibility of adding at least five pictures (or more)?

Top

chaoos
Just popping in
Just popping in
Joined:
2005/3/9 13:06
From Slovakia
Group:
Registered Users
Posts: 59
(Show More) (Show Less)
Topic | Forum


#4 Posted on: 7/30 1:29 Re: How I correct the problem in xoopstube 1970 date always appears
Take a look at this post: http://xoops.org/modules/newbb/viewtopic.php?post_id=358022

In my case it worked ....

@mamba a comment before the date settings for the European countries it's not a bad idea, Something like:

//In European countries, the date format should be d-m-Y instead of Y/m/d


Top

kakos
Just popping in
Just popping in
Joined:
2002/6/6 15:13
From Hellas
Group:
Registered Users
Posts: 63
(Show More) (Show Less)
Topic | Forum


#5 Posted on: 7/29 16:04 How I correct the problem in xoopstube 1970 date always appears
How I correct the problem in xoopstube
you upload a new video and the date 1970 appears.
Resized Image

I have installed the version 2.5.7 in Spanish See it here

Regards
DAVID

Top

ipwgc
Not too shy to talk
Not too shy to talk
Joined:
2005/8/13 0:08
From Chile
Group:
Registered Users
Posts: 173
(Show More) (Show Less)
Topic | Forum


#6 Posted on: 7/29 10:41 Re: Need help for adding $vidsource in xoopstube title bar.
you are welcome

Top

olivee
Just popping in
Just popping in
Joined:
1/28 7:09
From Suisse
Group:
Registered Users
Posts: 22
(Show More) (Show Less)
Topic | Forum


#7 Posted on: 7/29 8:05 Re: layout home screen
okay, I'll try to explain it later, I will pass the link (.pdf) with an explanation of what I've tried
(don't know if i can copie a word document with pictures overhere)

Top

fla-ts
Friend of XOOPS
Friend of XOOPS
Joined:
2005/1/4 11:03
From Belgium
Group:
Registered Users
Posts: 168
(Show More) (Show Less)
Topic | Forum


#8 Posted on: 7/29 6:04 Module Installer 1.02 Beta 1 available for Testing (XOOPS 2.5.7 only)
If you are a XOOPS user and want to install several modules for testing, currently you need to install them one by one, which sometimes is quite frustrating, if there are many of them.

The same is for updating or uninstalling.

So we thought that we'll provide some help to you

Resized Image


The latest version of Module Installer will help you to:

- install modules in bulk
- update modules in bulk
- uninstall modules in bulk

Please check out this video to see how easy it is now for XOOPS users:


https://www.youtube.com/watch?v=d7zW5oaQGbA

NOTE:

a) This modules is only for XOOPS 2.5.7

b) You will need to patch the Core by copying two files from the /extras folder to /modules/system/admin/modulesadmin

Therefore, this Beta version is only for developers and "power-users", who feel comfortable with testing Beta versions of software.



Download: XOOPS File Repository on SourceForge



Top


Please support XOOPS & DONATE
Use 2.5.7 | Debugging | Requests | Bugs
Mamba
Moderator
Moderator
Joined:
2004/4/23 13:58
From Ohio, USA
Group:
Webmaster
Registered Users
Designer Group
Posts: 8032
(Show More) (Show Less)
Topic | Forum


#9 Posted on: 7/28 21:21 Re: layout home screen
That was my recommendation to you from before:

Quote:
Well, then remove the "HOME" menu item or change its link to the main URL (currently it points to Publisher)

It is still valid.

So try to do just that, and if you have problems, just let us know exactly what have you done, and we'll see how can we help...

Top


Please support XOOPS & DONATE
Use 2.5.7 | Debugging | Requests | Bugs
Mamba
Moderator
Moderator
Joined:
2004/4/23 13:58
From Ohio, USA
Group:
Webmaster
Registered Users
Designer Group
Posts: 8032
(Show More) (Show Less)
Topic | Forum


#10 Posted on: 7/28 15:08 Re: Jobs Listings 4.4 Beta 2
Are you sure you gave the right permissions AFTER you added any new categories?
What version of Xoops are you using?

John

Top

jlm69
Module Developer
Module Developer
Joined:
2002/7/19 11:20
Group:
Registered Users
Posts: 595
(Show More) (Show Less)
Topic | Forum



Top
(1) 2 3 4 ... 29745 »



[Advanced Search]