View Issue Details

IDProjectCategoryView StatusLast Update
0000174WackoWikiappearancepublic2017-08-31 09:36
Reporterebal Assigned Toadministrator  
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version4.2 
Target Version5.5.0Fixed in Version5.5.0 
Summary0000174: System message
DescriptionI am doing some maintenance work on my wacko wiki,
so in the first page i re-edit it to add a quote like :
"The site is under maintenance"

but if some visitor come directly to a wiki page and NOT
from the first one, he or she cant know about my maintenance work.

So it would be useful if everybody could see a simple quote on every page,
something that we could add on administrator settings or somewhere else.
Additional InformationIf everybody agree with this feature i could try to design and create it.
TagsNo tags attached.

Relationships

related to 0000440 resolvedadministrator wrap status messages with div class="hint|success|warning" 
child of 0000230 resolvedadministrator Administrative Interface 

Activities

Tann San

2008-09-21 15:51

manager   ~0000513

I like this idea although it could already be implemented by simply editing the theme files by the admin. Can be implemented once we implement the admin interface.

administrator

2011-05-21 08:17

administrator   ~0000790

Last edited: 2011-05-21 08:24

there are a couple of things we should take care:
set_message / get_message plus style

$type = [info | warning | ...]
$this->set_message($message, $type) so we store it as an array

then
// here we show messages
if ($message = $this->get_message())
{
    echo '<div class="'.$typ.'">'.$message.'</div>';
}
?>

now to the global system message which can later be conditioned like only for registered user, show only in a given period of time etc.

we could store the system message in the config table e.g. 'system_message'
in the get_message function we check for !empty($this->config['system_message'])
and echo it with the other message, I'm not sure if it should also be stored in the session

function get_message()
{
    // get system message
    if(!empty($this->config['system_message']))
    {
        $typ = 'info'; // TODO: set type also via backend and store it [where?]
        $message = '<div class="'.$typ.'">'.$this->config['system_message'].'</div>';
    }

    // get event message
    if (isset($_SESSION[$this->config['session_prefix'].'_'.'message']))
    {
        $message .= '<div class="'.$typ.'">'.$this->config['system_message']$_SESSION[$this->config['session_prefix'].'_'.'message']].'</div>';
        $_SESSION[$this->config['session_prefix'].'_'.'message'] = ''; // reset event message

        
    }

    if !empty($message)
    {
        return $message;
    }
    else
    {
        return null;
    }
}

in the themes header we just call

// here we show messages
$this->get_message();

add the CSS classes in default.css for each case e.g. .info, .warning, .etc.
add a section in ther back end to set or change the values

What you think about it?

administrator

2015-06-07 19:26

administrator   ~0000948

http://wackowiki.hg.sourceforge.net/hgweb/wackowiki/dev/rev/1b75e21aa2ae

Issue History

Date Modified Username Field Change
2008-05-19 17:29 ebal New Issue
2008-05-19 17:29 ebal Legacy => NEW
2008-05-20 14:04 administrator Summary Quote => System message
2008-09-21 15:49 Tann San Target Version => 5.4.0
2008-09-21 15:51 Tann San Note Added: 0000513
2008-09-21 15:57 Tann San Relationship added child of 0000230
2009-07-02 10:23 administrator Status new => acknowledged
2010-03-08 10:10 administrator Category Appearance => appearance
2011-05-21 08:17 administrator Note Added: 0000790
2011-05-21 08:18 administrator Note Edited: 0000790
2011-05-21 08:19 administrator Assigned To => administrator
2011-05-21 08:20 administrator Note Edited: 0000790
2011-05-21 08:20 administrator Note Edited: 0000790
2011-05-21 08:21 administrator Status acknowledged => assigned
2011-05-21 08:24 administrator Note Edited: 0000790
2014-03-24 08:33 administrator Relationship added related to 0000440
2014-04-18 07:56 administrator Target Version 5.4.0 => 6.1.x
2015-02-19 19:19 administrator Target Version 6.1.x => 5.5.0
2015-05-29 22:49 administrator Status assigned => resolved
2015-05-29 22:49 administrator Resolution open => fixed
2015-05-29 22:49 administrator Fixed in Version => 5.5.0
2015-06-07 19:26 administrator Note Added: 0000948
2016-09-21 09:18 administrator Fixed in Version 5.5.0 => 5.5.rc2
2017-08-31 09:36 administrator Fixed in Version 5.5.rc2 => 5.5.0