Changeset 17945
- Timestamp:
- Sep 16, 2012, 5:20:39 PM (12 years ago)
- Location:
- extensions/ContactForm
- Files:
-
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ContactForm/admin/config.php
r17483 r17945 14 14 'cf_mandatory_name' => isset($_POST['cf_mandatory_name']), 15 15 'cf_mail_type' => $_POST['cf_mail_type'], 16 'cf_admin_mails' => $conf['ContactForm']['cf_admin_mails'],17 16 ); 18 17 $conf['ContactForm_before'] = $_POST['cf_before']; … … 34 33 )); 35 34 36 $template->set_filename('contact_form', dirname(__FILE__).'/template/config.tpl');35 $template->set_filename('contact_form', realpath(CONTACT_FORM_PATH . 'admin/template/config.tpl')); 37 36 38 37 ?> -
extensions/ContactForm/admin/emails.php
r17483 r17945 5 5 if (isset($_POST['save_emails'])) 6 6 { 7 var_dump($_POST); 7 8 $emails = array(); 8 9 foreach ($_POST['emails'] as $entry) … … 16 17 else 17 18 { 19 if ($entry['group_name'] == -1) $entry['group_name'] = null; 20 18 21 array_push($emails, array( 19 22 'name' => $entry['name'], 20 23 'email' => $entry['email'], 21 'active' => isset($entry['active']), 24 'group_name' => $entry['group_name'], 25 'active' => boolean_to_string(isset($entry['active'])), 22 26 )); 23 27 } 24 28 } 25 29 26 $conf['ContactForm']['cf_admin_mails'] = $emails; 27 conf_update_param('ContactForm', serialize($conf['ContactForm'])); 30 pwg_query('TRUNCATE TABLE `'. CONTACT_FORM_TABLE. '`'); 31 32 mass_inserts( 33 CONTACT_FORM_TABLE, 34 array('name','email','group_name','active'), 35 $emails 36 ); 37 28 38 array_push($page['infos'], l10n('Information data registered in database')); 29 39 } … … 31 41 32 42 // display emails 33 $template->assign('EMAILS', $conf['ContactForm']['cf_admin_mails']); 43 $query = ' 44 SELECT * 45 FROM '. CONTACT_FORM_TABLE .' 46 ORDER BY 47 group_name ASC, 48 name ASC 49 '; 50 $result = pwg_query($query); 34 51 35 $template->set_filename('contact_form', dirname(__FILE__).'/template/emails.tpl'); 52 $emails = $groups = array(); 53 while ($data = pwg_db_fetch_assoc($result)) 54 { 55 $data['active'] = get_boolean($data['active']); 56 array_push($emails, $data); 57 if (!empty($data['group_name'])) 58 { 59 array_push($groups, $data['group_name']); 60 } 61 } 62 63 $template->assign(array( 64 'EMAILS' => $emails, 65 'GROUPS' => array_unique($groups), 66 )); 67 68 $template->set_filename('contact_form', realpath(CONTACT_FORM_PATH . 'admin/template/emails.tpl')); 36 69 37 70 ?> -
extensions/ContactForm/admin/template/config.tpl
r17483 r17945 53 53 <label> 54 54 <input type="text" name="cf_default_subject" value="{$cf_default_subject}" size="50"> 55 {'Default e-mail subject'|@translate} 55 {'Default e-mail subject'|@translate} ({'can be translated with LocalFiles Editor plugin'|@translate}) 56 56 </label> 57 57 </li> … … 59 59 <label> 60 60 <input type="text" name="cf_subject_prefix" value="{$cf_subject_prefix}" size="50"> 61 {'Prefix of the sent e-mail subject (you can use "%gallery_title%")'|@translate}61 {'Prefix of the sent e-mail subject'|@translate} ({'you can use "%gallery_title%"'|@translate}) 62 62 </label> 63 63 </li> -
extensions/ContactForm/admin/template/emails.tpl
r17483 r17945 1 1 {combine_css path=$CONTACT_FORM_PATH|@cat:"admin/template/style.css"} 2 2 3 {footer_script}{literal}4 jQuery(document).on('change', '.delete', function() {5 if ($(this).is(':checked')) {6 $(this).parents('tr').addClass('delete');7 } else {8 $(this).parents('tr').removeClass('delete');9 }10 });11 {/literal}{/footer_script}12 3 13 4 <div class="titrePage"> 14 5 <h2>Contact Form</h2> 15 6 </div> 7 16 8 17 9 <form method="post" action="{$CONTACT_FORM_ADMIN}-emails" class="properties"> … … 20 12 <th>{'Name'|@translate}</th> 21 13 <th>{'Email address'|@translate}</th> 14 <th>{'Category'|@translate}</th> 22 15 <th>{'Active'|@translate}</th> 23 16 <th>{'Delete'|@translate}</th> … … 27 20 <tr class="{if $i is odd}row1{else}row2{/if}"> 28 21 <td> 29 <input type="text" name="emails[{$i}][name]" value="{$entry.name }" size="20">22 <input type="text" name="emails[{$i}][name]" value="{$entry.name|escape:html}" size="20"> 30 23 </td> 31 24 <td> 32 25 <input type="text" name="emails[{$i}][email]" value="{$entry.email}" size="30"> 26 </td> 27 <td> 28 <select name="emails[{$i}][group_name]" class="groups"> 29 <option value="-1">------------</option> 30 {html_options values=$GROUPS output=$GROUPS selected=$entry.group_name} 31 </select> 33 32 </td> 34 33 <td style="text-align:center;"> … … 42 41 {/foreach} 43 42 <tr class="{if $i is odd}row1{else}row2{/if}" id="addEntryContainer"> 44 <td colspan=" 4">43 <td colspan="2" style="text-align:center;"> 45 44 <a id="addEntry">{'+ Add an email'|@translate}</a> 45 </td> 46 <td> 47 <a id="addGroup">{'+ Add a category'|@translate}</a> 48 </td> 49 <td colspan="2" style="text-align:center;"> 50 <input type="submit" name="save_emails" value="{'Submit'|@translate}" class="submit"> 46 51 </td> 47 52 </tr> 48 53 </table> 49 54 {footer_script}var entry = {$i};{/footer_script} 50 51 <p><input type="submit" name="save_emails" value="{'Submit'|@translate}" class="submit"></p>52 55 </form> 53 56 54 {footer_script}{literal} 57 58 59 {footer_script} 60 var group_options = new Array; 61 {foreach from=$GROUPS item=entry} 62 group_options[group_options.length] = '<option value="{$entry|escape:javascript}">{$entry|escape:javascript}</option>'; 63 {/foreach} 64 65 {literal} 66 var doBlink = function(obj,start,finish) { jQuery(obj).fadeOut(300).fadeIn(300); if(start!=finish) { start=start+1; doBlink(obj,start,finish); } }; 67 jQuery.fn.blink = function(start,finish) { return this.each(function() { doBlink(this,start,finish) }); }; 68 69 jQuery(document).on('change', '.delete', function() { 70 if ($(this).is(':checked')) { 71 $(this).parents('tr').addClass('delete'); 72 } else { 73 $(this).parents('tr').removeClass('delete'); 74 } 75 }); 76 55 77 jQuery('#addEntry').click(function() { 56 78 entry++; 57 79 i = entry; 58 80 59 $('#emails').append(81 content = 60 82 '<tr class="row'+ (i%2+1) +'">'+ 61 83 '<td>'+ … … 64 86 '<td>'+ 65 87 '<input type="text" name="emails['+ i +'][email]" size="30">'+ 88 '</td>'+ 89 '<td>'+ 90 '<select name="emails['+ i +'][group_name]" class="groups">'+ 91 '<option value="-1">------------</option>'; 92 for (var j in group_options) { 93 content+= group_options[j]; 94 } 95 content+= '</select>'+ 66 96 '</td>'+ 67 97 '<td style="text-align:center;">'+ … … 72 102 '</td>'+ 73 103 '</tr>' 74 104 $('#emails').append(content); 75 105 76 106 $('#addEntryContainer') … … 79 109 .appendTo($('#emails')); 80 110 }); 111 112 jQuery('#addGroup').click(function() { 113 name = prompt("{/literal}{'Name'|@translate}{literal}:"); 114 if (name != null && name != "") { 115 name = name.replace(new RegExp('"','g'),"'"); 116 content = '<option value="'+ name +'">'+ name +'</option>'; 117 group_options[group_options.length] = content; 118 $("select.groups").append(content).blink(1,2); 119 } 120 }); 81 121 {/literal}{/footer_script} -
extensions/ContactForm/admin/template/style.css
r17483 r17945 1 #emails input[type="text"] {1 #emails input[type="text"], select { 2 2 margin:2px 10px !important; 3 3 } 4 4 5 tr.delete input {5 tr.delete input, tr.delete select { 6 6 opacity:0.5; 7 7 } 8 9 #addEntry { 10 display:inline-block; 11 padding:2px 5px; 12 margin:4px; 13 border-width:1px; 14 border-style:solid; 15 border-radius:10px; 16 font-weight:bold; 17 } -
extensions/ContactForm/include/contact_form.inc.php
r17483 r17945 15 15 { 16 16 $contact = array( 17 'author' => trim($_POST['author']), 18 'email' => trim($_POST['email']), 19 'subject' => trim($_POST['subject']), 20 'content' => $_POST['content'], 17 'author' => trim($_POST['author']), 18 'email' => trim($_POST['email']), 19 'group' => @$_POST['group'], 20 'subject' => trim($_POST['subject']), 21 'content' => $_POST['content'], 21 22 ); 22 23 … … 47 48 'author' => $user['username'], 48 49 'email' => $user['email'], 50 'group' => null, 49 51 'subject' => l10n($conf['ContactForm']['cf_default_subject']), 50 52 'content' => null, … … 67 69 } 68 70 71 $query = ' 72 SELECT DISTINCT group_name 73 FROM '. CONTACT_FORM_TABLE .' 74 ORDER BY group_name 75 ;'; 76 $result = pwg_query($query); 77 78 $groups = array(); 79 while ($data = pwg_db_fetch_assoc($result)) 80 { 81 $groups[ $data['group_name'] ] = !empty($data['group_name']) ? l10n($data['group_name']) : l10n('Default'); 82 } 83 84 if (count($groups) > 1) 85 { 86 $template->assign('GROUPS', $groups); 87 } 88 69 89 $template->assign(array( 70 90 'contact' => $contact, … … 77 97 )); 78 98 79 $template->set_filename('index', dirname(__FILE__).'/../template/contact_form.tpl');99 $template->set_filename('index', realpath(CONTACT_FORM_PATH . 'template/contact_form.tpl')); 80 100 81 101 ?> -
extensions/ContactForm/include/functions.inc.php
r17662 r17945 86 86 'name' => $row['username'], 87 87 'email' => $row['email'], 88 'active' => true,88 'active' => 'true', 89 89 )); 90 90 } 91 91 92 $conf['ContactForm']['cf_admin_mails'] = $emails; 92 mass_inserts( 93 CONTACT_FORM_TABLE, 94 array('name','email','active'), 95 $email 96 ); 97 93 98 $conf['ContactForm']['cf_must_initialize'] = false; 94 99 conf_update_param('ContactForm', serialize($conf['ContactForm'])); … … 107 112 $conf_mail = get_mail_configuration(); 108 113 } 114 115 $query = ' 116 SELECT DISTINCT group_name 117 FROM '. CONTACT_FORM_TABLE .' 118 ORDER BY group_name 119 ;'; 120 $groups = array_from_query($query, 'group_name'); 109 121 110 122 $comm = array_merge($comm, … … 159 171 } 160 172 173 // check group 174 if ( count($groups) > 1 and $comm['group'] == -1 ) 175 { 176 $comm['group'] = true; 177 array_push($page['errors'], l10n('Please choose a category')); 178 $comment_action='reject'; 179 } 180 161 181 // check content 162 182 if (empty($comm['content'])) … … 186 206 187 207 // get admin emails 188 $emails = get_contact_emails( );208 $emails = get_contact_emails($comm['group']); 189 209 if (!count($emails)) 190 210 { … … 281 301 /** 282 302 * get contact emails 283 */ 284 function get_contact_emails() 303 * @param mixed group: 304 * - bool true: all emails 305 * - empty string: emails without group 306 * - string: emails with the specified group 307 */ 308 function get_contact_emails($group=true) 285 309 { 286 310 global $conf; … … 288 312 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 289 313 314 $where = '1=1'; 315 if ($group!==true) 316 { 317 if (empty($group)) 318 { 319 $where = 'group_name IS NULL'; 320 } 321 else 322 { 323 $where = 'group_name="'.$group.'"'; 324 } 325 } 326 327 $query = ' 328 SELECT * 329 FROM '. CONTACT_FORM_TABLE .' 330 WHERE 331 '.$where.' 332 AND active = "true" 333 ORDER BY name ASC 334 '; 335 $result = pwg_query($query); 336 290 337 $emails = array(); 291 foreach ($conf['ContactForm']['cf_admin_mails'] as $data) 292 { 293 if ($data['active']) 294 { 295 array_push($emails, format_email($data['name'], $data['email'])); 296 } 338 while ($data = pwg_db_fetch_assoc($result)) 339 { 340 array_push($emails, format_email($data['name'], $data['email'])); 297 341 } 298 342 -
extensions/ContactForm/include/install.inc.php
r17658 r17945 4 4 function contact_form_install() 5 5 { 6 global $conf; 6 global $conf, $prefixeTable; 7 8 // email table 9 $query = ' 10 CREATE TABLE IF NOT EXISTS `'. $prefixeTable .'contact_form` ( 11 `id` smallint(5) NOT NULL AUTO_INCREMENT, 12 `name` varchar(128) NOT NULL, 13 `email` varchar(128) NOT NULL, 14 `active` enum("true","false") NOT NULL DEFAULT "true", 15 `group_name` varchar(128) DEFAULT NULL, 16 PRIMARY KEY (`id`), 17 UNIQUE KEY `UNIQUE` (`email`,`group_name`) 18 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;'; 19 pwg_query($query); 7 20 8 21 // configuration … … 19 32 'cf_redirect_delay' => 5, 20 33 'cf_mail_type' => 'text/html', 21 'cf_admin_mails' => array(),22 34 )); 23 35 … … 37 49 if (!isset($new_conf['cf_must_initialize'])) 38 50 { 51 // new params 39 52 $new_conf['cf_must_initialize'] = false; 40 53 $new_conf['cf_default_subject'] = 'A comment on your site'; 41 54 $new_conf['cf_mail_type'] = 'text/html'; 42 unset($new_conf['comment'], $new_conf['cf_redirect_delay'], $new_conf['cf_separator'], $new_conf['cf_separator_length']);43 55 56 // move emails to database 57 $email = array(); 44 58 foreach ($new_conf['cf_admin_mails'] as $email => $data) 45 59 { 46 $new_conf['cf_admin_mails'][] =array(60 array_push($emails, array( 47 61 'email' => $email, 48 62 'name' => $data['NAME'], 49 'active' => $data['ACTIVE'], 50 ); 51 unset($new_conf['cf_admin_mails'][ $email ]); 63 'active' => boolean_to_string($data['ACTIVE']), 64 )); 52 65 } 53 66 67 mass_inserts( 68 $prefixeTable .'contact_form', 69 array('name','email','active'), 70 $emails 71 ); 72 73 // old params 74 unset( 75 $new_conf['comment'], $new_conf['cf_redirect_delay'], 76 $new_conf['cf_separator'], $new_conf['cf_separator_length'], 77 $new_conf['cf_admin_mails'] 78 ); 79 80 // save config 54 81 $conf['ContactForm'] = serialize($new_conf); 55 82 $conf['ContactForm_before'] = stripslashes($conf['persoformtop']); -
extensions/ContactForm/language/bg_BG/plugin.lang.php
r17723 r17945 39 39 $lang['Please enter a message'] = 'Моля въведете съобщение'; 40 40 $lang['Error while sending e-mail'] = 'Грешка при изпращане на e-mail'; 41 42 $lang[' Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Префикс на изпращания имейл обект (Може да използвате "%gallery_title%")';41 $lang['Prefix of the sent e-mail subject'] = 'Префикс на изпращания имейл обект'; 42 $lang['you can use "%gallery_title%"'] = 'Може да използвате "%gallery_title%"'; 43 43 $lang['Plain text'] = 'Свободен текст'; 44 44 $lang['No active email address'] = 'Неактивет имейл адрес'; -
extensions/ContactForm/language/cs_CZ/plugin.lang.php
r17559 r17945 39 39 $lang['Please enter a message'] = 'Prosím zadejte zprávu'; 40 40 $lang['Error while sending e-mail'] = 'Nastala chyba při odeslání zprávy'; 41 42 41 $lang['%s must not be more than %d characters long'] = '%s nesmí být delší než %d znaků'; 43 42 $lang['+ Add an email'] = '+ Přidat email'; … … 48 47 $lang['Plain text'] = 'Prostý text'; 49 48 $lang['Please enter an e-mail'] = 'Prosím, vložte e-mail'; 50 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Předpona poslaného e-mail předmětu (můžete použít "%gallery_title%")'; 49 $lang['Prefix of the sent e-mail subject'] = 'Předpona poslaného e-mail předmětu'; 50 $lang['you can use "%gallery_title%"'] = 'můžete použít "%gallery_title%"'; 51 51 $lang['%s must not be less than %d characters long'] = '%s nesmí být kratší než %d znaků'; 52 52 ?> -
extensions/ContactForm/language/da_DK/plugin.lang.php
r17502 r17945 39 39 $lang['Please enter a message'] = 'Angiv en beskred'; 40 40 $lang['Error while sending e-mail'] = 'Fejl ved afsendelse af e-mail'; 41 42 41 $lang['%s must not be less than %d characters long'] = '%s må ikke være kortere end %d karakterer'; 43 42 $lang['%s must not be more than %d characters long'] = '%s må ikke være længere end %d karakterer'; … … 49 48 $lang['Plain text'] = 'Ren tekst'; 50 49 $lang['Please enter an e-mail'] = 'Angiv en email adresse'; 51 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Præfix for email emne (du kan anvende "%gallery_title%")'; 50 $lang['Prefix of the sent e-mail subject'] = 'Præfix for email emne'; 51 $lang['you can use "%gallery_title%"'] = 'du kan anvende "%gallery_title%"'; 52 52 ?> -
extensions/ContactForm/language/de_DE/plugin.lang.php
r17530 r17945 39 39 $lang['Please enter a message'] = 'Bitte fügen Sie eine Mitteilung hinzu'; 40 40 $lang['Error while sending e-mail'] = 'Es ist ein Fehler beim Versand der E-Mail aufgetreten'; 41 42 41 $lang['+ Add an email'] = '+ Eine Mail hinzufügen'; 43 42 $lang['E-mail format :'] = 'E-Mail Format:'; … … 49 48 $lang['%s must not be more than %d characters long'] = '%s darf nicht mehr als %d Zeichen lang sein'; 50 49 $lang['Default e-mail subject'] = 'Standard E-mail-Betreff'; 51 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Präfix des gesendeten e-Mail-Betreffs (Sie können "% Gallery_title" benutzen)'; 50 $lang['Prefix of the sent e-mail subject'] = 'Präfix des gesendeten e-Mail-Betreffs'; 51 $lang['you can use "%gallery_title%"'] = 'Sie können "%gallery_title%" benutzen'; 52 52 ?> -
extensions/ContactForm/language/el_GR/plugin.lang.php
r17499 r17945 33 33 $lang['Please enter a message'] = 'Παρακαλώ εισάγετε ένα μήνυμα'; 34 34 $lang['Error while sending e-mail'] = 'Λάθος κατά την απόστολή e-mail'; 35 36 $lang[' Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Πρόθεμα για το θέμα του e-mail που στέλνετε (μπορείτε να χρησιμοποιήσετε το " "%gallery_title%"")';35 $lang['Prefix of the sent e-mail subject'] = 'Πρόθεμα για το θέμα του e-mail που στέλνετε'; 36 $lang['you can use "%gallery_title%"'] = 'μπορείτε να χρησιμοποιήσετε το "%gallery_title%"'; 37 37 $lang['Please enter an e-mail'] = 'Παρακαλώ εισάγετε ένα e-mail'; 38 38 $lang['Plain text'] = 'Απλό κείμενο'; -
extensions/ContactForm/language/en_UK/plugin.lang.php
r17498 r17945 26 26 $lang['Subject'] = 'Subject'; 27 27 $lang['Message'] = 'Message'; 28 $lang['Category'] = 'Category'; 28 29 $lang['General configuration'] = 'General configuration'; 29 30 $lang['Add link in menu'] = 'Add link in menu'; … … 35 36 $lang['Plain text'] = 'Plain text'; 36 37 $lang['Default e-mail subject'] = 'Default e-mail subject'; 37 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Prefix of the sent e-mail subject (you can use "%gallery_title%")'; 38 $lang['can be translated with LocalFiles Editor plugin'] = 'can be translated with LocalFiles Editor plugin'; 39 $lang['Prefix of the sent e-mail subject'] = 'Prefix of the sent e-mail subject'; 40 $lang['you can use "%gallery_title%"'] = 'you can use "%gallery_title%"'; 38 41 $lang['Text before the contact form'] = 'Text before the contact form'; 39 42 $lang['Text after the contact form'] = 'Text after the contact form'; 40 43 $lang['Active'] = 'Active'; 41 44 $lang['+ Add an email'] = '+ Add an email'; 45 $lang['+ Add a category'] = '+ Add a category'; 42 46 $lang['No active email address'] = 'No active email address'; 43 47 $lang['E-mail sent successfully'] = 'E-mail sent successfully'; … … 46 50 $lang['Please enter a subject'] = 'Please enter a subject'; 47 51 $lang['Please enter a message'] = 'Please enter a message'; 52 $lang['Please choose a category'] = 'Please choose a category'; 48 53 $lang['%s must not be less than %d characters long'] = '%s must not be less than %d characters long'; 49 54 $lang['%s must not be more than %d characters long'] = '%s must not be more than %d characters long'; -
extensions/ContactForm/language/es_ES/plugin.lang.php
r17533 r17945 38 38 $lang['Please enter a message'] = 'Por favor, entre un mensaje'; 39 39 $lang['Error while sending e-mail'] = 'Error en el momento del envío del e-mail'; 40 41 40 $lang['%s must not be less than %d characters long'] = '%s no debe ser menor que %d caracteres'; 42 41 $lang['%s must not be more than %d characters long'] = '%s no debe ser mayor que %d caracteres'; … … 49 48 $lang['Plain text'] = 'Texto sin formato'; 50 49 $lang['Please enter an e-mail'] = 'Por favor, introduzca un e-mail'; 51 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Prefijo del asunto del correo electrónico de envío (se puede utilizar "%galería de title%")'; 50 $lang['Prefix of the sent e-mail subject'] = 'Prefijo del asunto del correo electrónico de envío'; 51 $lang['you can use "%gallery_title%"'] = 'se puede utilizar "%gallery_title%"'; 52 52 ?> -
extensions/ContactForm/language/fa_IR/plugin.lang.php
r17608 r17945 39 39 $lang['Please enter a subject'] = 'موضوع را وارد کنید'; 40 40 $lang['Please enter an e-mail'] = 'ایمیل خود را وارد کنید'; 41 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'پیشوند موضوع ایمیل (می توانید از "%gallery_title%" استفاده کنید)';42 41 $lang['Text after the contact form'] = 'متنِ پس از فرمِ تماس'; 43 42 $lang['Text before the contact form'] = 'متنِ پیش از فرمِ تماس'; -
extensions/ContactForm/language/fr_FR/plugin.lang.php
r17498 r17945 26 26 $lang['Subject'] = 'Sujet'; 27 27 $lang['Message'] = 'Message'; 28 $lang['Category'] = 'Catégorie'; 28 29 $lang['General configuration'] = 'Configuration générale'; 29 30 $lang['Add link in menu'] = 'Ajouter le lien dans le menu'; … … 35 36 $lang['Plain text'] = 'Texte brut'; 36 37 $lang['Default e-mail subject'] = 'Sujet par défaut'; 37 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Préfixe du sujet de l\'e-mail envoyé (vous pouvez utiliser "%gallery_title%")'; 38 $lang['can be translated with LocalFiles Editor plugin'] = 'peut être traduit avec le plugin LocalFiles Editor'; 39 $lang['Prefix of the sent e-mail subject'] = 'Préfixe du sujet de l\'e-mail envoyé'; 40 $lang['you can use "%gallery_title%"'] = 'vous pouvez utiliser "%gallery_title%"'; 38 41 $lang['Text before the contact form'] = 'Texte au-dessus du formulaire de contact'; 39 42 $lang['Text after the contact form'] = 'Texte au-dessous du formulaire de contact'; 40 43 $lang['E-mails'] = 'E-mails'; 41 44 $lang['Active'] = 'Actif'; 42 $lang['+ Add an email'] = '+ Ajouter un email'; 45 $lang['+ Add an email'] = '+ Ajouter une email'; 46 $lang['+ Add a category'] = '+ Ajouter une categorie'; 43 47 $lang['No active email address'] = 'Aucune adresse email active'; 44 48 $lang['E-mail sent successfully'] = 'E-mail envoyé avec succès'; … … 47 51 $lang['Please enter a subject'] = 'Veuillez entrer un sujet'; 48 52 $lang['Please enter a message'] = 'Veuillez entrer un message'; 53 $lang['Please choose a category'] = 'Veuillez choisir une categorie'; 49 54 $lang['%s must not be less than %d characters long'] = '%s ne doit pas faire moins de %d caractères'; 50 55 $lang['%s must not be more than %d characters long'] = '%s ne doit pas faire plus de %d caractères'; -
extensions/ContactForm/language/hu_HU/plugin.lang.php
r17667 r17945 39 39 $lang['Please enter a message'] = 'Írja be az üzenetét'; 40 40 $lang['Error while sending e-mail'] = 'Hiba történt a levél küldése közben'; 41 42 41 $lang['%s must not be less than %d characters long'] = '%s nem lehet kevesebb %d karakternél'; 43 42 $lang['%s must not be more than %d characters long'] = '%s nem lehet több %d karakternél'; … … 49 48 $lang['Plain text'] = 'Egyszerű szöveg'; 50 49 $lang['Please enter an e-mail'] = 'Kérek egy e-mail címet'; 51 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Küldött e-mail tárgy előtag (a "%gallery_title%" használható)'; 50 $lang['Prefix of the sent e-mail subject'] = 'Küldött e-mail tárgy előtag'; 51 $lang['you can use "%gallery_title%"'] = 'a "%gallery_title%" használható'; 52 52 ?> -
extensions/ContactForm/language/it_IT/plugin.lang.php
r17610 r17945 39 39 $lang['Please enter a message'] = 'Entrare un messaggio'; 40 40 $lang['Error while sending e-mail'] = 'Errore durante l\'invio dell\'E-mail'; 41 42 $lang['%s must not be less than %d characters long'] = '% deve essere lungo non meno di % caratteri'; 43 $lang['%s must not be more than %d characters long'] = '% la lunghezza non deve essere maggiore di % caratteri'; 41 $lang['%s must not be less than %d characters long'] = '%s deve essere lungo non meno di %d caratteri'; 42 $lang['%s must not be more than %d characters long'] = '%s la lunghezza non deve essere maggiore di %d caratteri'; 44 43 $lang['Default e-mail subject'] = 'Oggetto email predefinito'; 45 44 $lang['E-mail format :'] = 'Formato email'; … … 47 46 $lang['Plain text'] = 'Testo non formattato'; 48 47 $lang['Please enter an e-mail'] = 'Aggiungi la tua email'; 49 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Presisso per le email gia inviate';48 $lang['Prefix of the sent e-mail subject'] = 'Presisso per le email gia inviate'; 50 49 $lang['Active'] = 'Attivo'; 51 50 $lang['+ Add an email'] = 'Aggiungi la tua email'; -
extensions/ContactForm/language/lv_LV/plugin.lang.php
r17557 r17945 39 39 $lang['Please enter a message'] = 'Lūdzu ievadiet ziņojumu'; 40 40 $lang['Error while sending e-mail'] = 'Kļūda sūtot e-pastu'; 41 42 $lang[' Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Nosūtītā e-pasta tēmas prefikss (varat lietot "%gallery_title%")';41 $lang['Prefix of the sent e-mail subject'] = 'Nosūtītā e-pasta tēmas prefikss'; 42 $lang['you can use "%gallery_title%"'] = 'varat lietot "%gallery_title%"'; 43 43 $lang['%s must not be more than %d characters long'] = '%s jābūt ne vairāk kā %d rakstzīmju garam'; 44 44 $lang['%s must not be less than %d characters long'] = '%s jābūt ne māzāk kā %d rakstzīmju garam'; -
extensions/ContactForm/language/nl_NL/plugin.lang.php
r17634 r17945 39 39 $lang['Please enter a message'] = 'Vul een berichttekst in'; 40 40 $lang['Error while sending e-mail'] = 'Fout tijdens versturen van e-mail'; 41 42 41 $lang['%s must not be less than %d characters long'] = '%s mag niet kleiner zijn dan %d tekens'; 43 42 $lang['%s must not be more than %d characters long'] = '%s mag niet groter zijn dan %d tekens'; … … 49 48 $lang['Plain text'] = 'Platte tekst'; 50 49 $lang['Please enter an e-mail'] = 'Voer een email adres in'; 51 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Voorvoegsel voor het email onderwerp (je kan \'%gallery_title%\') gebruiken'; 50 $lang['Prefix of the sent e-mail subject'] = 'Voorvoegsel voor het email onderwerp'; 51 $lang['you can use "%gallery_title%"'] = 'je kan "%gallery_title%" gebruiken'; 52 52 ?> -
extensions/ContactForm/language/pl_PL/plugin.lang.php
r17584 r17945 49 49 $lang['Plain text'] = 'Sam tekst'; 50 50 $lang['Please enter an e-mail'] = 'Wprowadź proszę e-mail'; 51 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Prefix tematu wysyłanego maila (możesz wykorzystać tytuł galerii: "%gallery_title%")'; 51 $lang['Prefix of the sent e-mail subject'] = 'Prefix tematu wysyłanego maila'; 52 $lang['you can use "%gallery_title%"'] = 'możesz wykorzystać tytuł galerii: "%gallery_title%"'; 52 53 ?> -
extensions/ContactForm/language/pt_PT/plugin.lang.php
r17532 r17945 49 49 $lang['Plain text'] = 'Texto normal'; 50 50 $lang['Please enter an e-mail'] = 'Indique um Email por favor'; 51 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Prefixo do assunto Enviar e-mail (Pode usar "%gallery_title%")'; 51 $lang['Prefix of the sent e-mail subject'] = 'Prefixo do assunto Enviar e-mail'; 52 $lang['you can use "%gallery_title%"'] = 'Pode usar "%gallery_title%"'; 52 53 ?> -
extensions/ContactForm/language/ru_RU/plugin.lang.php
r17522 r17945 40 40 $lang['Error while sending e-mail'] = 'Ошибка при отправке сообщения'; 41 41 42 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Префикс темы отправляемых e-mail (можно использовать "%gallery_title%")'; 42 $lang['Prefix of the sent e-mail subject'] = 'Префикс темы отправляемых e-mail'; 43 $lang['you can use "%gallery_title%"'] = 'можно использовать "%gallery_title%"'; 43 44 $lang['Please enter an e-mail'] = 'Пожалуйста, введите e-mail'; 44 45 $lang['Active'] = 'Активный'; -
extensions/ContactForm/language/sk_SK/plugin.lang.php
r17531 r17945 40 40 $lang['Error while sending e-mail'] = 'Chyba počas posielania e-mailu'; 41 41 42 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Predpona predmetu posielaného emailu (môžete použiť "%gallery_title%")'; 42 $lang['Prefix of the sent e-mail subject'] = 'Predpona predmetu posielaného emailu'; 43 $lang['you can use "%gallery_title%"'] = 'môžete použiť "%gallery_title%"'; 43 44 $lang['Please enter an e-mail'] = 'Prosím vložte email'; 44 45 $lang['Plain text'] = 'Obyčajný text'; -
extensions/ContactForm/language/tr_TR/plugin.lang.php
r17535 r17945 42 42 $lang['%s must not be less than %d characters long'] = '%s, %d karakter uzunluğundan küçük olmamalıdır'; 43 43 $lang['%s must not be more than %d characters long'] = '%s, %d karakter uzunluğundan büyük olmamalıdır'; 44 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Gönderilen e-posta konusu başına bir ön takı ekle ("%gallery_title%" kullanabilirsiniz.)'; 44 $lang['Prefix of the sent e-mail subject'] = 'Gönderilen e-posta konusu başına bir ön takı ekle'; 45 $lang['you can use "%gallery_title%"'] = '"%gallery_title%" kullanabilirsiniz'; 45 46 $lang['+ Add an email'] = '+ Bir e-posta adresi ekle'; 46 47 $lang['Active'] = 'Etkin'; -
extensions/ContactForm/language/uk_UA/plugin.lang.php
r17643 r17945 39 39 $lang['Please enter a message'] = 'Будь ласка, введіть повідомлення'; 40 40 $lang['Error while sending e-mail'] = 'Помилка при відправленні по електронній пошті'; 41 42 41 $lang['%s must not be less than %d characters long'] = '%s повинно бути не коротше %d символів'; 43 42 $lang['%s must not be more than %d characters long'] = '%s повинно бути не довше %d символів'; … … 49 48 $lang['Plain text'] = 'Простий текст'; 50 49 $lang['Please enter an e-mail'] = 'Будь ласка, введіть e-mail'; 51 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Префікс теми відправлених e-mail (можна використовувати "%gallery_title%")'; 50 $lang['Prefix of the sent e-mail subject'] = 'Префікс теми відправлених e-mail'; 51 $lang['you can use "%gallery_title%"'] = 'можна використовувати "%gallery_title%"'; 52 52 ?> -
extensions/ContactForm/language/vi_VN/plugin.lang.php
r17526 r17945 39 39 $lang['Please enter a message'] = 'Vui lòng nhập nội dung'; 40 40 $lang['Error while sending e-mail'] = 'Có lỗi trong quá trình gởi email'; 41 42 41 $lang['%s must not be less than %d characters long'] = '%s phải có ít nhất %d ký tự'; 43 42 $lang['%s must not be more than %d characters long'] = '%s phải có ít hơn %d ký tự'; … … 49 48 $lang['Plain text'] = 'Thô (không có định dạng gì)'; 50 49 $lang['Please enter an e-mail'] = 'Hãy nhập địa chỉ thư'; 51 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'Chủ đề gắn vào trước chủ đề thư (ví dụ "%gallery_title%")'; 50 $lang['Prefix of the sent e-mail subject'] = 'Chủ đề gắn vào trước chủ đề thư'; 51 $lang['you can use "%gallery_title%"'] = 'ví dụ "%gallery_title%"'; 52 52 ?> -
extensions/ContactForm/language/zh_CN/plugin.lang.php
r17594 r17945 22 22 // +-----------------------------------------------------------------------+ 23 23 $lang['Please enter an e-mail'] = '请输入email地址'; 24 $lang['Prefix of the sent e-mail subject (you can use "%gallery_title%")'] = 'email标题的前缀 (您可以使用 "%gallery_title%")'; 24 $lang['Prefix of the sent e-mail subject'] = 'email标题的前缀'; 25 $lang['you can use "%gallery_title%"'] = '您可以使用 "%gallery_title%"'; 25 26 $lang['Subject'] = '标题'; 26 27 $lang['Text after the contact form'] = '联络表单之后的文字'; -
extensions/ContactForm/main.inc.php
r17658 r17945 11 11 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 12 12 13 define('CONTACT_FORM_PATH', PHPWG_PLUGINS_PATH . 'ContactForm/'); 14 define('CONTACT_FORM_ADMIN', get_root_url() . 'admin.php?page=plugin-ContactForm'); 15 define('CONTACT_FORM_PUBLIC', get_absolute_root_url() . make_index_url(array('section' => 'contact')) . '/'); 16 define('CONTACT_FORM_VERSION', '2.4.d'); 13 global $prefixeTable; 14 15 defined('CONTACT_FORM_ID') or define('CONTACT_FORM_ID', basename(dirname(__FILE__))); 16 define('CONTACT_FORM_PATH', PHPWG_PLUGINS_PATH . CONTACT_FORM_ID . '/'); 17 define('CONTACT_FORM_ADMIN', get_root_url() . 'admin.php?page=plugin-' . CONTACT_FORM_ID); 18 define('CONTACT_FORM_PUBLIC', get_absolute_root_url() . make_index_url(array('section' => 'contact')) . '/'); 19 define('CONTACT_FORM_TABLE', $prefixeTable .'contact_form'); 20 define('CONTACT_FORM_VERSION', '2.5.0'); 17 21 18 22 19 23 add_event_handler('init', 'contact_form_init'); 20 24 21 add_event_handler('loc_end_section_init', 'contact_form_section_init');22 add_event_handler('loc_end_index', 'contact_form_page');23 add_event_handler('blockmanager_apply', 'contact_form_applymenu', EVENT_HANDLER_PRIORITY_NEUTRAL+10);24 25 25 if (defined('IN_ADMIN')) 26 26 { 27 27 add_event_handler('get_admin_plugin_menu_links', 'contact_form_admin_menu'); 28 } 29 else 30 { 31 add_event_handler('loc_end_section_init', 'contact_form_section_init'); 32 add_event_handler('loc_end_index', 'contact_form_page'); 33 add_event_handler('blockmanager_apply', 'contact_form_applymenu', EVENT_HANDLER_PRIORITY_NEUTRAL+10); 28 34 } 29 35 … … 39 45 40 46 if ( 41 $pwg_loaded_plugins[ 'ContactForm']['version'] == 'auto' or42 version_compare($pwg_loaded_plugins[ 'ContactForm']['version'], CONTACT_FORM_VERSION, '<')47 $pwg_loaded_plugins[CONTACT_FORM_ID]['version'] == 'auto' or 48 version_compare($pwg_loaded_plugins[CONTACT_FORM_ID]['version'], CONTACT_FORM_VERSION, '<') 43 49 ) 44 50 { … … 46 52 contact_form_install(); 47 53 48 if ($pwg_loaded_plugins[ 'ContactForm']['version'] != 'auto')54 if ($pwg_loaded_plugins[CONTACT_FORM_ID]['version'] != 'auto') 49 55 { 50 56 $query = ' 51 57 UPDATE '. PLUGINS_TABLE .' 52 58 SET version = "'. CONTACT_FORM_VERSION .'" 53 WHERE id = " ContactForm"';59 WHERE id = "'. CONTACT_FORM_ID .'"'; 54 60 pwg_query($query); 55 61 56 $pwg_loaded_plugins[ 'ContactForm']['version'] = CONTACT_FORM_VERSION;62 $pwg_loaded_plugins[CONTACT_FORM_ID]['version'] = CONTACT_FORM_VERSION; 57 63 58 64 if (defined('IN_ADMIN')) -
extensions/ContactForm/maintain.inc.php
r17658 r17945 2 2 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 3 3 4 include_once(PHPWG_PLUGINS_PATH . 'ContactForm/include/install.inc.php'); 4 defined('CONTACT_FORM_ID') or define('CONTACT_FORM_ID', basename(dirname(__FILE__))); 5 include_once(PHPWG_PLUGINS_PATH . CONTACT_FORM_ID . '/include/install.inc.php'); 5 6 6 7 function plugin_install() -
extensions/ContactForm/template/contact_form.tpl
r17498 r17945 12 12 email.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter an e-mail'|@translate}" }); 13 13 email.add(Validate.Email, {ldelim} failureMessage: "{'mail address must be like xxx@yyy.eee (example : jack@altern.org)'|@translate}" }); 14 {/if} 15 16 {if $GROUPS} 17 var group = new LiveValidation('group', {ldelim} onlyOnSubmit: true }) 18 group.add(Validate.Exclusion, {ldelim} within: ['-1'], failureMessage: "{'Please choose a category'|@translate}" }); 14 19 {/if} 15 20 … … 75 80 </td> 76 81 </tr> 82 {if $GROUPS} 83 <tr> 84 <td class="title"><label for="group">{'Category'|@translate}</label></td> 85 <td> 86 <select name="group" id="group"> 87 <option value="-1">------------</option> 88 {html_options options=$GROUPS selected=$contact.group} 89 </select> 90 </td> 91 </tr> 92 {/if} 77 93 <tr> 78 94 <td class="title"><label for="subject">{'Subject'|@translate}</label></td> -
extensions/ContactForm/template/style.css
r17483 r17945 18 18 margin-right:3px; 19 19 } 20 .contact input[type="text"], .contact textarea {20 .contact input[type="text"], .contact textarea, .contact select { 21 21 border-radius:2px; 22 22 padding:3px; 23 } 24 .content select { 25 padding:2px; 23 26 } 24 27
Note: See TracChangeset
for help on using the changeset viewer.