1 2 3 4 5 6 7 8 9 10 11 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 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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
| **
* 2008 - 2014 DevNet
*
* MODULE PrestaForumGP
*
* @version 4.0
* @author Guillaume PETIT <contact@dev-net.fr>
* @link <a href="http://www.dev-net.fr" target="_blank">http://www.dev-net.fr</a>
* @copyright Copyright (c) permanent, DevNet
* @license Addons PrestaShop license limitation
*
* NOTICE OF LICENSE
*
* Don't use this module on several shops. The license provided by PrestaShop Addons
* for all its modules is valid only once for a single shop.
*}
<!-- MODULE prestaforumgp -->
<div class="gp_forum">
{if !$ListeForums}<h2>{l s='You get no access to the forum.' mod='prestaforumgp'}</h2>{/if}
<div id="gp_forum_bin">
{foreach from=$ListeForums key=key_forum item=value_forum}
<script type="text/javascript">
{literal}
$(document).ready(function() {
$('#description_{/literal}{$key_forum|escape:'intval'}{literal}').hide();
$("#gp_forum_view_info_{/literal}{$key_forum|escape:'intval'}{literal}").mouseover(function(){
$('#description_{/literal}{$key_forum|escape:'intval'}{literal}').slideDown("slow");
});
$("#gp_forum_view_info_{/literal}{$key_forum|escape:'intval'}{literal}").mouseout(function(){
$('#description_{/literal}{$key_forum|escape:'intval'}{literal}').slideUp("slow");
});
});
{/literal}
</script>
<h2>
<span class="gp_forum_upper">{$value_forum.titre|escape:'htmlall':'UTF-8'}</span>
<div class="gp_forum_info_haut_droite">
{if $value_forum.description|escape:'htmlall':'UTF-8'}
<span class="gp_forum_view_info">
<a href="#" id="gp_forum_view_info_{$key_forum|escape:'intval'}">» {l s='More...' mod='prestaforumgp'}</a>
</span>
{/if}
<span class="gp_forum_view_search">
<a href="{Forum_GP_Url gp_do=qw}">» {l s='Search' mod='prestaforumgp'}</a>
</span>
</div>
</h2>
{if $value_forum.description}
<div id="description_{$key_forum|escape:'intval'}" class="gp_forum_descriptions">
<p>{$value_forum.description|nl2br|escape:'htmlall':'UTF-8'}</p>
</div>
{/if}
<div class="gp_forum_themes">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%;" >
<tr>
<th style="width:60px;"> </th>
<th>{l s='Titles' mod='prestaforumgp'}</th>
<th style="width:50px;">{l s='Topics' mod='prestaforumgp'}</th>
<th style="width:50px;">{l s='Posts' mod='prestaforumgp'}</th>
<th style="width:150px;">{l s='Latest post' mod='prestaforumgp'}</th>
</tr>
{if $ListeForums[$key_forum].liste_themes}
{foreach from=$ListeForums[$key_forum].liste_themes key=key_theme item=value_theme}
<tr>
<td class="img-post gp_forum_gauche">
{if $value_theme.dernier_message.id_message}
<a href="{Forum_GP_Url gp_do=t id=$value_theme.id_theme titre=$value_theme.titre}" title="{$value_theme.titre|escape:'htmlall':'UTF-8'}" class="image-hover">
{/if}
{Forum_GP_ImgPostForum img='post' id_theme=$value_theme.id_theme}
{if $value_theme.dernier_message.id_message}
</a>
{/if}
</td>
<td class="gp_forum_gauche">
<strong>
<a href="{Forum_GP_Url gp_do=t id=$value_theme.id_theme titre=$value_theme.titre}" title="{$value_theme.titre|escape:'htmlall':'UTF-8'}" class="gp_link">{$value_theme.titre|escape:'htmlall':'UTF-8'}</a>
</strong><br />
<span class="gp_forum_little">{$value_theme.description|escape:'htmlall':'UTF-8'|truncate:80:"..."|nl2br}</span>
</td>
<td>{$value_theme.nombre_sujets.value|escape:'intval'}</td>
<td>{$value_theme.nombre_messages.value|escape:'intval'}</td>
<td>
{if $value_theme.dernier_message.id_message}
<span class="gp_forum_little">
{dateFormat date=$value_theme.dernier_message.date_message full=1}<br />
{$value_theme.dernier_message.titre_sujet|escape:'htmlall':'UTF-8'|truncate:20:'...':true:true}<br />
{if $value_theme.dernier_message.pseudo}
{$value_theme.dernier_message.pseudo|escape:'htmlall':'UTF-8'}
{else}
{$value_theme.dernier_message.firstname|escape:'htmlall':'UTF-8'|capitalize:true} {$value_theme.dernier_message.lastname|escape:'htmlall':'UTF-8'}{if $value_theme.dernier_message.lastname}.{/if}
{/if}
</span>
<a href="{Forum_GP_Url
gp_do=s
id=$value_theme.dernier_message.id_sujet
m=$value_theme.dernier_message.id_message
titre=$value_theme.dernier_message.titre_sujet}" class="image-hover">
{Forum_GP_ImgPost
img='post-last'
date_post_unix=$value_theme.dernier_message.date_message_unix
id_sujet=$value_theme.dernier_message.id_sujet}
</a>
{else}
{l s='No post' mod='prestaforumgp'}
{/if}
</td>
</tr>
{/foreach}
{else}
<tr>
<td colspan="5">{l s='No forum' mod='prestaforumgp'}</td>
</tr>
{/if}
</table>
</div>
{/foreach}
</div>
</div>
<!-- /MODULE prestaforumgp --> |
Partager