Pagina 1 van 1

Banlist, link niet in overall_header

Geplaatst: 17 mar 2005, 21:56
door Muiter
Ik heb deze mod maar hij wordt niet zichtbaar in mijn overall_header, alleen het icoontje Afbeelding en die loopt ook niet door naar een nieuwe pagina.
http://www.modelautoforum.nl/forum

Code: Selecteer alles

#########################################################################
## 	Title: Banlist For phpBB2 ....
## 	Author: ThE DrAgOn'S  <orna_h@012.net.il> 
## 	Description : This Mod Will Give You a Page Of All The User's That  
##	Have Been Ban From Your Board  ....... Including Reason Option And 
##	"Band by" & "Band date" <@:-) 
##		
##	Mod Version : 1.0.3 Finel !
##
## 	Installation Level: 	Easy
## 	Installation Time: 	7 Minutes
##
## 	Files To Edit: 5
## 	language/lang_english/lang_main.php
##	admin/admin_user_ban.php
##	includes/page_header.php
##	templates/SubSilver/user_ban_body.tpl
##	templates/SubSilver/overall_header.tpl
##
## 	Included Files: 4
##	banlist.php
##	templates/SubSilver/banlist_body.tpl
##	templates/SubSilver/images/icon_mini_out.gif
##	ban_update.php
##
#########################################################################
##
## 	Author Note ::
##
##	Copyright's © ThE DrAgOn'S, 2003
##
##	For Any Concerns 	Please Contact Me At orna_h@012.net.il Or Icq 2233432
##       
##           Spicel Thanx To Acyd Burn, And Morpheus2matrix For Helping Me 
##
#########################################################################
##
## 	 Installation Note:
##	 First Upload banlist.php To phpBB2/ 
##           Then Upload banlist_body.tpl To templates/subsilver/banlist_body.tpl
##	 And templates/subsilver/images/icon_mini_out.gif
##
#########################################################################

#
#-----[ First Upload ... ]-------------------------------------
#

ban_update.php To /phpBB2

And Run It In Order To Run It Go To Your Internet Explorer And 
In www.yourdomin.com/phpbb2/index.php Just Do 
www.yourdomin.com/phpbb2/ban_update.php Dont Forget 
To Delete The File Once You Done 

#
#-----[ OPEN ]-------------------------------------
#

admin/admin_user_ban.php

#
#-----[ FIND ]--------------------------------------
#

$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_userid)
VALUES (" . $user_list[$i] . ")";

#
#-----[ REPLACE BY ]-------------------------
#

$sql = "SELECT username FROM " . USERS_TABLE . " WHERE user_id = " . $user_list[$i]; 
if (!($result = $db->sql_query($sql))) 
{ 
        message_die(GENERAL_ERROR, 'Unable to get username', '', __LINE__, __FILE__, $sql); 
} 

$row = $db->sql_fetchrow($result); 
$user_name = trim($row['username']); // for mssql compatibility 

$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_userid, user_name, reason, baned_by, date, time) VALUES (" . $user_list[$i] . ", '" . addslashes($user_name) . "', '" . addslashes($reason) . "', '" . addslashes($userdata['username']) . "', '". date("m.d.y") . "', '".date("H:i")."')";

#
#-----[ FIND ]--------------------------------------
#

'L_USERNAME' => $lang['Username']

#
#-----[ AFTER ADD ]-------------------------------------
#

'L_REASON' => $lang['Reason'],

#
#-----[ OPEN ]---------------------------------------------
#

includes/page_header.php

#
#-----[ FIND ]------------------------------------------------
#

$template->assign_vars(array(

#
#-----[ AFTER ADD ]-------------------------------------
#

'BAN_NAME' => $lang['Ban_Name'],
'BAN_REASON' => $lang['Reason'],
'BAN_BY' => $lang['Ban_By'],
'BAN_DATE' => $lang['Ban_Date'],
'L_BAN' => $lang['Ban'],
'U_BAN' => append_sid('banlist.'.$phpEx),

#
#-----[ OPEN ]-------------------------------------
#

templates/subsilver/user_ban_body.tpl

#
#-----[ FIND ]-------------------------------------
#

<tr>
<td class="row1">{L_USERNAME}:</td>
<td class="row2"><input type="text" class="post" name="username" maxlength="50" size="20" /> <input type="hidden" name="mode" value="edit" />{S_HIDDEN_FIELDS} <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></td>
</tr>

#
#-----[ ADD AFTER ]-------------------------------------
#

<tr>
<td class="row1">{L_REASON}:</td>
<td class="row2"><input type="text" class="post" name="reason" maxlength="75" size="35"></td>
</tr>

#
#-----[ OPEN ]-------------------------------------
#

language/lang_english/lang_main.php

#
#-----[ FIND ]----------------------------------------
#

//
// Common, these terms are used
// extensively on several pages
//

#
#-----[ ADD AFTER ]----------------------------------------
#

$lang['Ban'] = "Ban List";
$lang['Ban_Name'] = "User Name";
$lang['Reason'] = "Ban Reason";
$lang['Ban_By'] = "Ban By : ";
$lang['Ban_Date'] = "Ban Time ";

#
#-----[ FIND ]----------------------------------------
#

$lang['Memberlist'] = 'Memberlist';

#
#-----[ AFTER ADD ]-----------------------------
#

$lang['Banlist'] = 'Banlist';

#
#-----[ OPEN ]--------------------------------------
#

templates/subsilver/overall_header.tpl

#
#-----[ FIND ]----------------------------------------
#

&nbsp; &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />
{L_MEMBERLIST}</a>&nbsp;</span></td>

#
#-----[ BEFORE ADD ]-----------------------------
#

&nbsp;<a href="{U_BANLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_out.gif" width="12" height="13" border="0" alt="{L_BANLIST}" hspace="3" />{L_BANLIST}</a></span><span class="mainmenu">&nbsp; &nbsp;

#---------[ Save Close All Files ]-------------------------
#
# EoM
overall_header:

Code: Selecteer alles

						<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_PORTAL}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{L_HOME}" hspace="3" />{L_HOME}</a>&nbsp;&nbsp;</span><span class="mainmenu">&nbsp; &nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu">&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp; &nbsp;<a href="{U_BANLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_out.gif" width="12" height="13" border="0" alt="{L_BANLIST}" hspace="3" />{L_BANLIST}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp; &nbsp;<a href="{U_FORUM_TOUR}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FORUM_TOUR}" hspace="3" />{L_FORUM_TOUR}</a></span><span class="mainmenu">&nbsp;
Iemand een idee?

Geplaatst: 17 mar 2005, 22:38
door Luuk
Controleer eens of je de veranderingen in includes/page_header.php wel goed hebt gedaan.

Geplaatst: 18 mar 2005, 06:24
door Muiter
Luuk schreef:Controleer eens of je de veranderingen in includes/page_header.php wel goed hebt gedaan.
Die heb ik van de mod overgenomen, of het goed in de mod staat is denk ik de vraag?

Geplaatst: 18 mar 2005, 09:15
door Bischke
En waar kun je die mods downloaden ? ik zou die ook graag willen hebben.

Geplaatst: 18 mar 2005, 09:42
door Paul
Heb je ook de lang wijzegingen doorgevoerd in lang_main.php?(Van alle talen :D)

Geplaatst: 18 mar 2005, 15:16
door Luuk
Maak van

Code: Selecteer alles

<a href="{U_BANLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_out.gif" width="12" height="13" border="0" alt="{L_BANLIST}" hspace="3" />{L_BANLIST}</a>
eens

Code: Selecteer alles

<a href="{U_BAN}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_out.gif" width="12" height="13" border="0" alt="{L_BAN}" hspace="3" />{L_BAN}</a>

Geplaatst: 18 mar 2005, 17:07
door Muiter
Bischke schreef:En waar kun je die mods downloaden ? ik zou die ook graag willen hebben.
Zie phphacks.com.
paulus schreef:Heb je ook de lang wijzegingen doorgevoerd in lang_main.php?(Van alle talen :D)
Uiteraard, het eerste wat ik gechecked, of het probleem ook bij andere talen bestond.
Luuk schreef:Maak van

Code: Selecteer alles

<a href="{U_BANLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_out.gif" width="12" height="13" border="0" alt="{L_BANLIST}" hspace="3" />{L_BANLIST}</a>
eens

Code: Selecteer alles

<a href="{U_BAN}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_out.gif" width="12" height="13" border="0" alt="{L_BAN}" hspace="3" />{L_BAN}</a>
:thumb:
Maar wat doet dan:

Code: Selecteer alles

$lang['Banlist'] = 'Banlist';
De link werkt nu maar de pagina (banlist.php) doet vreemd.

Geplaatst: 18 mar 2005, 17:14
door Bee
Dat zit denk ik in de templatefile...

Geplaatst: 08 mei 2005, 20:47
door Muiter
Ik heb nog steeds het probleem dat een aantal variabelen niet in de database worden opgenomen.

Dit heb ik toegevoegd:

Code: Selecteer alles

$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_userid, user_name, reason, baned_by, date, time) VALUES (" . $user_list[$i] . ", '" . addslashes($user_name) . "', '" . addslashes($reason) . "', '" . addslashes($userdata['username']) . "', '". date("m.d.y") . "', '".date("H:i")."')";
Dit staat in mijn database:

Code: Selecteer alles

CREATE TABLE `phpbb_banlist` (
  `ban_id` mediumint(8) unsigned NOT NULL auto_increment,
  `ban_userid` mediumint(8) NOT NULL default '0',
  `user_name` varchar(50) NOT NULL default '',
  `reason` varchar(75) NOT NULL default '',
  `baned_by` varchar(50) NOT NULL default '',
  `date` varchar(8) NOT NULL default '',
  `time` varchar(5) NOT NULL default '',
  `ban_ip` varchar(8) NOT NULL default '',
  `ban_email` varchar(255) default NULL,
  PRIMARY KEY  (`ban_id`),
  KEY `ban_ip_user_id` (`ban_ip`,`ban_userid`)
) TYPE=MyISAM AUTO_INCREMENT=4 ;