Changeset 3809 for extensions
- Timestamp:
- Sep 1, 2009, 3:31:24 PM (15 years ago)
- Location:
- extensions
- Files:
-
- 4 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions
-
Property
svn:ignore
set to
.buildpath
.project
-
Property
svn:ignore
set to
-
extensions/ContactForm/CHANGELOG
r3771 r3809 1 2009-08-21 1.0.6 2 Replace redirect page by a message on the index one 3 1 4 2009-08-21 1.0.5 2 5 Add history tab -
extensions/ContactForm/classes/cf_plugin.class.php
r3749 r3809 40 40 } 41 41 42 function loc_begin_index() { 43 $this->display_message(); 44 } 42 45 function loc_begin_page_header() { 43 46 if (!$this->config->get_value(CF_CFG_DEFINE_LINK)) { … … 224 227 'cf_messages' => realpath(cf_get_template('cf_messages.tpl')), 225 228 )); 229 226 230 $template->block_html_head( '', 227 231 '<link rel="stylesheet" type="text/css" '. … … 242 246 $redirect_msg = $template->parse('cf_redirect', true); 243 247 $redirect_delay = $this->config->get_value(CF_CFG_REDIRECT_DELAY); 244 redirect_html($redirect_url, $redirect_msg, $redirect_delay); 248 // redirect($redirect_url, $redirect_msg, $redirect_delay); 249 redirect($redirect_url); 250 } 251 252 protected function display_message() { 253 $infos = pwg_get_session_var('cf_infos'); 254 pwg_unset_session_var('cf_infos'); 255 if ( null == $infos or 256 (empty($infos['infos']) and 257 empty($infos['errors'])) 258 ) { 259 return; 260 } 261 global $template; 262 $template->set_filenames(array( 263 'cf_index' => realpath(cf_get_template('cf_messages_index.tpl')), 264 'cf_title' => realpath(cf_get_template('cf_title.tpl')), 265 'cf_button' => realpath(cf_get_template('cf_button.tpl')), 266 'cf_messages' => realpath(cf_get_template('cf_messages.tpl')), 267 )); 268 269 $template->block_html_head( '', 270 '<link rel="stylesheet" type="text/css" '. 271 'href="' . CF_INCLUDE . 'contactform.css' . '">', 272 $smarty, $repeat); 273 $cf = array( 274 'TITLE' => 'contact_form_title', 275 ); 276 if (!empty($infos['errors'])) { 277 $template->assign('errors', $infos['errors']); 278 } 279 if (!empty($infos['infos'])) { 280 $template->assign('infos', $infos['infos']); 281 } 282 $template->assign('CF', $cf); 283 $template->assign_var_from_handle('CF_TITLE', 'cf_title'); 284 $template->assign_var_from_handle('CF_MESSAGES', 'cf_messages'); 285 $template->assign_var_from_handle('CF_BUTTON', 'cf_button'); 286 287 $begin = 'PLUGIN_INDEX_CONTENT_BEFORE'; 288 $old_begin = $template->get_template_vars($begin); 289 $template->assign_var_from_handle($begin, 'cf_index'); 290 $template->concat($begin, $old_begin); 245 291 } 246 292 … … 253 299 $this->display_form($infos); 254 300 } else { 255 $this->redirect(make_index_url(),$infos); 301 pwg_set_session_var('cf_infos', array( 302 'infos' => $infos['infos'], 303 'errors' => $infos['errors'], 304 )); 305 redirect(make_index_url()); 306 //$this->redirect(make_index_url(),$infos); 256 307 } 257 308 } else { … … 294 345 add_event_handler('send_mail_content', 295 346 array(&$this, 'send_mail_content')); 296 $return = @pwg_mail( 297 $webmaster_mail, 298 $mail_args 299 ); 347 348 $return = true; 349 // $return = @pwg_mail( 350 // $webmaster_mail, 351 // $mail_args 352 // ); 353 300 354 cf_switch_back_to_user_lang(); 301 355 if (!$return) { -
extensions/ContactForm/include/cf_common.inc.php
r3771 r3809 7 7 8 8 // Version 9 define('CF_VERSION', '1.0. 5');9 define('CF_VERSION', '1.0.6'); 10 10 define('CF_TITLE', 'cf_plugin_name'); 11 11 -
extensions/ContactForm/include/cf_functions.inc.php
r3772 r3809 159 159 case 0: 160 160 // History item 161 $change = trim($new_line); 162 if (!empty($change) and 163 isset($history[$index]) and is_array($history[$index])) { 164 array_push($history[$index]['CHANGES'], $change); 161 if (isset($history[$index]) and is_array($history[$index])) { 162 array_push($history[$index]['CHANGES'], trim($new_line)); 165 163 } 166 164 break; -
extensions/ContactForm/include/contactform.css
r3771 r3809 39 39 font-weight: bold; 40 40 } 41 div.cf-button { 42 margin-left: 5px; 43 } -
extensions/ContactForm/language/en_UK/plugin.lang.php
r3771 r3809 1 1 <?php 2 /* $Id: plugin.lang.php,v 1. 9 2009/08/21 09:24:18Criss Exp $ */2 /* $Id: plugin.lang.php,v 1.10 2009/09/01 13:25:03 Criss Exp $ */ 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 4 global $lang; … … 42 42 $lang['cf_delay_not_integer'] = 'Delay must be an integer'; 43 43 $lang['cf_link_error'] = 'Variable can\'t contain spaces'; 44 $lang['cf_hide'] = 'Hide'; 44 45 45 46 // ================================================================== -
extensions/ContactForm/language/fr_FR/plugin.lang.php
r3771 r3809 1 1 <?php 2 /* $Id: plugin.lang.php,v 1. 9 2009/08/21 09:24:18Criss Exp $ */2 /* $Id: plugin.lang.php,v 1.10 2009/09/01 13:25:03 Criss Exp $ */ 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 4 global $lang; … … 42 42 $lang['cf_delay_not_integer'] = 'Le délai doit être un entier'; 43 43 $lang['cf_link_error'] = 'La variable ne peut pas contenir d\'espaces'; 44 $lang['cf_hide'] = 'Masquer'; 44 45 45 46 // ================================================================== -
extensions/ContactForm/language/it_IT/plugin.lang.php
r3789 r3809 1 1 <?php 2 /* $Id: plugin.lang.php,v 1. 9 2009/08/21 09:24:18Criss Exp $ */2 /* $Id: plugin.lang.php,v 1.10 2009/09/01 13:25:03 Criss Exp $ */ 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 4 global $lang; … … 33 33 $lang['cf_error_sending_mail'] = 'Errore durante l\'invio dell\'E-mail'; 34 34 $lang['cf_sending_mail_successful'] = 'Invio dell\'E-mail riuscito'; 35 TODO$lang['cf_form_error'] = 'Dati errati';35 $lang['cf_form_error'] = 'Dati errati'; 36 36 $lang['cf_inconsistent_version'] = '%s : versioni incoerenti'; 37 37 $lang['cf_no_unlink'] = 'La funzione \'unlink\' non è disponibile'; … … 42 42 $lang['cf_delay_not_integer'] = 'Il limite deve essere un numero intero'; 43 43 $lang['cf_link_error'] = 'La variabile non può contenere degli spazi'; 44 // TODO $lang['cf_hide'] = ''; 44 45 45 46 // ================================================================== … … 51 52 $lang['cf_config_desc'] = 'Configurazione principale del plugin'; 52 53 $lang['cf_label_config'] = 'Configurazione generale'; 53 TODO$lang['cf_label_mail'] = 'Configurazione dell\'E-mail';54 $lang['cf_label_mail'] = 'Configurazione dell\'E-mail'; 54 55 $lang['cf_menu_link'] = 'Aggiungere un link nel menu'; 55 56 $lang['cf_guest_allowed'] = 'Autorizzare gli ospiti ad accedere al formulario'; -
extensions/ContactForm/main.inc.php
r3771 r3809 2 2 /* 3 3 Plugin Name: Contact Form 4 Version: 1.0. 54 Version: 1.0.6 5 5 Description: Add a "Contact" item in the Menu block to offer a contact form to users 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=304 … … 16 16 17 17 $cf_plugin = new CF_Plugin($plugin['id']); 18 add_event_handler('loc_begin_index', 19 array(&$cf_plugin, 'loc_begin_index')); 18 20 add_event_handler('loc_begin_page_tail', 19 21 array(&$cf_plugin, 'loc_begin_page_header'));
Note: See TracChangeset
for help on using the changeset viewer.