Affiche les derniers membres inscrits sur le forum. Par defaut les 5 dernier.(Possibilité de réglage)
[attachmentid=40]
Ce bloc a était addapté depuis un bloc pour MyIbPortal créé par Simous.
Etape 1 : Ouvrir lang/**/lang_portal.php (Répéter l'opération pour chaque répertoire de fichier langue)
Chercher
CODE
);
?>
CODE
'last_join_member_title' => "Dernier membres inscrit",
Enregistrer et Fermer lang/**/lang_portal.php
Etape 2 : Ouvrir sources/ipbportal.php
Chercher
CODE
$this->site_bits['affiliates'] = $this->_show_affiliates();
Ajouter en-dessousCODE
$this->site_bits['last_join_member'] = $this->_show_last_join_member();
Chercher
CODE
}
?>
Ajouter au-dessus?>
CODE
/*-------------------------------------------------------------------------*/
// Bloc Derniers membres inscrits
/*-------------------------------------------------------------------------*/
function _show_last_join_member()
{
global $ibforums, $DB, $std, $print;
if ( ! $ibforums->vars['csite_last_join_member_show'] )
{
return;
}
$DB->simple_construct( array( 'select' => 'id, joined, name',
'from' => 'members',
'order' => 'joined DESC',
'limit' => array( 0, $ibforums->vars['csite_last_join_member_nb'] ) ) );
$DB->simple_exec();
$html = "";
while( $member = $DB->fetch_row() ) {
$mlink = $ibforums->base_url."&act=Profile&CODE=03&MID=".$member['id'];
$date = $std->get_date($member['joined'], 'LONG', $ibforums->vars['csite_last_join_member_relative']+1 );
$html .= $this->html->tmpl_last_join_member_row($mlink, $date, $member['name']);
}
return $this->html->tmpl_last_join_member($html);
}
// Bloc Derniers membres inscrits
/*-------------------------------------------------------------------------*/
function _show_last_join_member()
{
global $ibforums, $DB, $std, $print;
if ( ! $ibforums->vars['csite_last_join_member_show'] )
{
return;
}
$DB->simple_construct( array( 'select' => 'id, joined, name',
'from' => 'members',
'order' => 'joined DESC',
'limit' => array( 0, $ibforums->vars['csite_last_join_member_nb'] ) ) );
$DB->simple_exec();
$html = "";
while( $member = $DB->fetch_row() ) {
$mlink = $ibforums->base_url."&act=Profile&CODE=03&MID=".$member['id'];
$date = $std->get_date($member['joined'], 'LONG', $ibforums->vars['csite_last_join_member_relative']+1 );
$html .= $this->html->tmpl_last_join_member_row($mlink, $date, $member['name']);
}
return $this->html->tmpl_last_join_member($html);
}
Enregistrer et Fermer sources/ipbportal.php
Etape 3 : Aller dans l'ACP de votre forum
Etape 3.1 : Dans System Settings > View All General Setting > Import an XML settings file
Puis Puis importer les settings contenue dans le fichier [attachmentid=61]
Configuré les options du bloc dans les paramétres du portail.
Etape 3.2 :Dans Skins & Templates > Skin Manager > IPB Default Skin > Edit Root Skin Template HTML
Puis IPB Portal > csite_skeleton_template
Ajouter
CODE
<!--CS.TEMPLATE.LAST_JOIN_MEMBER-->
Entre <!--Main Content--> et <!--End Main Content-->Valider en cliquant sur Save Template Bit(s)
Etape 3.3.1 :Puis toujours dans IPB Portal cliquer sur Add Template Bit
QUOTE
New Template Bit Name : tmpl_last_join_member
New Template Bit Incoming Data Variables : $html
Add New Template Bit :
Valider en cliquant sur Save Template Bit(s)New Template Bit Incoming Data Variables : $html
Add New Template Bit :
CODE
<br />
<div class="borderwrap">
<div class="maintitle"><{CAT_IMG}> {ipb.lang['last_join_member_title']}</div>
<div class="tablepad">
<table width='100%'>
$html
</table>
</div>
</div>
<div class="borderwrap">
<div class="maintitle"><{CAT_IMG}> {ipb.lang['last_join_member_title']}</div>
<div class="tablepad">
<table width='100%'>
$html
</table>
</div>
</div>
Etape 3.3.2 :Puis toujours dans IPB Portal cliquer sur Add Template Bit
QUOTE
New Template Bit Name : tmpl_last_join_member_row
New Template Bit Incoming Data Variables : $link, $date, $name
Add New Template Bit :
Valider en cliquant sur Save Template Bit(s)New Template Bit Incoming Data Variables : $link, $date, $name
Add New Template Bit :
CODE
<tr>
<td class='row2' width='50%'><a href="$link">$name</a></td>
<td class='row2' width='50%' align='right' style="font-size: 8pt" >$date</td>
</tr>
<td class='row2' width='50%'><a href="$link">$name</a></td>
<td class='row2' width='50%' align='right' style="font-size: 8pt" >$date</td>
</tr>
FIN