21
Bleekk
Re: extGallery 1.13 Beta-1 available for testing (XOOPS 2.5.8, PHP 7)
  • 2017/2/27 15:57

  • Bleekk

  • Theme Designer

  • Posts: 941

  • Since: 2002/12/14


@Mage posted already here the answer to the disappearing categories but for a different module
https://xoops.org/modules/newbb/viewtopic.php?post_id=362031#362031

open modules/tdmpicture/class/tree.php and replace this code (line 41 - 68)
public function _makeArrayTreeOptions($fieldName$key, &$ret$prefix_orig$prefix_curr '')
    {
        if (
$key 0) {
            
$value       $this->tree[$key]['obj']->getVar($this->myId);
            
$ret[$value] = $prefix_curr $this->tree[$key]['obj']->getVar($fieldName);
            
$prefix_curr .= $prefix_orig;
        }

        if (isset(
$this->tree[$key]['child']) && !empty($this->tree[$key]['child'])) {
            foreach (
$this->tree[$key]['child'] as $childkey) {
                
$this->_makeArrayTreeOptions($fieldName$childkey$ret$prefix_orig$prefix_curr);
            }
        }
    }

    
/**
     * @param        $fieldName
     * @param string $prefix
     * @param int    $key
     * @return array
     */
    
public function makeArrayTree($fieldName$prefix '-'$key 0)
    {
        
$ret = array();
        
$this->_makeArrayTreeOptions($fieldName$key$ret$prefix);

        return 
$ret;
    }

with following
protected function makeArrayTreeOptions($fieldName$key, &$ret$prefix_orig$prefix_curr '')
       {
           if (
$key 0) {
               
$value $this->_tree[$key]['obj']->getVar($this->_myId);
               
$ret[$value] = $prefix_curr $this->_tree[$key]['obj']->getVar($fieldName);
               
$prefix_curr .= $prefix_orig;
           }
           if (isset(
$this->_tree[$key]['child']) && !empty($this->_tree[$key]['child'])) {
               foreach (
$this->_tree[$key]['child'] as $childKey) {
                   
$this->makeArrayTreeOptions($fieldName$childKey$ret$prefix_orig$prefix_curr);
               }
           }
       }
    
/**
     * @param        $fieldName
     * @param string $prefix
     * @param int    $key
     * @return array
     */
     
public function makeArrayTree($fieldName$prefix '-'$key 0) {
        
$ret = array();
        
$this->makeArrayTreeOptions($fieldName$key$ret$prefix);

        return 
$ret;
    }

22
Zap_English
Re: extGallery 1.13 Beta-1 available for testing (XOOPS 2.5.8, PHP 7)

seems to work, it's showing the categories but it gives the errors

Errors UnknownDeclaration of TDMObjectTree::_makeSelBoxOptions() should be compatible with XoopsObjectTree::_makeSelBoxOptions($fieldName$selected$key, &$ret$prefix_orig$prefix_curr ''in file /modules/tdmpicture/class/tree.php line 347 UnknownDeclaration of TdmCatObjectTree::_makeSelBoxOptions() should be compatible with XoopsObjectTree::_makeSelBoxOptions($fieldName$selected$key, &$ret$prefix_orig$prefix_curr ''in file /modules/tdmpicture/class/tree2.php line 362

23
Bleekk
Re: extGallery 1.13 Beta-1 available for testing (XOOPS 2.5.8, PHP 7)
  • 2017/2/27 16:12

  • Bleekk

  • Theme Designer

  • Posts: 941

  • Since: 2002/12/14


to get the images work with categories change line 185 from
public function _makeSelBoxOptions($fieldName$selected$key, &$ret$prefix_orig$prefix_curr ''$perm)

to
public function makeSelBoxOptions($fieldName$selected$key, &$ret$prefix_orig$prefix_curr ''$perm)


and line 216 from
$this->_makeSelBoxOptions($fieldName$selected$childkey$ret$prefix_orig$prefix_curr$perm);

to
$this->makeSelBoxOptions($fieldName$selected$childkey$ret$prefix_orig$prefix_curr$perm);


report bugs please

24
Bleekk
Re: extGallery 1.13 Beta-1 available for testing (XOOPS 2.5.8, PHP 7)
  • 2017/2/27 16:13

  • Bleekk

  • Theme Designer

  • Posts: 941

  • Since: 2002/12/14


there changes are only relevant for xoops 2.5.8.1
the module works with xoops 2.5.9

25
Zap_English
Re: extGallery 1.13 Beta-1 available for testing (XOOPS 2.5.8, PHP 7)

Also, in image upload it says "You can load 5 file(s)." but you can only upload one at a time

Also, categories don't show, so you can't submit an image to a category. The category dropdown is empty

26
Bleekk
Re: extGallery 1.13 Beta-1 available for testing (XOOPS 2.5.8, PHP 7)
  • 2017/2/27 16:20

  • Bleekk

  • Theme Designer

  • Posts: 941

  • Since: 2002/12/14


see my post #23

27
Zap_English
Re: extGallery 1.13 Beta-1 available for testing (XOOPS 2.5.8, PHP 7)

That change fixed the "category" issue in the uplload but you can still only upload one at a time

and the error show

UnknownDeclaration of TdmCatObjectTree::_makeSelBoxOptions() should be compatible with XoopsObjectTree::_makeSelBoxOptions($fieldName$selected$key, &$ret$prefix_orig$prefix_curr ''in file /modules/tdmpicture/class/tree2.php line 362


and it has the same error as extgallery when viewing the images

it's sticking everything in the footer and removes the admin portion of the menus. only the modules menus shows

28
Zap_English
Re: extGallery 1.13 Beta-1 available for testing (XOOPS 2.5.8, PHP 7)

Resized Image

29
Cesagonchu
Re: extGallery 1.13 Beta-1 available for testing (XOOPS 2.5.8, PHP 7)

Please, open a new Topic for TDMPicture.

You are off topic

30
Zap_English
Re: extGallery 1.13 Beta-1 available for testing (XOOPS 2.5.8, PHP 7)

I did

and it got ignored. At least here Bleekk is trying to help

Login

Who's Online

243 user(s) are online (155 user(s) are browsing Support Forums)


Members: 0


Guests: 243


more...

Donat-O-Meter

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

Latest GitHub Commits