1
wcrwcr
Xpressme 1.07 block and wide search issues
  • 2009/2/3 13:44

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hi all

I´m testing this mod on a XOOPS 2.0.18.2 install.
When activate the *Side bar" block i´ve received this error:

Fatal error: Call to a member function getVar() on a non-object in /home/volmac/public_html/modules/xpress/include/functions.ini.php on line 53

on the block itself

here follows line 51 through 56 for better explanation:

function get_wpdb_version()
{
        
$mydirname $GLOBALS["xoopsModule"]->getVar("dirname");
        
$ver_file XOOPS_ROOT_PATH ."/modules/$mydirname/wp-includes/dversion.php";
        
        return 
$wp_db_version;

Any fix?

Another question:

It seems that the XOOPS native search is not capable of search inside xpress and vice-versa.

How difficult would be to include at least xpress on the wide XOOPS search?

BTW> as i´m using iso for language charset (portuguese in my case)I had to convert hte original utf-8 wordpress portuguese to iso. For those of you facing the same problem just drop me a PM and i´ll send you the language pack.

Thanks

2
wcrwcr
Re: Xpressme 1.07 block and wide search issues
  • 2009/2/3 17:30

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Anybody using it?

3
wcrwcr
Re: Xpressme 1.07 block and wide search issues
  • 2009/2/4 16:44

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hi

Just a little bump

I thought that mod was a bit more popular

4
zyspec
Re: Xpressme 1.07 block and wide search issues
  • 2009/2/4 21:44

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


You might try replacing the function with this:

function get_wpdb_version() 

  global 
$xoopsModule;
  
$mydirname $xoopsModule->getVar("dirname"); 
  
$ver_file XOOPS_ROOT_PATH ."/modules/$mydirname/wp-includes/dversion.php"
         
  return 
$wp_db_version;

5
wcrwcr
Re: Xpressme 1.07 block and wide search issues
  • 2009/2/4 22:45

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Thank You very much zyspec for your input but that did not do the trick.

The error returned is exactly the same, wierd insn´t it?

I´ll paste here the block´s code ( blocks/xpress_sidebar_block.php), just in case:

if( ! defined'XOOPS_ROOT_PATH' ) ) exit ;
$mydirname basenamedirnamedirname__FILE__ ) ) ) ;

eval( 
'
function b_'
.$mydirname.'_sidebar_show($options){
    return _b_sidebar_show($options) ;
}
function b_'
.$mydirname.'_sidebar_edit($options){
    return _b_sidebar_edit($options) ;
}
) ;        
    
if( ! 
defined'XPRESS_SIDEBAR_BLOCK_INCLUDED' ) ) {
    
define'XPRESS_SIDEBAR_BLOCK_INCLUDED' ) ;
    
    function 
_b_sidebar_show($options)
    {
        
$mydirname = empty( $options[0] ) ? 'xpress' $options[0] ;
        
$page_disp = empty( $options[1] ) ? false true ;
        
$link_disp = empty( $options[2] ) ? false true ;    
        
$cats_disp = empty( $options[3] ) ? false true ;
        
$meta_disp = empty( $options[4] ) ? false true ;
        
$arch_disp = empty( $options[5] ) ? false true ;
        
$this_template = empty( $options[6] ) ? 'db:'.$mydirname.'_block_sidebar.html' trim$options[6] );
        
        
$mydirpath XOOPS_ROOT_PATH '/modules/' $mydirname;
        
$this_url '/modules/'$mydirname;
        
$call_url $_SERVER['REQUEST_URI'];
        
$side_bar_dir $mydirpath '/templates/wordpress/sidebar.php';

        if (
strstr($call_url,$this_url)){
            
            
ob_start();
            include (
$side_bar_dir);
            
$block['content']  ='"n" ;
            
$block['content'] .=ob_get_contents();
            
ob_end_clean();
                
        } else {
            require_once(
XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');
            
$para ="";
            
            
$block['content'] = fetch_block($mydirname,'sidebar_block',$para);
        }
        
$patterns[0]= '/

;
        
$patterns[1] = '/

/'
;
        
$replacements[0] = ';
        
$replacements[1] = '

'
;
        
$preg $block['content'];
        
$preg preg_replace($patterns,$replacements,$preg);
        
$block['content'] =$preg;
                
        return 
$block ;    
        

    }

    function 
_b_sidebar_edit($options)
    {
        
$mydirname = empty( $options[0] ) ? 'xpress' $options[0] ;
        
$page_disp = empty( $options[1] ) ? false true ;
        
$link_disp = empty( $options[2] ) ? false true ;    
        
$cats_disp = empty( $options[3] ) ? false true ;
        
$meta_disp = empty( $options[4] ) ? false true ;
        
$arch_disp = empty( $options[5] ) ? false true ;
        
$this_template = empty( $options[6] ) ? 'db:'.$mydirname.'_block_sidebar.html' trim$options[6] );
        
$mydirpath XOOPS_ROOT_PATH '/modules/' $mydirname;
        
        require_once(
XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');
                
        
$form  "MyDirectory $mydirname "' />";
        
$form .= "yes_no_radio_option('options[1]'_MB_XPRESS_EDIT_PAGES $page_disp);
        
$form .= "yes_no_radio_option('options[2]'_MB_XPRESS_EDIT_LINKS $link_disp);
         
$form .= "yes_no_radio_option('options[3]'_MB_XPRESS_EDIT_CATS $cats_disp);
        
$form .= "yes_no_radio_option('options[4]'_MB_XPRESS_EDIT_META $meta_disp);
       
        
        
$form .= ""._MB_XPRESS_EDIT_ARCHIVES " : radio" name="options[5]" value=""";
        if (empty(
$options[5])) $form .= " checked="checked"";
        
$form .= " />"._NO."; radio" name="options[5]" value="daily"";
        if (
$options[5] == "daily"$form .= " checked="checked"";
        
$form .= " />"._MB_XPRESS_ARCHIVES_DAILY ."; radio" name="options[5]" value="weekly"";
        if (
$options[5] == "weekly"$form .= " checked="checked"";
        
$form .= " />"._MB_XPRESS_ARCHIVES_WEEKLY ."; radio" name="options[5]" value="monthly"";
        if (
$options[5] == "monthly"$form .= " checked="checked"";
        
$form .= " />"._MB_XPRESS_ARCHIVES_MONTHLY ."; radio" name="options[5]" value="postbypost"";
        if (
$options[5] == "postbypost"$form .= " checked="checked"";
        
$form .= " />"._MB_XPRESS_ARCHIVES_POSTLY ;
        
//        $form .="";

        
return $form;

    }
}

?>


BTW > do you use this module?
The XOOPS search works for you?

Thank you

6
zyspec
Re: Xpressme 1.07 block and wide search issues
  • 2009/2/5 13:42

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


It may be because of the fact that it's being called from a block instead of in the module itself. You might try the 'brute force' method and use this instead:
function get_wpdb_version()  
{  
  
$mydirname basenamedirnamedirname__FILE__ ) ) ) ;
  
$ver_file XOOPS_ROOT_PATH ."/modules/$mydirname/wp-includes/dversion.php";  
          
  return 
$wp_db_version;


If this doesn't work there's got to be something else going on.

I do not use this module and don't have a copy of it.

7
Zanmir
Re: Xpressme 1.07 block and wide search issues
  • 2009/2/5 14:05

  • Zanmir

  • Just popping in

  • Posts: 7

  • Since: 2008/8/11


I would like to use this module, I have tried to get it working, some issues with displaying the blocks in xoops, and search doesnt work either. I can any of the xpressme blocks to show inside xoops.

Module needs work. It's the new wordpress for xoops, someone should work this out so we can get an english, working copy of this...

I dont code or I would do it asap.

Rob

any help with this module would be great.

8
wcrwcr
Re: Xpressme 1.07 block and wide search issues
  • 2009/2/6 14:05

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


@zyspec

Wierd....it doesn´t work either
The funny thing it is that the spoted error is exactly yhe same.
Wondering if it´s been called from elsewhere.

If you want a copy of the mod, please let me know or you can get it HERE and HERE you can see a working version of it full of blocks.

@Zanmir
Agree with you, the mod deserves a better integration

Thank you all

9
zyspec
Re: Xpressme 1.07 block and wide search issues
  • 2009/2/6 16:18

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


I think I understand at least part of the problem. I downloaded the module and quickly looked at the get_wpdb_version function and it doesn't do what it's intended to do - so the search and sidebar won't work as it's suppose to.

Edited:

just replace:
$ver_file XOOPS_ROOT_PATH ."/modules/$mydirname/wp-includes/dversion.php";

with:
include_once XOOPS_ROOT_PATH."/modules/$mydirname/wp-includes/version.php";

10
wcrwcr
Re: Xpressme 1.07 block and wide search issues
  • 2009/2/9 0:23

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hi

I guess i´ve found something relevant: the error only shows up when you activate the side bar navigation outside the module´s home.

At the home of the mod no errors are spotted.

I´ve applyed you last fix zyspec but it does not change the block outside the home (same error).

I guess you´ve found an interesting typo cauz the
"/wp-includes/dversion.php" file doesn´t exist

But now the XOOPS search is capable of find something inside xpress Great.

Tell me your feelings about the mod.
I ´ve loved the admin.....
Now i´m playing a bit with the wordpress themes

Thanks
Sorry for the delay but the notifications here on XOOPS aren´t working for me

Login

Who's Online

392 user(s) are online (273 user(s) are browsing Support Forums)


Members: 0


Guests: 392


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