1
timgno
errorMsg Management
  • 2011/10/12 11:23

  • timgno

  • Module Developer

  • Posts: 1504

  • Since: 2007/6/21


Locally, it's always the double-warning red background xoops_data and xoops_lib folders. I would like to know, please, which files contain the code. I want to modify it to recognize whether I'm working locally or remotely.

2
Mamba
Re: errorMsg Management
  • 2011/10/12 12:22

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


if you go to:

/xoops_data/configs/xoopsconfig.php

you can set the warnings to 0:

"admin_warnings_enable" => 0,

and they will be gone.

The warnings themselves are in /admin.php
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

3
timgno
Re: errorMsg Management
  • 2011/10/12 15:23

  • timgno

  • Module Developer

  • Posts: 1504

  • Since: 2007/6/21


Thanks! I wanted to create a code like this:
before
if (!isset($xoopsConfig['admin_warnings_enable']) || $xoopsConfig['admin_warnings_enable']) {

to create this code:
if ( ! XOOPS_ROOT_PATH == "localhost" ||  ! XOOPS_ROOT_PATH == "127.0.0.1"  ) {


....

can be good?

4
trabis
Re: errorMsg Management
  • 2011/10/12 18:33

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


@timgno

You can find the code in root/admin.php line 38

if (!isset($xoopsConfig['admin_warnings_enable']) || $xoopsConfig['admin_warnings_enable']) {

5
timgno
Re: errorMsg Management
  • 2011/10/12 19:35

  • timgno

  • Module Developer

  • Posts: 1504

  • Since: 2007/6/21


This:
$localhost preg_match("/localhost/i"XOOPS_ROOT_PATH);
$_127_0_0_1 preg_match("/127.0.0.1/i"XOOPS_ROOT_PATH);
if (
$localhost || $_127_0_0_1) {
 if (!isset(
$xoopsConfig['admin_warnings_enable']) || $xoopsConfig['admin_warnings_enable']) {
    if (
is_dir(XOOPS_ROOT_PATH '/install/')) {
        
xoops_error(sprintf(_AD_WARNINGINSTALLXOOPS_ROOT_PATH '/install/'));
        echo 
'<br />';
    }

    if (
is_writable(XOOPS_ROOT_PATH '/mainfile.php')) {
        
xoops_error(sprintf(_AD_WARNINGWRITEABLEXOOPS_ROOT_PATH '/mainfile.php'));
        echo 
'<br />';
    }
    
// ###### Output warn messages for correct functionality  ######
    
if (! is_writable(XOOPS_CACHE_PATH)) {
        
xoops_error(sprintf(_AD_WARNINGNOTWRITEABLEXOOPS_CACHE_PATH));
        echo 
'<br />';
    }
    if (! 
is_writable(XOOPS_UPLOAD_PATH)) {
        
xoops_error(sprintf(_AD_WARNINGNOTWRITEABLEXOOPS_UPLOAD_PATH));
        echo 
'<br />';
    }
    if (! 
is_writable(XOOPS_COMPILE_PATH)) {
        
xoops_error(sprintf(_AD_WARNINGNOTWRITEABLEXOOPS_COMPILE_PATH));
        echo 
'<br />';
    }

    
//www fits inside www_private, lets add a trailing slash to make sure it doesn't
    
if (strpos(XOOPS_PATH '/'XOOPS_ROOT_PATH '/') !== false || strpos(XOOPS_PATH '/'$_SERVER['DOCUMENT_ROOT'] . '/') !== false) {
        
xoops_error(sprintf(_AD_WARNINGXOOPSLIBINSIDEXOOPS_PATH));
        echo 
'<br />';
    }

    if (
strpos(XOOPS_VAR_PATH '/'XOOPS_ROOT_PATH '/') !== false || strpos(XOOPS_VAR_PATH '/'$_SERVER['DOCUMENT_ROOT'] . '/') !== false) {
        
xoops_error(sprintf(_AD_WARNINGXOOPSLIBINSIDEXOOPS_VAR_PATH));
        echo 
'<br />';
    }
  }
}

works locally, I have't tried remote

6
timgno
Re: errorMsg Management
  • 2011/10/12 20:33

  • timgno

  • Module Developer

  • Posts: 1504

  • Since: 2007/6/21


Why there is a gap when remove the warnings?
Resized Image

I can't find the html code that does this

this is a problem that exists in different versions of xoops

7
trabis
Re: errorMsg Management
  • 2011/10/12 21:24

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Edit system/themes/default/css/dashboard.css line 65
change
#xo-content {
    
min-height100px;
    
clearboth;
}

into
#xo-content {
    
clearboth;
}

Clean browser cache and test it please. Test both with and without warnings.

8
timgno
Re: errorMsg Management
  • 2011/10/12 22:39

  • timgno

  • Module Developer

  • Posts: 1504

  • Since: 2007/6/21


wasn't
#xo-content

but
#xo-body

9
trabis
Re: errorMsg Management
  • 2011/10/12 22:55

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

timgno wrote:
wasn't
#xo-content

but
#xo-body



Are you sure? You did not remove the line in xo-content?

Removing the one in xo-body has no effect on google chrome, Also, the extra height is not 330px; looks like 100px; to me.

10
timgno
Re: errorMsg Management
  • 2011/10/13 10:56

  • timgno

  • Module Developer

  • Posts: 1504

  • Since: 2007/6/21


I removed both and it works

Resized Image
Resized Image
Resized Image

Login

Who's Online

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


Members: 0


Guests: 155


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