21
PTlooker
Re: Update from newbb 1 to newbb 2 problem
  • 2005/6/6 23:15

  • PTlooker

  • Just can't stay away

  • Posts: 447

  • Since: 2003/6/15


Like you told me, i put it around line 275, and nothing happens...i mean nothing different on preference..nothing... my code on newbb's xoops_version.php is like this:

Quote:
$modversion['config'][] = array(
'name' => 'cache_enabled',
'title' => '_MI_CACHE_ENABLE',
'description' => '_MI_CACHE_ENABLE_DESC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 0);

// debug em relaçao ao erro das imagens

require_once(XOOPS_ROOT_PATH.'/class/xoopslists.php');

$dirlist =& XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH.'/modules/newbb/images/imagesets/');

// fim do debug

$modversion['config'][] = array(
'name' => 'dir_attachments',
'title' => '_MI_DIR_ATTACHMENT',
'description' => '_MI_DIR_ATTACHMENT_DESC',
'formtype' => 'textbox',
'valuetype' => 'text',
'default' => 'uploads/newbb');


Thanks a lot for your time

22
phppp
Re: Update from newbb 1 to newbb 2 problem
  • 2005/6/6 23:18

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


The line # is not correct.
modify as following:

/*
$handle = opendir(XOOPS_ROOT_PATH.'/modules/newbb/images/imagesets/');
while (false !== ($file = readdir($handle))) {
if (is_dir(XOOPS_ROOT_PATH.'/modules/newbb/images/imagesets/'.$file) && !preg_match("/^[.]{1,2}$/",$file) && strtolower($file) != 'cvs') {
$dirlist[$file]=$file;
}
}
closedir($handle);
*/

require_once(XOOPS_ROOT_PATH.'/class/xoopslists.php');
$dirlist =& XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH.'/modules/newbb/images/imagesets/');

$modversion['config'][] = array(
'name' => 'image_set',
'title' => '_MI_IMG_SET',
'description' => '_MI_IMG_SET_DESC',
'formtype' => 'select',
'valuetype' => 'text',
'options' => $dirlist,
'default' => "default");

23
PTlooker
Re: Update from newbb 1 to newbb 2 problem
  • 2005/6/6 23:21

  • PTlooker

  • Just can't stay away

  • Posts: 447

  • Since: 2003/6/15


Sorry but do i delete all the code i have entered and put yours? or just some lines?
Thanks!

24
phppp
Re: Update from newbb 1 to newbb 2 problem
  • 2005/6/6 23:25

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


change the original xoops_version.php with codes above

I do not remember the line # but make sure you find
$handle opendir(XOOPS_ROOT_PATH.'/modules/newbb/images/imagesets/');
while (
false !== ($file readdir($handle))) {
  if (
is_dir(XOOPS_ROOT_PATH.'/modules/newbb/images/imagesets/'.$file) && !preg_match("/^[.]{1,2}$/",$file) && strtolower($file) != 'cvs') {
    
$dirlist[$file]=$file;
  }
}
closedir($handle);


and
$modversion['config'][] = array(
    
'name'             => 'image_set',
    
'title'         => '_MI_IMG_SET',
    
'description'     => '_MI_IMG_SET_DESC',
    
'formtype'         => 'select',
    
'valuetype'     => 'text',
    
'options'         => $dirlist,
    
'default'         => "default");

25
PTlooker
Re: Update from newbb 1 to newbb 2 problem
  • 2005/6/6 23:33

  • PTlooker

  • Just can't stay away

  • Posts: 447

  • Since: 2003/6/15


I found it, and still cant see any difference.. my is like this:

Quote:

// Smarty
$modversion['use_smarty'] = 1;

include_once(XOOPS_ROOT_PATH.'/modules/newbb/include/functions.php');

/*
$handle = opendir(XOOPS_ROOT_PATH.'/modules/newbb/images/imagesets/');
while (false !== ($file = readdir($handle))) {
if (is_dir(XOOPS_ROOT_PATH.'/modules/newbb/images/imagesets/'.$file) && !preg_match("/^[.]{1,2}$/",$file) && strtolower($file) != 'cvs') {
$dirlist[$file]=$file;
}
}
closedir($handle);
*/

require_once(XOOPS_ROOT_PATH.'/class/xoopslists.php');
$dirlist =& XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH.'/modules/newbb/images/imagesets/');

$modversion['config'][] = array(
'name' => 'image_set',
'title' => '_MI_IMG_SET',
'description' => '_MI_IMG_SET_DESC',
'formtype' => 'select',
'valuetype' => 'text',
'options' => $dirlist,
'default' => "default");

$modversion['config'][] = array(
'name' => 'image_type',
'title' => '_MI_IMG_TYPE',
'description' => '_MI_IMG_TYPE_DESC',
'formtype' => 'select',
'valuetype' => 'text',
'options' => array('png'=>'png', 'gif'=>'gif', 'auto'=>'auto'),
'default' => "png");


Any idea of what may be?

Thanks for the fast help

26
phppp
Re: Update from newbb 1 to newbb 2 problem
  • 2005/6/6 23:39

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


turn off your url hack
or give me an ftp account so that I could debug with your module

27
PTlooker
Re: Update from newbb 1 to newbb 2 problem
  • 2005/6/6 23:41

  • PTlooker

  • Just can't stay away

  • Posts: 447

  • Since: 2003/6/15


Let please say that i put the url hack yesterday too..and before i do that..the forum already had that problem with the image...
And i dont know how to create a ftp account for you to that directory...
What can it be?

EDIT: Another thing i noticed now is that with firefox the forum opens..but with ie..i get an error.. :|

28
phppp
Re: Update from newbb 1 to newbb 2 problem
  • 2005/6/6 23:46

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


add one line and see what to display:

require_once(XOOPS_ROOT_PATH.'/class/xoopslists.php');
$dirlist =& XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH.'/modules/newbb/images/imagesets/');
var_dump($dirlist);

29
PTlooker
Re: Update from newbb 1 to newbb 2 problem
  • 2005/6/6 23:52

  • PTlooker

  • Just can't stay away

  • Posts: 447

  • Since: 2003/6/15


Now it shows:

array(1) { ["default"]=> string(7) "default" }

What does it means?

30
phppp
Re: Update from newbb 1 to newbb 2 problem
  • 2005/6/6 23:56

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


delete that line and update newbb module

Login

Who's Online

377 user(s) are online (320 user(s) are browsing Support Forums)


Members: 0


Guests: 377


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