fonction hide pour les forums ( phpbb )

PHP-Nuke France - CE -> Tutoriels

Auteur: killer_Boy MessagePosté le: 08.10.2006, 00:31:37    Sujet du message: fonction hide pour les forums ( phpbb )

Ouvrez

Citation:
includes/page_header.php


Recherchez :

Citation:
if ( !empty($userdata['user_popup_pm']) )
{
$template->assign_block_vars('switch_enable_pm_popup', array());
}
}

Ajoutez ensuite :

Citation:

$sql = 'SELECT * FROM ' . USER_GROUP_TABLE . '
WHERE group_id=1
AND user_id=' . $userdata['user_id'] . '
AND user_pending=0
LIMIT 1';

$is_vip = 0;

if (($result = $db->sql_query($sql)) != FALSE)
{
$is_vip = $db->sql_numrows($result);
$db->sql_freeresult($result);
}

if ($is_vip == 0)
{
$template->assign_block_vars('non_vips_only', array());
}

#change group_id=1 to whatever your group ID is#


Ouvrez
Citation:

templates/SubSilver/any.tpl



Ajoutez ensuite :
.
Citation:

<!-- BEGIN non_vips_only -->
#content you want others to see goes here.
<!-- END non_vips_only -->




enregistrez et uploadé
source

Citation:

Mod Title: Hide Content By Group Id
Mod Version: 1.0.0
Author: John Olson (jrcoololson@yahoo.com

Description:
This mod will show only the content you want to normal users and not to the group you select. (Example: If you have a donate button, and a group you can hide that button from that group and it will only appear for other users.)

Portions of this script were inspired/written by
other people. I can only claim partial credit.
Installation Level: Easy
Installation Time: 1-2 Minutes
Files To Edit: 2
#includes/page_header.php
templates/SubSilver/any.tpl

Auteur: JeanClaudeLocalisation: GAP MessagePosté le: 08.10.2006, 10:45:30    Sujet du message:

Merci Killer pour ta proposition !
Ce qui serait encore plus sympa c'est peut être un lien pour voir une démo.
Je passe ce post dans le tutos.



PHP-Nuke France - CE -> Tutoriels

Toutes les heures sont au format GMT + 2 Heures

Page 1 sur 1


>> Fermer cette Page <<