Changeset 12356 for extensions/Admin_Messages
- Timestamp:
- Oct 6, 2011, 10:03:31 AM (13 years ago)
- Location:
- extensions/Admin_Messages
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Admin_Messages/admin.php
r10982 r12356 9 9 10 10 // +-----------------------------------------------------------------------+ 11 // 11 // Tabsheet 12 12 // +-----------------------------------------------------------------------+ 13 13 include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 14 14 $page['tab'] = (isset($_GET['tab'])) ? $_GET['tab'] : $page['tab'] = 'list'; 15 15 16 16 $tabsheet = new tabsheet(); 17 $tabsheet->add('list', l10n(' AM_list_tab'), AM_ADMIN . '-list');// Liste de smessages18 $tabsheet->add('new', l10n('A M_new_tab'), AM_ADMIN . '-new');// Ajouter un nouveau message19 if ($page['tab'] == 'edit' AND isset($_GET['message_id'])) { 20 $tabsheet->add('edit', l10n('AM_edit_tab'), AM_ADMIN . '-edit&message_id=' . $_GET['message_id']);17 $tabsheet->add('list', l10n('Messages list'), AM_ADMIN . '-list'); // Liste de smessages 18 $tabsheet->add('new', l10n('Add a message'), AM_ADMIN . '-new'); // Ajouter un nouveau message 19 if ($page['tab'] == 'edit' AND isset($_GET['message_id'])) { // Editer le message 20 $tabsheet->add('edit', l10n('Edit the message'), AM_ADMIN . '-edit&message_id=' . $_GET['message_id']); 21 21 } 22 $tabsheet->add('config', l10n('Configuration'), AM_ADMIN . '-config'); 22 $tabsheet->add('config', l10n('Configuration'), AM_ADMIN . '-config'); // Configuration 23 23 $tabsheet->select($page['tab']); 24 24 $tabsheet->assign(); … … 26 26 27 27 // +-----------------------------------------------------------------------+ 28 // 28 // Template 29 29 // +-----------------------------------------------------------------------+ 30 30 $template->assign(array( 31 32 31 'AM_PATH' => AM_PATH, 32 'AM_ADMIN' => AM_ADMIN, 33 33 )); 34 34 -
extensions/Admin_Messages/admin/config.php
r10982 r12356 3 3 4 4 // +-----------------------------------------------------------------------+ 5 // 5 // Modification de la configuration 6 6 // +-----------------------------------------------------------------------+ 7 7 if (isset($_POST['config_submit'])) { 8 9 10 11 12 8 $user_config = array( 9 'nb_messages' => $_POST['nb_messages'], 10 'free_name' => (isset($_POST['free_name'])) ? 1 : 0, 11 ); 12 13 13 conf_update_param('admin_messages', serialize($user_config)); 14 14 array_push($page['infos'], l10n('Information data registered in database')); 15 15 } 16 16 17 17 18 18 // +-----------------------------------------------------------------------+ 19 // 19 // Définition des variables template 20 20 // +-----------------------------------------------------------------------+ 21 21 $template->assign(array( 22 23 22 'NB_MESSAGES' => $conf['admin_messages']['nb_messages'], 23 'FREE_NAME' => ($conf['admin_messages']['free_name']) ? 'checked="checked"' : '', 24 24 )); 25 25 26 26 27 27 // +-----------------------------------------------------------------------+ 28 // 28 // Template 29 29 // +-----------------------------------------------------------------------+ 30 30 $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__).'/template/config.tpl')); -
extensions/Admin_Messages/admin/list.php
r10982 r12356 3 3 4 4 // +-----------------------------------------------------------------------+ 5 // 5 // Supression d'un message 6 6 // +-----------------------------------------------------------------------+ 7 7 if (isset($_GET['delete_message'])) { 8 pwg_query("DELETE FROM ". AM_TABLE ." WHERE id = ". $_GET['delete_message'] .";"); 9 if (isset($_GET['redirect']) AND $_GET['redirect'] = 'home') 10 redirect(get_root_url() . 'admin.php#messages'); 11 else 12 array_push($page['infos'], l10n('AM_message_deleted')); 13 8 pwg_query("DELETE FROM ". AM_TABLE ." WHERE id = ". $_GET['delete_message'] .";"); 9 if (isset($_GET['redirect']) AND $_GET['redirect'] = 'home') 10 redirect(get_root_url() . 'admin.php#messages'); 11 else 12 array_push($page['infos'], l10n('Message deleted')); 14 13 } 15 14 16 if (isset($_GET['msg'])) 17 array_push($page['infos'], l10n('AM_message_'. $_GET['msg'])); 18 19 20 // +-----------------------------------------------------------------------+ 21 // Affichage des messages 22 // +-----------------------------------------------------------------------+ 23 $messages = pwg_query("SELECT * FROM `". AM_TABLE ."` 24 ORDER BY add_date DESC;"); 25 26 if (pwg_db_num_rows($messages)) { 27 while ($message = pwg_db_fetch_assoc($messages)) { 28 $item = array( 29 'DATE' => format_date($message['add_date'], true), 30 'AUTHOR' => $message['author'], 31 'CONTENT' => $message['content'], 32 ); 33 if (is_admin() OR $message['author'] = $user['username']) { 34 $item['U_DELETE'] = AM_ADMIN . '&delete_message=' . $message['id']; 35 $item['U_EDIT'] = AM_ADMIN . '&tab=edit&message_id=' . $message['id']; 36 } 37 38 $template->append('messages', $item); 39 } 40 15 if (isset($_GET['msg']) and $_GET['msg'] == 'added') 16 { 17 array_push($page['infos'], l10n('Message added')); 41 18 } 42 19 43 20 44 21 // +-----------------------------------------------------------------------+ 45 // Template 22 // Affichage des messages 23 // +-----------------------------------------------------------------------+ 24 $messages = pwg_query("SELECT * FROM `". AM_TABLE ."` 25 ORDER BY add_date DESC;"); 26 27 if (pwg_db_num_rows($messages)) { 28 while ($message = pwg_db_fetch_assoc($messages)) { 29 $item = array( 30 'DATE' => format_date($message['add_date'], true), 31 'AUTHOR' => $message['author'], 32 'CONTENT' => $message['content'], 33 ); 34 if (is_admin() OR $message['author'] = $user['username']) { 35 $item['U_DELETE'] = AM_ADMIN . '&delete_message=' . $message['id']; 36 $item['U_EDIT'] = AM_ADMIN . '&tab=edit&message_id=' . $message['id']; 37 } 38 39 $template->append('messages', $item); 40 } 41 42 } 43 44 45 // +-----------------------------------------------------------------------+ 46 // Template 46 47 // +-----------------------------------------------------------------------+ 47 48 $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__).'/template/list.tpl')); 48 49 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 49 50 50 51 ?> -
extensions/Admin_Messages/admin/new.php
r9786 r12356 3 3 4 4 // +-----------------------------------------------------------------------+ 5 // 5 // Ajout d'un message 6 6 // +-----------------------------------------------------------------------+ 7 7 if (isset($_POST['new_submit'])) { 8 9 10 11 array_push($page['errors'], l10n('AM_empty_content'));12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 8 if ($_POST['username'] == null) $_POST['username'] = $user['username']; 9 10 if ($_POST['content'] == null) { 11 array_push($page['errors'], l10n('Content empty')); 12 13 } else { 14 if (isset($_GET['message_id'])) { 15 pwg_query("UPDATE `". AM_TABLE ."` SET 16 `author` = '". $_POST['username'] ."', 17 `content` = '". $_POST['content'] ."' 18 WHERE `id` = ". $_GET['message_id'] .";"); 19 } else { 20 pwg_query("INSERT INTO `". AM_TABLE ."`( 21 add_date, 22 author, 23 content 24 ) 25 VALUES( 26 '". date('Y-m-d H:i:s') ."', 27 '". $_POST['username'] ."', 28 '". $_POST['content'] ."' 29 );"); 30 } 31 32 if (isset($_GET['redirect']) AND $_GET['redirect'] = 'home') 33 redirect(get_root_url() . 'admin.php#messages'); 34 else 35 redirect(AM_ADMIN .'-list&msg=added'); 36 } 37 37 } 38 38 39 39 40 40 // +-----------------------------------------------------------------------+ 41 // 41 // Formulaire vierge 42 42 // +-----------------------------------------------------------------------+ 43 43 if (isset($_GET['message_id'])) { 44 45 44 $query = "SELECT * FROM " . AM_TABLE . " WHERE id = " . $_GET['message_id'] . ";"; 45 $message = pwg_db_fetch_assoc(pwg_query($query)); 46 46 47 48 49 50 51 47 $template->assign(array( 48 'USERNAME' => $message['author'], 49 'CONTENT' => $message['content'], 50 'FREE_NAME' => (!$conf['admin_messages']['free_name']) ? 'disabled="disabled"' : '', 51 )); 52 52 53 53 } else { 54 55 56 57 58 54 $template->assign(array( 55 'USERNAME' => $user['username'], 56 'CONTENT' => null, 57 'FREE_NAME' => (!$conf['admin_messages']['free_name']) ? 'disabled="disabled"' : '', 58 )); 59 59 } 60 60 61 61 // +-----------------------------------------------------------------------+ 62 // 62 // Template 63 63 // +-----------------------------------------------------------------------+ 64 64 $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__).'/template/new.tpl')); -
extensions/Admin_Messages/admin/template/config.tpl
r10982 r12356 4 4 5 5 <div class="titrePage"> 6 6 <h2>{'Configuration'|@translate}</h2> 7 7 </div> 8 8 9 9 <form method="post" action="" class="properties"> 10 11 12 13 <td><span class="title">{'AM_nb_messages'|@translate}</span></td>14 15 16 17 <td><span class="title">{'AM_free_name'|@translate}</span></td>18 19 20 21 10 <fieldset> 11 <table> 12 <tr> 13 <td><span class="title">{'Number of messages to display on the admin main page'|@translate}</span></td> 14 <td><input type="text" size="2" name="nb_messages" value="{$NB_MESSAGES}"/></td> 15 </tr> 16 <tr> 17 <td><span class="title">{'Allow users to modify their name when post a message'|@translate}</span></td> 18 <td><input type="checkbox" name="free_name" {$FREE_NAME}/></td> 19 </tr> 20 </table> 21 </fieldset> 22 22 23 23 <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="config_submit"/></p> 24 24 </form> -
extensions/Admin_Messages/admin/template/list.tpl
r10982 r12356 4 4 5 5 <div class="titrePage"> 6 <h2>{'AM_list_tab'|@translate}</h2>6 <h2>{'Messages list'|@translate}</h2> 7 7 </div> 8 8 9 9 {if !isset($messages)} 10 {'AM_no_messages'|@translate}<br>11 <a href="{$AM_ADMIN}&tab=new">{'AM_new_tab'|@translate}</a>10 {'No message'|@translate}<br> 11 <a href="{$AM_ADMIN}&tab=new">{'Add a message'|@translate}</a> 12 12 {/if} 13 13 14 14 <form id="categoryOrdering"> 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 15 <ul class="categoryUl"> 16 {foreach from=$messages item=message} 17 <li class="categoryLi {if $smarty.foreach.pending_loop.index is odd}virtual_cat{/if}"> 18 <ul class="categoryActions"> 19 {if isset($message.U_EDIT)} 20 <li> 21 <a href="{$message.U_EDIT}" title="{'edit'|@translate}"> 22 <img src="{$themeconf.admin_icon_dir}/category_edit.png" class="button" alt="{'edit'|@translate}" /> 23 </a> 24 </li> 25 {/if} 26 {if isset($message.U_DELETE)} 27 <li> 28 <a href="{$message.U_DELETE}" title="{'delete'|@translate}"> 29 <img src="{$themeconf.admin_icon_dir}/category_delete.png" class="button" alt="{'delete'|@translate}" /> 30 </a> 31 </li> 32 {/if} 33 </ul> 34 35 <div class="head"><b>{$message.AUTHOR}</b> - <i>{$message.DATE}</i></div> 36 <p>{$message.CONTENT}</p> 37 </li> 38 {/foreach} 39 </ul> 40 40 </form> -
extensions/Admin_Messages/admin/template/new.tpl
r10982 r12356 5 5 6 6 <div class="titrePage"> 7 8 9 {'AM_edit_tab'|@translate}10 11 {'AM_new_tab'|@translate}12 13 7 <h2> 8 {if isset($CONTENT)} 9 {'Edit the message'|@translate} 10 {else} 11 {'Add a message'|@translate} 12 {/if} 13 </h2> 14 14 </div> 15 15 16 16 <form method="post" action="" class="properties"> 17 18 19 20 21 22 23 {if $FREE_NAME != null}<span class="fixed">{'AM_name_fixed'|@translate}</span>{/if}24 25 26 27 <td><span class="title">{'AM_msg_content'|@translate}</span></td>28 29 30 31 17 <fieldset> 18 <table> 19 <tr> 20 <td><span class="title">{'Username'|@translate}</span></td> 21 <td> 22 <input type="text" size="15" name="username" value="{$USERNAME}" {$FREE_NAME}/> 23 {if $FREE_NAME != null}<span class="fixed">{'(fixed)'|@translate}</span>{/if} 24 </td> 25 </tr> 26 <tr> 27 <td><span class="title">{'Message content'|@translate}</span></td> 28 <td><textarea name="content" rows="4" style="width:100%;">{$CONTENT}</textarea></td> 29 </tr> 30 </table> 31 </fieldset> 32 32 33 33 <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="new_submit"/></p> 34 34 </form> -
extensions/Admin_Messages/admin/template/style.css
r9967 r12356 1 1 table{ 2 2 width:80%; 3 3 } 4 4 td { 5 5 width:50%; 6 6 } 7 7 .title { 8 9 10 11 8 display:block; 9 text-align:right; 10 font-weight:bold; 11 margin-right:10px; 12 12 } 13 13 .fixed { 14 14 font-style:italic; 15 15 } 16 16 .categoryLi div.head { 17 18 19 20 17 font-size:0.9em; 18 border-bottom:1px dotted #666; 19 width:300px; 20 margin-top:5px; 21 21 } 22 22 .categoryLi p { 23 23 margin-left:10px; 24 24 } 25 25 26 26 .titrePage { 27 27 clear:right; 28 28 } 29 29 .version_title { 30 31 32 33 34 35 36 30 float:right; 31 position:relative; 32 top:-24px; 33 margin-bottom:-20px !important; 34 font-size:12px !important; 35 font-style:italic; 36 font-weight:normal; 37 37 } -
extensions/Admin_Messages/admin_messages.php
r9786 r12356 8 8 9 9 // +-----------------------------------------------------------------------+ 10 // 10 // Affichage des messages 11 11 // +-----------------------------------------------------------------------+ 12 12 $messages = pwg_query("SELECT * FROM `". AM_TABLE ."` 13 14 15 13 ORDER BY add_date DESC 14 LIMIT 0, ". $conf['admin_messages']['nb_messages'] .";"); 15 16 16 if (pwg_db_num_rows($messages)) { 17 18 19 20 21 22 23 24 25 26 } 27 28 29 30 17 while ($message = pwg_db_fetch_assoc($messages)) { 18 $item = array( 19 'DATE' => format_date($message['add_date'], true), 20 'AUTHOR' => $message['author'], 21 'CONTENT' => $message['content'], 22 ); 23 if (is_admin() OR $message['author'] = $user['username']) { 24 $item['U_DELETE'] = AM_ADMIN . '&delete_message=' . $message['id'] . '&redirect=home'; 25 $item['U_EDIT'] = AM_ADMIN . '-edit&message_id=' . $message['id'] . '&redirect=home'; 26 } 27 28 $template->append('messages', $item); 29 } 30 31 31 } 32 32 33 33 34 34 // +-----------------------------------------------------------------------+ 35 // 35 // Template 36 36 // +-----------------------------------------------------------------------+ 37 37 $template->assign(array( 38 39 40 38 'AM_ADMIN' => AM_ADMIN, 39 'USERNAME' => $user['username'], 40 'AM_PATH' => AM_PATH 41 41 )); 42 42 43 43 $template->set_filenames(array('admin_messages' => dirname(__FILE__) .'/template/admin_messages.tpl')); 44 44 $template->pparse('admin_messages'); 45 45 46 46 ?> -
extensions/Admin_Messages/language/de_DE/plugin.lang.php
r9967 r12356 1 1 <?php 2 2 3 $lang[' AM_messages'] = "Mitteilungen";4 $lang[' AM_no_messages'] = "Keine Mitteilungen";5 $lang[' AM_list_tab'] = "Liste der Mitteilungen";6 $lang['A M_new_tab'] = "Mitteilung hinzufügen";7 $lang[' AM_edit_tab'] = "Edit the message";8 $lang[' AM_msg_content'] = "Inhalt der Mitteilung";9 $lang[' AM_nb_messages'] = "Anzahl Mitteilungen welche auf der Administrationsseite angezeigt werden";10 $lang['A M_free_name'] = "Den Benutzern erlauben Ihr Name zu verändern, wenn sie eine Mitteilung posten";11 $lang[' AM_name_fixed'] = "(fixiert)";12 $lang[' AM_message_added'] = "Mitteilung hinzugefügt";13 $lang[' AM_message_deleted'] = "Message deleted";14 $lang[' AM_empty_content'] = "Inhalt leer";3 $lang['Messages'] = 'Mitteilungen'; 4 $lang['No message'] = 'Keine Mitteilungen'; 5 $lang['Messages list'] = 'Liste der Mitteilungen'; 6 $lang['Add a message'] = 'Mitteilung hinzufügen'; 7 $lang['Edit the message'] = 'Edit the message'; 8 $lang['Message content'] = 'Inhalt der Mitteilung'; 9 $lang['Number of messages to display on the admin main page'] = 'Anzahl Mitteilungen welche auf der Administrationsseite angezeigt werden'; 10 $lang['Allow users to modify their name when post a message'] = 'Den Benutzern erlauben Ihr Name zu verändern, wenn sie eine Mitteilung posten'; 11 $lang['(fixed)'] = '(fixiert)'; 12 $lang['Message added'] = 'Mitteilung hinzugefügt'; 13 $lang['Message deleted'] = 'Message deleted'; 14 $lang['Content empty'] = 'Inhalt leer'; 15 15 16 16 ?> -
extensions/Admin_Messages/language/en_UK/plugin.lang.php
r9786 r12356 1 1 <?php 2 2 3 $lang[' AM_messages'] = "Messages";4 $lang[' AM_no_messages'] = "No message";5 $lang[' AM_list_tab'] = "Messages list";6 $lang['A M_new_tab'] = "Add a message";7 $lang[' AM_edit_tab'] = "Edit the message";8 $lang[' AM_msg_content'] = "Message content";9 $lang[' AM_nb_messages'] = "Number of messages to display on the admin main page";10 $lang['A M_free_name'] = "Allow users to modify their name when post a message";11 $lang[' AM_name_fixed'] = "(fixed)";12 $lang[' AM_message_added'] = "Message added";13 $lang[' AM_message_deleted'] = "Message deleted";14 $lang[' AM_empty_content'] = "Content empty";3 $lang['Messages'] = 'Messages'; 4 $lang['No message'] = 'No message'; 5 $lang['Messages list'] = 'Messages list'; 6 $lang['Add a message'] = 'Add a message'; 7 $lang['Edit the message'] = 'Edit the message'; 8 $lang['Message content'] = 'Message content'; 9 $lang['Number of messages to display on the admin main page'] = 'Number of messages to display on the admin main page'; 10 $lang['Allow users to modify their name when post a message'] = 'Allow users to modify their name when post a message'; 11 $lang['(fixed)'] = '(fixed)'; 12 $lang['Message added'] = 'Message added'; 13 $lang['Message deleted'] = 'Message deleted'; 14 $lang['Content empty'] = 'Content empty'; 15 15 16 16 ?> -
extensions/Admin_Messages/language/es_ES/plugin.lang.php
r9786 r12356 1 1 <?php 2 2 3 $lang[' AM_messages'] = "Mensaje";4 $lang[' AM_no_messages'] = "No hay mensajes";5 $lang[' AM_list_tab'] = "Lista de mensajes";6 $lang['A M_new_tab'] = "Añadir un mensaje";7 $lang[' AM_edit_tab'] = "Editar mensaje";8 $lang[' AM_msg_content'] = "Contenido del mensaje";9 $lang[' AM_nb_messages'] = "Número de mensajes a mostrar";10 $lang['A M_free_name'] = "Permitir la modificación del nombre de usuario";11 $lang[' AM_name_fixed'] = "(bloqueado)";12 $lang[' AM_message_added'] = "Se ha guardado el mensaje";13 $lang[' AM_message_deleted'] = "Mensaje eliminado";14 $lang[' AM_empty_content'] = "Mensaje vacío";3 $lang['Messages'] = 'Mensaje'; 4 $lang['No message'] = 'No hay mensajes'; 5 $lang['Messages list'] = 'Lista de mensajes'; 6 $lang['Add a message'] = 'Añadir un mensaje'; 7 $lang['Edit the message'] = 'Editar mensaje'; 8 $lang['Message content'] = 'Contenido del mensaje'; 9 $lang['Number of messages to display on the admin main page'] = 'Número de mensajes a mostrar'; 10 $lang['Allow users to modify their name when post a message'] = 'Permitir la modificación del nombre de usuario'; 11 $lang['(fixed)'] = '(bloqueado)'; 12 $lang['Message added'] = 'Se ha guardado el mensaje'; 13 $lang['Message deleted'] = 'Mensaje eliminado'; 14 $lang['Content empty'] = 'Mensaje vacío'; 15 15 16 16 ?> -
extensions/Admin_Messages/language/fr_FR/plugin.lang.php
r9786 r12356 1 1 <?php 2 2 3 $lang[' AM_messages'] = "Messages";4 $lang[' AM_no_messages'] = "Aucun message";5 $lang[' AM_list_tab'] = "Liste des messages";6 $lang['A M_new_tab'] = "Ajouter un message";7 $lang[' AM_edit_tab'] = "Editer un message";8 $lang[' AM_msg_content'] = "Contenu du message";9 $lang[' AM_nb_messages'] = "Nombre de messages à afficher sur l'accueil";10 $lang['A M_free_name'] = "Permettre la modification du nom d'utilisateur";11 $lang[' AM_name_fixed'] = "(bloqué)";12 $lang[' AM_message_added'] = "Message enregistré";13 $lang[' AM_message_deleted'] = "Message supprimé";14 $lang[' AM_empty_content'] = "Message vide";3 $lang['Messages'] = 'Messages'; 4 $lang['No message'] = 'Aucun message'; 5 $lang['Messages list'] = 'Liste des messages'; 6 $lang['Add a message'] = 'Ajouter un message'; 7 $lang['Edit the message'] = 'Editer un message'; 8 $lang['Message content'] = 'Contenu du message'; 9 $lang['Number of messages to display on the admin main page'] = 'Nombre de messages à afficher sur l\'accueil'; 10 $lang['Allow users to modify their name when post a message'] = 'Permettre la modification du nom d\'utilisateur'; 11 $lang['(fixed)'] = '(bloqué)'; 12 $lang['Message added'] = 'Message enregistré'; 13 $lang['Message deleted'] = 'Message supprimé'; 14 $lang['Content empty'] = 'Message vide'; 15 15 16 16 ?> -
extensions/Admin_Messages/language/hu_HU/plugin.lang.php
r11694 r12356 1 1 <?php 2 2 3 $lang[' AM_messages'] = "Üzenetek";4 $lang[' AM_no_messages'] = "Nincs üzenet";5 $lang[' AM_list_tab'] = "Üzenet lista";6 $lang['A M_new_tab'] = "Üzenet hozzáadása";7 $lang[' AM_edit_tab'] = "Üzenet szerkesztése";8 $lang[' AM_msg_content'] = "Üzenet tartalom";9 $lang[' AM_nb_messages'] = "A fő admin oldalon megjelenített üzenetek száma";10 $lang['A M_free_name'] = "Felhasználók nevének módosításának engedélyezése hozzászóláskor";11 $lang[' AM_name_fixed'] = "(rögzített)";12 $lang[' AM_message_added'] = "Üzenet hozzáadva";13 $lang[' AM_message_deleted'] = "Üzenet törölve";14 $lang[' AM_empty_content'] = "Üres tartalom";3 $lang['Messages'] = 'Üzenetek'; 4 $lang['No message'] = 'Nincs üzenet'; 5 $lang['Messages list'] = 'Üzenet lista'; 6 $lang['Add a message'] = 'Üzenet hozzáadása'; 7 $lang['Edit the message'] = 'Üzenet szerkesztése'; 8 $lang['Message content'] = 'Üzenet tartalom'; 9 $lang['Number of messages to display on the admin main page'] = 'A fő admin oldalon megjelenített üzenetek száma'; 10 $lang['Allow users to modify their name when post a message'] = 'Felhasználók nevének módosításának engedélyezése hozzászóláskor'; 11 $lang['(fixed)'] = '(rögzített)'; 12 $lang['Message added'] = 'Üzenet hozzáadva'; 13 $lang['Message deleted'] = 'Üzenet törölve'; 14 $lang['Content empty'] = 'Üres tartalom'; 15 15 16 16 ?> -
extensions/Admin_Messages/language/it_IT/plugin.lang.php
r10282 r12356 1 1 <?php 2 2 3 $lang[' AM_messages'] = 'Messaggio';4 $lang[' AM_no_messages'] = 'Nessun messaggio';5 $lang[' AM_list_tab'] = 'Lista dei messaggi';6 $lang['A M_new_tab'] = 'Aggiungere un messaggio';7 $lang[' AM_edit_tab'] = 'Modificare un messaggio';8 $lang[' AM_msg_content'] = 'Contenuto del messaggio';9 $lang[' AM_nb_messages'] = 'Numero di messaggi da visualizzare sul pannello dell\'amministrazione';10 $lang['A M_free_name'] = 'Consentire la modifica del nome del utente';11 $lang[' AM_name_fixed'] = '(bloccato)';12 $lang[' AM_message_added'] = 'Messaggio aggiunto';13 $lang[' AM_message_deleted'] = 'Messaggio cancellato';14 $lang[' AM_empty_content'] = 'Senza contenuto';3 $lang['Messages'] = 'Messaggio'; 4 $lang['No message'] = 'Nessun messaggio'; 5 $lang['Messages list'] = 'Lista dei messaggi'; 6 $lang['Add a message'] = 'Aggiungere un messaggio'; 7 $lang['Edit the message'] = 'Modificare un messaggio'; 8 $lang['Message content'] = 'Contenuto del messaggio'; 9 $lang['Number of messages to display on the admin main page'] = 'Numero di messaggi da visualizzare sul pannello dell\'amministrazione'; 10 $lang['Allow users to modify their name when post a message'] = 'Consentire la modifica del nome del utente'; 11 $lang['(fixed)'] = '(bloccato)'; 12 $lang['Message added'] = 'Messaggio aggiunto'; 13 $lang['Message deleted'] = 'Messaggio cancellato'; 14 $lang['Content empty'] = 'Senza contenuto'; 15 15 16 16 ?> -
extensions/Admin_Messages/language/lv_LV/plugin.lang.php
r11800 r12356 1 1 <?php 2 2 3 $lang['AM_messages'] = "Ziņojumi"; 4 $lang['AM_no_messages'] = "Ziņojumu nav"; 5 $lang['AM_list_tab'] = "Ziņojumu saraksts"; 6 $lang['AM_new_tab'] = "Pievienot ziņojumu"; 7 $lang['AM_edit_tab'] = 'Rediģēt ziņojumu'; 8 $lang['AM_msg_content'] = "Ziņojuma saturs"; 9 $lang['AM_nb_messages'] = "Admina galvenajā lapā attēlojamo ziņojumu skaits"; 10 $lang['AM_free_name'] = "Atļaut lietotājiem modificēt savu vārdu pie ziņojuma iesniegšanas"; 11 $lang['AM_name_fixed'] = "(salabots)"; 12 $lang['AM_message_added'] = "Ziņojums pievienots"; 13 $lang['AM_message_deleted'] = 'Ziņojums izdzēsts'; 14 $lang['AM_empty_content'] = "Saturs tukšs"; 15 3 $lang['Messages'] = 'Ziņojumi'; 4 $lang['No message'] = 'Ziņojumu nav'; 5 $lang['Messages list'] = 'Ziņojumu saraksts'; 6 $lang['Add a message'] = 'Pievienot ziņojumu'; 7 $lang['Edit the message'] = 'Rediģēt ziņojumu'; 8 $lang['Message content'] = 'Ziņojuma saturs'; 9 $lang['Number of messages to display on the admin main page'] = 'Admina galvenajā lapā attēlojamo ziņojumu skaits'; 10 $lang['Allow users to modify their name when post a message'] = 'Atļaut lietotājiem modificēt savu vārdu pie ziņojuma iesniegšanas'; 11 $lang['(fixed)'] = '(salabots)'; 12 $lang['Message added'] = 'Ziņojums pievienots'; 13 $lang['Message deleted'] = 'Ziņojums izdzēsts'; 14 $lang['Content empty'] = 'Saturs tukšs'; 16 15 17 16 ?> -
extensions/Admin_Messages/language/no_NO/plugin.lang.php
r9786 r12356 1 1 <?php 2 2 3 $lang[' AM_messages'] = "Beskjeder";4 $lang[' AM_no_messages'] = "Ingen beskjeder";5 $lang[' AM_list_tab'] = "Beskjed liste";6 $lang['A M_new_tab'] = "Legg til en beskjed";7 $lang[' AM_edit_tab'] = "Edit the message";8 $lang[' AM_msg_content'] = "Beskjed innhold";9 $lang[' AM_nb_messages'] = "Antall beskjeder å vise på admin forsiden";10 $lang['A M_free_name'] = "Godta brukere å endre sitt navn når de har postet en beskjed";11 $lang[' AM_name_fixed'] = "(fikset)";12 $lang[' AM_message_added'] = "Beskjed lagt til";13 $lang[' AM_message_deleted'] = "Message deleted";14 $lang[' AM_empty_content'] = "Innhold tomt";3 $lang['Messages'] = 'Beskjeder'; 4 $lang['No message'] = 'Ingen beskjeder'; 5 $lang['Messages list'] = 'Beskjed liste'; 6 $lang['Add a message'] = 'Legg til en beskjed'; 7 $lang['Edit the message'] = 'Edit the message'; 8 $lang['Message content'] = 'Beskjed innhold'; 9 $lang['Number of messages to display on the admin main page'] = 'Antall beskjeder å vise på admin forsiden'; 10 $lang['Allow users to modify their name when post a message'] = 'Godta brukere å endre sitt navn når de har postet en beskjed'; 11 $lang['(fixed)'] = '(fikset)'; 12 $lang['Message added'] = 'Beskjed lagt til'; 13 $lang['Message deleted'] = 'Message deleted'; 14 $lang['Content empty'] = 'Innhold tomt'; 15 15 16 16 ?> -
extensions/Admin_Messages/language/pl_PL/plugin.lang.php
r11970 r12356 1 1 <?php 2 2 3 $lang[' AM_messages'] = "Wiadomości";4 $lang[' AM_no_messages'] = "Brak wiadomości";5 $lang[' AM_list_tab'] = "Lista wiadomości";6 $lang['A M_new_tab'] = "Dodaj wiadomość";7 $lang[' AM_edit_tab'] = "Edytuj wiadomości";8 $lang[' AM_msg_content'] = "Zawartość wiadomości";9 $lang[' AM_nb_messages'] = "Liczba wiadomości wyświetlana na stronie głównej admina";10 $lang['A M_free_name'] = "Pozwól użytkownikom zmieniać im nazwy po dodaniu wiadomości";11 $lang[' AM_name_fixed'] = "(ustawione)";12 $lang[' AM_message_added'] = "Wiadomość dodana";13 $lang[' AM_message_deleted'] = "Wiadomość skasowana";14 $lang[' AM_empty_content'] = "Zawartość pusta";3 $lang['Messages'] = 'Wiadomości'; 4 $lang['No message'] = 'Brak wiadomości'; 5 $lang['Messages list'] = 'Lista wiadomości'; 6 $lang['Add a message'] = 'Dodaj wiadomość'; 7 $lang['Edit the message'] = 'Edytuj wiadomości'; 8 $lang['Message content'] = 'Zawartość wiadomości'; 9 $lang['Number of messages to display on the admin main page'] = 'Liczba wiadomości wyświetlana na stronie głównej admina'; 10 $lang['Allow users to modify their name when post a message'] = 'Pozwól użytkownikom zmieniać im nazwy po dodaniu wiadomości'; 11 $lang['(fixed)'] = '(ustawione)'; 12 $lang['Message added'] = 'Wiadomość dodana'; 13 $lang['Message deleted'] = 'Wiadomość skasowana'; 14 $lang['Content empty'] = 'Zawartość pusta'; 15 15 16 16 ?> -
extensions/Admin_Messages/language/ru_RU/plugin.lang.php
r11971 r12356 1 1 <?php 2 2 3 $lang[' AM_messages'] = "Сообщения";4 $lang[' AM_no_messages'] = "Нет сообщений";5 $lang[' AM_list_tab'] = "Список сообщений";6 $lang['A M_new_tab'] = "Добавить сообщение";7 $lang[' AM_edit_tab'] = "Редактировать сообщение";8 $lang[' AM_msg_content'] = "Содержание сообщения";9 $lang[' AM_nb_messages'] = "Количество сообщений для отображения на странице иртерфейса администрирования";10 $lang['A M_free_name'] = "Позволять пользователям изменять имя при отправке сообщения";11 $lang[' AM_name_fixed'] = "(исправлено)";12 $lang[' AM_message_added'] = "Сообщение добавлено";13 $lang[' AM_message_deleted'] = "Сообщение удалено";14 $lang[' AM_empty_content'] = "Пустое сообщение";3 $lang['Messages'] = 'Сообщения'; 4 $lang['No message'] = 'Нет сообщений'; 5 $lang['Messages list'] = 'Список сообщений'; 6 $lang['Add a message'] = 'Добавить сообщение'; 7 $lang['Edit the message'] = 'Редактировать сообщение'; 8 $lang['Message content'] = 'Содержание сообщения'; 9 $lang['Number of messages to display on the admin main page'] = 'Количество сообщений для отображения на странице иртерфейса администрирования'; 10 $lang['Allow users to modify their name when post a message'] = 'Позволять пользователям изменять имя при отправке сообщения'; 11 $lang['(fixed)'] = '(исправлено)'; 12 $lang['Message added'] = 'Сообщение добавлено'; 13 $lang['Message deleted'] = 'Сообщение удалено'; 14 $lang['Content empty'] = 'Пустое сообщение'; 15 15 16 16 ?> -
extensions/Admin_Messages/language/sk_SK/plugin.lang.php
r11889 r12356 1 1 <?php 2 2 3 $lang[' AM_messages'] = "Správy";4 $lang[' AM_no_messages'] = "Žiadne správy";5 $lang[' AM_list_tab'] = "Zoznam správ";6 $lang['A M_new_tab'] = "Pridať správu";7 $lang[' AM_msg_content'] = "Obsah správy";8 $lang[' AM_nb_messages'] = "Počet správ zobrazených na admin stránke";9 $lang['A M_free_name'] = "Povoliť používateľom upravovať ich meno keď poslali správu";10 $lang[' AM_name_fixed'] = "(nemenné)";11 $lang[' AM_message_added'] = "Správa pridaná";12 $lang[' AM_empty_content'] = "Prázdny obsah";13 $lang[' AM_edit_tab'] = 'Opraviť správu';14 $lang[' AM_message_deleted'] = 'Správa vymazaná';3 $lang['Messages'] = 'Správy'; 4 $lang['No message'] = 'Žiadne správy'; 5 $lang['Messages list'] = 'Zoznam správ'; 6 $lang['Add a message'] = 'Pridať správu'; 7 $lang['Message content'] = 'Obsah správy'; 8 $lang['Number of messages to display on the admin main page'] = 'Počet správ zobrazených na admin stránke'; 9 $lang['Allow users to modify their name when post a message'] = 'Povoliť používateľom upravovať ich meno keď poslali správu'; 10 $lang['(fixed)'] = '(nemenné)'; 11 $lang['Message added'] = 'Správa pridaná'; 12 $lang['Content empty'] = 'Prázdny obsah'; 13 $lang['Edit the message'] = 'Opraviť správu'; 14 $lang['Message deleted'] = 'Správa vymazaná'; 15 15 16 16 ?> -
extensions/Admin_Messages/language/sv_SE/plugin.lang.php
r9817 r12356 1 1 <?php 2 2 3 $lang['AM_messages'] = "Meddelanden"; 4 $lang['AM_no_messages'] = "Inga meddelanden"; 5 $lang['AM_list_tab'] = "Meddelanden lista"; 6 $lang['AM_new_tab'] = "Lägg till ett meddelande"; 7 $lang['AM_edit_tab'] = "Redigera meddelandet"; 8 $lang['AM_msg_content'] = "Meddelandets innehåll"; 9 $lang['AM_nb_messages'] = "Antal meddelanden som visas på admin huvudsidan"; 10 11 $lang['AM_free_name'] = "Tillåt användare att ändra sitt namn när ett inlägg görs"; 12 $lang['AM_name_fixed'] = "(FAST)"; 13 $lang['AM_message_added'] = "Meddelande lagts till"; 14 $lang['AM_message_deleted'] = "Message raderat"; 15 $lang['AM_empty_content'] = "Innehållet tomt"; 3 $lang['Messages'] = 'Meddelanden'; 4 $lang['No message'] = 'Inga meddelanden'; 5 $lang['Messages list'] = 'Meddelanden lista'; 6 $lang['Add a message'] = 'Lägg till ett meddelande'; 7 $lang['Edit the message'] = 'Redigera meddelandet'; 8 $lang['Message content'] = 'Meddelandets innehåll'; 9 $lang['Number of messages to display on the admin main page'] = 'Antal meddelanden som visas på admin huvudsidan'; 10 $lang['Allow users to modify their name when post a message'] = 'Tillåt användare att ändra sitt namn när ett inlägg görs'; 11 $lang['(fixed)'] = '(FAST)'; 12 $lang['Message added'] = 'Meddelande lagts till'; 13 $lang['Message deleted'] = 'Message raderat'; 14 $lang['Content empty'] = 'Innehållet tomt'; 16 15 17 16 ?> -
extensions/Admin_Messages/main.inc.php
r10982 r12356 14 14 15 15 // +-----------------------------------------------------------------------+ 16 // 16 // Variables globales AM 17 17 // +-----------------------------------------------------------------------+ 18 18 define('AM_DIR' , basename(dirname(__FILE__))); … … 23 23 24 24 // +-----------------------------------------------------------------------+ 25 // 25 // Triggers 26 26 // +-----------------------------------------------------------------------+ 27 add_event_handler('get_admin_plugin_menu_links', 'AM_admin_menu'); 27 add_event_handler('get_admin_plugin_menu_links', 'AM_admin_menu'); // Lien d'administration 28 28 add_event_handler('loc_begin_page_tail', 'AM_load_admin_messages'); // affichage sur admin 29 29 30 30 31 31 // +-----------------------------------------------------------------------+ 32 // 32 // Fonctions 33 33 // +-----------------------------------------------------------------------+ 34 34 // Lien d'administration 35 35 function AM_admin_menu($menu) { 36 37 38 39 40 36 array_push($menu, array( 37 'NAME' => 'Admin Messages', 38 'URL' => AM_ADMIN 39 )); 40 return $menu; 41 41 } 42 42 43 43 // affichage sur admin 44 44 function AM_load_admin_messages() { 45 46 47 48 49 50 51 52 45 global $template, $page, $conf, $user; 46 47 if (script_basename() == 'admin' AND defined('IN_ADMIN') AND IN_ADMIN 48 AND isset($page['body_id']) AND $page['body_id']=='theAdminPage' 49 AND $page['page'] == 'intro') 50 { 51 include(AM_PATH . 'admin_messages.php'); 52 } 53 53 } 54 54 ?> -
extensions/Admin_Messages/maintain.inc.php
r9786 r12356 4 4 // Configuration par défaut 5 5 define('default_config' , serialize(array( 6 7 6 'nb_messages' => 5, 7 'free_name' => false, 8 8 ))); 9 9 10 10 // Installation 11 11 function plugin_install() { 12 12 global $prefixeTable; 13 13 14 15 16 17 18 19 20 21 22 14 pwg_query("CREATE TABLE `" . $prefixeTable . "admin_messages` ( 15 `id` INT NOT NULL AUTO_INCREMENT , 16 `add_date` DATETIME NOT NULL , 17 `author` VARCHAR( 255 ) NOT NULL , 18 `content` TEXT NULL , 19 PRIMARY KEY ( `id` ) 20 ) DEFAULT CHARSET=utf8;"); 21 22 pwg_query("INSERT INTO " . CONFIG_TABLE . "(param,value,comment) VALUES('admin_messages', '" . default_config . "', 'Parametres du plugin Admin Messages');"); 23 23 } 24 24 25 25 // Désinstallation 26 26 function plugin_uninstall() { 27 27 global $prefixeTable; 28 28 29 30 29 pwg_query("DROP TABLE `" . $prefixeTable . "admin_messages`;"); 30 pwg_query("DELETE FROM " . CONFIG_TABLE . " WHERE `param` = 'admin_messages';"); 31 31 } 32 32 ?> -
extensions/Admin_Messages/template/admin_messages.tpl
r9786 r12356 1 1 {literal} 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 <style type="text/css"> 3 #AM_table { 4 width:100%; 5 } 6 #AM_table td { 7 padding:5px; 8 } 9 #AM_table td:first-child { 10 font-size:0.8em; 11 width:200px; 12 } 13 .categoryActions { 14 float:right; 15 } 16 </style> 17 17 {/literal} 18 18 … … 21 21 22 22 <div class="content"> 23 24 <dt>{'AM_messages'|@translate}</dt>25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 23 <dl style="margin-top:0;"> 24 <dt>{'Messages'|@translate}</dt> 25 <dd> 26 <ul> 27 <form method="post" action="{$AM_ADMIN}-new&redirect=home"> 28 <fieldset> 29 30 {if isset($messages)} 31 <table class="table2" id="AM_table"> 32 33 {foreach from=$messages item=message name=loop} 34 <tr class="{if $smarty.foreach.loop.index is odd}row2{else}row1{/if}"> 35 <td> 36 <b>{$message.AUTHOR}</b> <br> <i>{$message.DATE}</i> 37 </td> 38 <td> 39 <ul class="categoryActions"> 40 {if isset($message.U_DELETE)} 41 <li> 42 <a href="{$message.U_DELETE}" title="{'delete'|@translate}"> 43 <img src="{$themeconf.admin_icon_dir}/plug_delete.png" class="button" alt="{'delete'|@translate}" /> 44 </a> 45 </li> 46 {/if} 47 {if isset($message.U_EDIT)} 48 <li> 49 <a href="{$message.U_EDIT}" title="{'edit'|@translate}"> 50 <img src="{$themeconf.icon_dir}/edit.png" width="16px" class="button" alt="{'edit'|@translate}" /> 51 </a> 52 </li> 53 {/if} 54 </ul> 55 {$message.CONTENT} 56 57 </td> 58 </tr> 59 {/foreach} 60 61 </table> 62 {/if} 63 63 64 65 66 {'AM_no_messages'|@translate}<br>67 64 <div id="AM_link" align="center"> 65 {if !isset($messages)} 66 {'No message'|@translate}<br> 67 {/if} 68 68 69 <a href="{$AM_ADMIN}-new" onclick="jQuery('#AM_form').toggle();jQuery('#AM_link').toggle();return false;">{'AM_new_tab'|@translate}</a>70 71 72 73 74 75 76 77 78 79 80 81 82 69 <a href="{$AM_ADMIN}-new" onclick="jQuery('#AM_form').toggle();jQuery('#AM_link').toggle();return false;">{'Add a message'|@translate}</a> 70 </div> 71 72 <div style="display:none;width:50%;margin:10px 25%;text-align:center;" id="AM_form"> 73 <textarea name="content" rows="4" style="width:100%;"></textarea> 74 <input type="hidden" name="username" value="{$USERNAME}"/> 75 <input class="submit" type="submit" value="{'Submit'|@translate}" name="new_submit"/> 76 </div> 77 78 </fieldset> 79 </form> 80 </ul> 81 </dd> 82 </dl> 83 83 </div>
Note: See TracChangeset
for help on using the changeset viewer.