2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
< ? php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
/**
* @ package Include
* @ subpackage Clippy
*/
2014-08-11 16:30:09 +02:00
function clippy_start_page_homepage () {
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
global $config ;
2014-08-12 11:36:05 +02:00
$clippy_is_annoying = ( int ) get_cookie ( 'clippy_is_annoying' , 0 );
2014-08-29 16:49:01 +02:00
$nagios = ( int ) get_cookie ( 'nagios' , - 1 );
$easter_egg_toy = $nagios % 6 ;
if (( $easter_egg_toy == 5 ) ||
( $easter_egg_toy == - 1 )) {
$image = 'images/clippy/clippy.png' ;
}
else {
$image = 'images/clippy/easter_egg_0' . $easter_egg_toy . '.png' ;
}
if ( $image != 'easter_egg_04.png' ) {
$style = 'display: block; position: absolute; left: -112px; top: -80px;' ;
}
else {
$style = 'display: block; position: absolute; left: -200px; top: -80px;' ;
}
2014-08-12 11:36:05 +02:00
2014-08-11 16:30:09 +02:00
clippy_clean_help ();
2014-08-14 11:26:04 +02:00
$return_tours = array ();
$return_tours [ 'first_step_by_default' ] = true ;
$return_tours [ 'tours' ] = array ();
2014-08-11 16:30:09 +02:00
//==================================================================
//Help tour with the some task for to help the user.
//------------------------------------------------------------------
2014-08-14 11:26:04 +02:00
$return_tours [ 'tours' ][ 'homepage' ] = array ();
$return_tours [ 'tours' ][ 'homepage' ][ 'steps' ] = array ();
$return_tours [ 'tours' ][ 'homepage' ][ 'steps' ][] = array (
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
'element' => '#clippy' ,
2014-08-29 16:49:01 +02:00
'intro' =>
2017-06-29 18:19:58 +02:00
'<div class="clippy_body" style="text-align: left; padding-left: 20px; padding-right: 20px;">' .
2014-08-29 16:49:01 +02:00
__ ( 'Hi, can I help you?' ) . '<br/><br/>' .
2018-05-10 18:19:47 +02:00
__ ( 'Let me introduce my self: I am Pandorin, the annoying assistant of %s. You can follow my steps to do basic tasks in %s or you can close me and never see me again.' , get_product_name (), get_product_name ()) .
2014-08-29 16:49:01 +02:00
'<br /> ' .
'<br /> ' .
2017-06-29 18:19:58 +02:00
'<div class="clippy_body" style="font-size: 7pt;">' .
2014-09-02 16:42:59 +02:00
html_print_checkbox_extended
( 'clippy_is_annoying' , 1 , $clippy_is_annoying , false ,
'set_clippy_annoying()' , '' , true ) .
__ ( 'Close this wizard and don\'t open it again.' ) .
'</div>' .
2014-08-14 11:26:04 +02:00
'</div>' .
2014-08-12 13:41:55 +02:00
' < div style = " position:relative; " >
2014-08-29 16:49:01 +02:00
< div id = " pandorin " style = " ' . $style . ' " > ' .
html_print_image (
$image ,
true ,
array ( 'id' => 'clippy_toy' , 'onclick' => 'easter_egg_clippy(1);' )) .
2014-08-12 13:41:55 +02:00
' </ div >
</ div > '
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
);
2014-08-14 11:26:04 +02:00
$return_tours [ 'tours' ][ 'homepage' ][ 'steps' ][] = array (
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
'element' => '#clippy' ,
2014-08-14 12:11:46 +02:00
'intro' => __ ( 'Which task would you like to do first?' ) . '<br/><br/>' .
2014-08-26 Miguel de Dios <miguel.dedios@artica.es>
* godmode/alerts/configure_alert_action.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/module_unknow.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/help/clippy/godmode_alerts_alert_actions.php,
include/help/clippy/operation_agentes_ver_agente.php,
include/help/clippy/godmode_alerts_configure_alert_action.php,
include/help/clippy/operation_agentes_status_monitor.php,
include/help/en/help_context_pandora_server_email.php,
include/functions_clippy.php, operation/menu.php,
operation/agentes/status_monitor.php: some changes suggested by
Carla.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10457 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-26 13:22:06 +02:00
'<ul style="text-align: left; margin-left: 10px; list-style-type: disc;">' .
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
'<li>' .
2014-08-11 16:30:09 +02:00
" <a href='javascript: clippy_go_link_show_help( \" index.php?sec=gagente&sec2=godmode/agentes/modificar_agente \" , \" monitoring_server_step_1 \" );'> " .
2018-05-10 18:19:47 +02:00
__ ( 'Ping a Linux or Windows server using a %s agent.' , get_product_name ()) .
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
'</a>' .
'</li>' .
2014-08-26 Miguel de Dios <miguel.dedios@artica.es>
* godmode/alerts/configure_alert_action.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/module_unknow.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/help/clippy/godmode_alerts_alert_actions.php,
include/help/clippy/operation_agentes_ver_agente.php,
include/help/clippy/godmode_alerts_configure_alert_action.php,
include/help/clippy/operation_agentes_status_monitor.php,
include/help/en/help_context_pandora_server_email.php,
include/functions_clippy.php, operation/menu.php,
operation/agentes/status_monitor.php: some changes suggested by
Carla.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10457 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-26 13:22:06 +02:00
'<li>' .
" <a href='javascript: clippy_go_link_show_help( \" index.php \" , \" email_alert_module_step_1 \" );'> " .
__ ( 'Create a alert by email in a critical module.' ) .
'</a>' .
'</li>' .
//'<li>' . __('Monitor a switch with remote SNMP') . '</li>' .
//'<li>' . __('Monitor a Windows server with remote WMI') . '</li>' .
2014-08-14 11:26:04 +02:00
'</ul>'
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
);
2014-08-14 11:26:04 +02:00
$return_tours [ 'tours' ][ 'homepage' ][ 'conf' ] = array ();
$return_tours [ 'tours' ][ 'homepage' ][ 'conf' ][ 'show_bullets' ] = 0 ;
$return_tours [ 'tours' ][ 'homepage' ][ 'conf' ][ 'show_step_numbers' ] = 0 ;
$return_tours [ 'tours' ][ 'homepage' ][ 'conf' ][ 'name_obj_js_tour' ] = 'intro_homepage' ;
$return_tours [ 'tours' ][ 'homepage' ][ 'conf' ][ 'other_js' ] = "
var started = 0 ;
2014-08-11 16:30:09 +02:00
function show_clippy () {
2014-08-14 11:26:04 +02:00
if ( intro_homepage . started ()) {
started = 1 ;
}
else {
started = 0 ;
}
if ( started == 0 )
intro_homepage . start ();
2014-08-11 16:30:09 +02:00
}
2014-08-12 11:36:05 +02:00
2014-08-29 16:49:01 +02:00
var nagios = - 1 ;
function easter_egg_clippy ( click ) {
if ( readCookie ( 'nagios' )) {
nagios = readCookie ( 'nagios' );
}
if ( click )
nagios ++ ;
if ( nagios > 5 ) {
easter_egg_toy = nagios % 6 ;
if (( easter_egg_toy == 5 ) ||
( easter_egg_toy == - 1 )) {
image = 'images/clippy/clippy.png' ;
}
else {
image = 'images/clippy/easter_egg_0' + easter_egg_toy + '.png' ;
}
$ ( '#clippy_toy' ) . attr ( 'src' , image );
if ( easter_egg_toy == 4 ) {
$ ( '#pandorin' ) . css ( 'left' , '-200px' );
}
else {
$ ( '#pandorin' ) . css ( 'left' , '-112px' );
}
document . cookie = 'nagios=' + nagios ;
}
}
2014-08-12 11:36:05 +02:00
function set_clippy_annoying () {
2014-10-02 13:24:16 +02:00
var now = new Date ();
var time = now . getTime ();
var expireTime = time + 3600000 * 24 * 360 * 20 ;
now . setTime ( expireTime );
checked = $ ( 'input[name=\'clippy_is_annoying\']' )
. is ( ':checked' );
2014-08-29 16:49:01 +02:00
//intro_homepage.exit();
2014-08-12 11:36:05 +02:00
if ( checked ) {
2014-10-02 13:24:16 +02:00
document . cookie = 'clippy_is_annoying=1;expires=' +
now . toGMTString () + ';' ;
2014-08-12 11:36:05 +02:00
}
else {
2014-10-02 13:24:16 +02:00
document . cookie = 'clippy_is_annoying=0;expires=' +
now . toGMTString () + ';' ;
2014-08-12 11:36:05 +02:00
}
}
2014-08-29 16:49:01 +02:00
function readCookie ( name ) {
var nameEQ = name + '=' ;
var ca = document . cookie . split ( ';' );
for ( var i = 0 ; i < ca . length ; i ++ ) {
var c = ca [ i ];
while ( c . charAt ( 0 ) == ' ' )
c = c . substring ( 1 , c . length );
if ( c . indexOf ( nameEQ ) == 0 )
return c . substring ( nameEQ . length , c . length );
}
return null ;
}
2014-08-11 16:30:09 +02:00
" ;
if ( $config [ 'logged' ]) {
2014-08-14 11:26:04 +02:00
$return_tours [ 'tours' ][ 'homepage' ][ 'conf' ][ 'autostart' ] = true ;
2014-08-11 16:30:09 +02:00
}
else {
2014-08-14 11:26:04 +02:00
$return_tours [ 'tours' ][ 'homepage' ][ 'conf' ][ 'autostart' ] = false ;
2014-08-11 16:30:09 +02:00
}
2014-08-12 11:36:05 +02:00
if ( $config [ " tutorial_mode " ] == 'on_demand' ) {
2014-08-14 11:26:04 +02:00
$return_tours [ 'tours' ][ 'homepage' ][ 'conf' ][ 'autostart' ] = false ;
2014-08-12 11:36:05 +02:00
}
if ( $clippy_is_annoying === 1 ) {
2014-08-14 11:26:04 +02:00
$return_tours [ 'tours' ][ 'homepage' ][ 'conf' ][ 'autostart' ] = false ;
2014-08-12 11:36:05 +02:00
}
2014-08-11 16:30:09 +02:00
//==================================================================
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
2014-08-26 Miguel de Dios <miguel.dedios@artica.es>
* godmode/alerts/configure_alert_action.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/module_unknow.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/help/clippy/godmode_alerts_alert_actions.php,
include/help/clippy/operation_agentes_ver_agente.php,
include/help/clippy/godmode_alerts_configure_alert_action.php,
include/help/clippy/operation_agentes_status_monitor.php,
include/help/en/help_context_pandora_server_email.php,
include/functions_clippy.php, operation/menu.php,
operation/agentes/status_monitor.php: some changes suggested by
Carla.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10457 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-26 13:22:06 +02:00
//==================================================================
//Help tour about the email alert module (step 1)
//------------------------------------------------------------------
$return_tours [ 'tours' ][ 'email_alert_module_step_1' ] = array ();
$return_tours [ 'tours' ][ 'email_alert_module_step_1' ][ 'steps' ] = array ();
$return_tours [ 'tours' ][ 'email_alert_module_step_1' ][ 'steps' ][] = array (
'element' => '#clippy' ,
2018-05-10 18:19:47 +02:00
'intro' => __ ( 'The first thing you have to do is to setup the e-mail config on the %s Server.' , get_product_name ()) .
2014-08-26 Miguel de Dios <miguel.dedios@artica.es>
* godmode/alerts/configure_alert_action.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/module_unknow.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/help/clippy/godmode_alerts_alert_actions.php,
include/help/clippy/operation_agentes_ver_agente.php,
include/help/clippy/godmode_alerts_configure_alert_action.php,
include/help/clippy/operation_agentes_status_monitor.php,
include/help/en/help_context_pandora_server_email.php,
include/functions_clippy.php, operation/menu.php,
operation/agentes/status_monitor.php: some changes suggested by
Carla.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10457 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-26 13:22:06 +02:00
'<br />' .
ui_print_help_icon ( 'context_pandora_server_email' , true , '' , 'images/help.png' ) .
'<br />' .
__ ( 'If you have it already configured you can go to the next step.' )
);
$return_tours [ 'tours' ][ 'email_alert_module_step_1' ][ 'steps' ][] = array (
'element' => '#icon_god-alerts' ,
'position' => 'top' ,
'intro' => __ ( 'Now, pull down the Manage alerts menu and click on Actions. ' )
);
$return_tours [ 'tours' ][ 'email_alert_module_step_1' ][ 'conf' ] = array ();
$return_tours [ 'tours' ][ 'email_alert_module_step_1' ][ 'conf' ][ 'show_bullets' ] = 0 ;
$return_tours [ 'tours' ][ 'email_alert_module_step_1' ][ 'conf' ][ 'show_step_numbers' ] = 0 ;
$return_tours [ 'tours' ][ 'email_alert_module_step_1' ][ 'conf' ][ 'complete_js' ] = "
;
" ;
$return_tours [ 'tours' ][ 'email_alert_module_step_1' ][ 'conf' ][ 'exit_js' ] = "
location . reload ();
" ;
$return_tours [ 'tours' ][ 'email_alert_module_step_1' ][ 'conf' ][ 'next_help' ] = 'email_alert_module_step_2' ;
//==================================================================
2014-08-14 11:26:04 +02:00
return $return_tours ;
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
}
?>