1
sova
problem in xNews 1.71
  • 2012/6/30 4:54

  • sova

  • Not too shy to talk

  • Posts: 149

  • Since: 2010/4/13


Hello
The problem across my site
Site as normal (for guests) is displayed without problem. But when users are logged (only Home page) will show white **(Pages that are xnews module blocks)** . I (webmaster) do not have this problem.

Error:
Fatal errorCall to a member function mid() on a non-object in /home/sova/domains/sova.ir/public_html/modules/xnews/include/functions.php on line 501

Error
Undefined variableheight in file /modules/xnews/blocks/news_latestnews.php in line 124



Module version: 1.71

The new version has been released?

2
sova
Re: problem in xNews 1.71
  • 2012/7/1 12:34

  • sova

  • Not too shy to talk

  • Posts: 149

  • Since: 2010/4/13


Thank you for your helping
Excuse me.
I can not speak English well.
I get help from Google Translate.

3
iHackCode
Re: problem in xNews 1.71

Quote:

sova wrote:
Thank you for your helping


Sad Face.

Try this..
in xnews/include/functions.php replace the function

/**
 * Verify that the current user is a member of the Admin group
 */
function nw_is_admin_group()
{
    global 
$xoopsUser$xoopsModule;
    if(
is_object($xoopsUser)) {
        if(
in_array('1',$xoopsUser->getGroups())) {
            return 
true;
        } else {
         
$mod_handler =& xoops_gethandler('module');
         
$xnewsModule $mod_handler->getByDirname(NW_MODULE_DIR_NAME);
            if(
$xoopsUser->isAdmin($xnewsModule->mid())) {
                return 
true;
            } else {
                return 
false;
            }
        }
    } else {
        return 
false;
    }
}

and in xnews/blocks/news_latestnews.php

change line 124
$enddiv 'alt="'.$thisstory->title.'" width="'.$imgwidth.'" '.$height.' /></a></div>';

so it looks like

$enddiv 'alt="'.$thisstory->title.'" width="'.$imgwidth.'" '.$imgheight.' /></a></div>';

i haven't tested this out..
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

4
iHackCode
Re: problem in xNews 1.71

in that blocks file i think line 120 needs to be changed too

from:
if($options[4] != 0) { $height 'height="'.$imgheight.'"'; } // set height = 0 in block option for auto height

to:

if($options[4] != 0) { $imgheight 'height="'.$options[4].'"'; } // set height = 0 in block option for auto height
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

5
sova
Re: problem in xNews 1.71
  • 2012/7/2 9:15

  • sova

  • Not too shy to talk

  • Posts: 149

  • Since: 2010/4/13


iHackCode dear:
Thank you very very very much.
The problem was completely solved.

-------------
Gift for you iHackCode dear :
-------------

One Error in protector:
noticefopen(/home/sova/domains/sova.ir/xoops_lib/modules/protector/configs/configcache8241fc) [function.fopen]: failed to open streamPermission denied in file  /home/sova/domains/sova.ir/xoops_lib/modules/protector/class/protector.php in line 144
notice
fwrite(): supplied argument is not a valid stream resource in file /home/sova/domains/sova.ir/xoops_lib/modules/protector/class/protector.php in line 145
notice
fclose(): supplied argument is not a valid stream resource in file /home/sova/domains/sova.ir/xoops_lib/modules/protector/class/protector.php in line 146

These errors do not cause problems for site security?
Excuse me.
I can not speak English well.
I get help from Google Translate.

6
iHackCode
Re: problem in xNews 1.71

it looks like file/folder permissions

https://xoops.org/modules/newbb/viewtopic.php?post_id=344766#forumpost344766

let me know if that helps.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

7
sova
Re: problem in xNews 1.71
  • 2012/7/3 4:53

  • sova

  • Not too shy to talk

  • Posts: 149

  • Since: 2010/4/13



Thank you very very very you very very very much.

Login

Who's Online

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


Members: 0


Guests: 246


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