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: 11535

  • Since: 2004/4/23


if you go to:

/xoops_data/configs/xoopsconfig.php

you can set the warnings to 0:

le="color: #000000"><?php "admin_warnings_enable" => 0,

and they will be gone.

The warnings themselves are in /admin.php
Support XOOPS => DONATE
Use 2.5.11 | 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
le="color: #000000"><?php if (!isset($xoopsConfig['admin_warnings_enable']) || $xoopsConfig['admin_warnings_enable']) {

to create this code:
le="color: #000000"><?php 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

le="color: #000000"><?php 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:
le="color: #000000"><?php $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_WARNINGINSTALL, XOOPS_ROOT_PATH . '/install/')); echo '<br />'; } if (is_writable(XOOPS_ROOT_PATH . '/mainfile.php')) { xoops_error(sprintf(_AD_WARNINGWRITEABLE, XOOPS_ROOT_PATH . '/mainfile.php')); echo '<br />'; } // ###### Output warn messages for correct functionality ###### if (! is_writable(XOOPS_CACHE_PATH)) { xoops_error(sprintf(_AD_WARNINGNOTWRITEABLE, XOOPS_CACHE_PATH)); echo '<br />'; } if (! is_writable(XOOPS_UPLOAD_PATH)) { xoops_error(sprintf(_AD_WARNINGNOTWRITEABLE, XOOPS_UPLOAD_PATH)); echo '<br />'; } if (! is_writable(XOOPS_COMPILE_PATH)) { xoops_error(sprintf(_AD_WARNINGNOTWRITEABLE, XOOPS_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_WARNINGXOOPSLIBINSIDE, XOOPS_PATH)); echo '<br />'; } if (strpos(XOOPS_VAR_PATH . '/', XOOPS_ROOT_PATH . '/') !== false || strpos(XOOPS_VAR_PATH . '/', $_SERVER['DOCUMENT_ROOT'] . '/') !== false) { xoops_error(sprintf(_AD_WARNINGXOOPSLIBINSIDE, XOOPS_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
le="color: #000000"><?php #xo-content { min-height: 100px; clear: both; }

into
le="color: #000000"><?php #xo-content { clear: both; }

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
le="color: #000000"><?php #xo-content

but
le="color: #000000"><?php #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
le="color: #000000"><?php #xo-content

but
le="color: #000000"><?php #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