Posted: Fri Dec 19, 2003 9:35 pm
Tried installing this mod with Easymod on a heavily modded forum... and I spent the next 45 mins trying to clean up the disaster that ensued. every file that it modified was filled with syntax errors.
Couldn't insert row in forums table
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '0, 0, 0, 0, 0, 1, 1, 3, 3, 1, 1)' at line 2
INSERT INTO phpbb_forums (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, forum_icon, prune_enable, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_sticky, auth_announce, auth_vote, auth_pollcreate) VALUES ('2', 'Test Forum 2', 1, 'Testing', 20, 0, '/templates/subSilver/images/forumicons/forum-23.gif' 0, 0, 0, 0, 0, 1, 1, 3, 3, 1, 1)
Line : 402
File : W:\www\forum\admin\admin_forums.php
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap"> {L_FORUM} </th>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
colspan="2"
#
#-----[ REPLACE WITH ]------------------------------------------
#
colspan="3"
#
#-----[ FIND ]------------------------------------------
#
<td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
colspan="2"
#
#-----[ REPLACE WITH ]------------------------------------------
#
colspan="3"
#
#-----[ FIND ]------------------------------------------
#
<td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<td class="row1" align="center" valign="middle" height="50">{catrow.forumrow.FORUM_ICON_IMG}</td>
INSERT INTO phpbb_forums (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, forum_icon, prune_enable, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_sticky, auth_announce, auth_vote, auth_pollcreate) VALUES ('2', 'Test Forum 2', 1, 'Testing', 20, 0, '/templates/subSilver/images/forumicons/forum-23.gif', 0, 0, 0, 0, 0, 1, 1, 3, 3, 1, 1)
Code: Select all
VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";
#
#-----[ IN_LINE FIND ]------------------------------------------
#
, " . intval($HTTP_POST_VARS['forumstatus']) . "
#
#-----[ AFTER,ADD ]------------------------------------------
#
, '" . str_replace("\'", "''", $HTTP_POST_VARS['forumicon']) . "'
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap"> {L_FORUM} </th> (In line 18)
#
#-----[ IN-LINE FIND ]------------------------------------------
#
colspan="2"
#
#-----[ REPLACE WITH ]------------------------------------------
#
colspan="3"
#
#-----[ FIND ]------------------------------------------
#
<td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td> (In line 25)
#
#-----[ IN-LINE FIND ]------------------------------------------
#
colspan="2"
#
#-----[ REPLACE WITH ]------------------------------------------
#
colspan="3"
#
#-----[ FIND ]------------------------------------------
#
<td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td> (In line 30)
#
#-----[ AFTER, ADD ]------------------------------------------
#
<td class="row1" align="center" valign="middle" height="50">{catrow.forumrow.FORUM_ICON_IMG}</td>
Code: Select all
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
<tr>
<td align="left" valign="bottom"><span class="gensmall">
<!-- BEGIN switch_user_logged_in -->
{LAST_VISIT_DATE}<br />
<!-- END switch_user_logged_in -->
{CURRENT_TIME}<br /></span><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
<td align="right" valign="bottom" class="gensmall">
<!-- BEGIN switch_user_logged_in -->
<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
<!-- END switch_user_logged_in -->
<a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td>
</tr>
</table>
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<!-- BEGIN catrow -->
<tr>
<td class="catLeft" colspan="5" ><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
<!--- <td class="rowpic" colspan="3" align="right"> </td> --->
</tr>
<tr>
<th colspan="3" class="thCornerL" height="25" nowrap="nowrap"> {L_FORUM} </th>
<th width="50" class="thTop" nowrap="nowrap"> {L_TOPICS} </th>
<th width="50" class="thTop" nowrap="nowrap"> {L_POSTS} </th>
<th class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th>
</tr>
<!-- BEGIN forumrow -->
<tr>
<td class="row1" align="center" valign="middle" ><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="25" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
<td class="row1" width="100%" ><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />
</span> <span class="genmed">{catrow.forumrow.FORUM_DESC}
</span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>
<td class="row2" align="center" valign="middle" ><span class="gensmall">{catrow.forumrow.TOPICS}</span></td>
<td class="row2" align="center" valign="middle" ><span class="gensmall">{catrow.forumrow.POSTS}</span></td>
<td class="row2" align="center" valign="middle" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
</tr>
<!-- END forumrow -->
<!-- END catrow -->
</table>
<table width="100%" cellspacing="0" border="0" align="center" cellpadding="2">
<tr>
<td align="left"><span class="gensmall"><a href="{U_MARK_READ}" class="gensmall">{L_MARK_FORUMS_READ}</a></span></td>
<td align="right"><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
</table>
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="28"><span class="cattitle"><a href="{U_VIEWONLINE}" class="cattitle">{L_WHO_IS_ONLINE}</a></span></td>
</tr>
<tr>
<td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span></td>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} [ {L_WHOSONLINE_ADMIN} ] [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
</tr>
</table>
<table width="100%" cellpadding="1" cellspacing="1" border="0">
<tr>
<td align="left" valign="top"><span class="gensmall">{L_ONLINE_EXPLAIN}</span></td>
</tr>
</table>
<!-- BEGIN switch_user_logged_out -->
<form method="post" action="{S_LOGIN_ACTION}">
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="28"><a name="login"></a><span class="cattitle">{L_LOGIN_LOGOUT}</span></td>
</tr>
<tr>
<td class="row1" align="center" valign="middle" height="28"><span class="gensmall">{L_USERNAME}:
<input class="post" type="text" name="username" size="10" />
{L_PASSWORD}:
<input class="post" type="password" name="password" size="10" maxlength="32" />
{L_AUTO_LOGIN}
<input class="text" type="checkbox" name="autologin" />
<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" />
</span> </td>
</tr>
</table>
{S_HIDDEN_FIELDS} </form>
<!-- END switch_user_logged_out -->
<br clear="all" />
<table cellspacing="3" border="0" align="center" cellpadding="0">
<tr>
<td width="20" align="center"><img src="templates/zoneSilver/images/folder_new.gif" alt="{L_NEW_POSTS}"/></td>
<td><span class="gensmall">{L_NEW_POSTS}</span></td>
<td> </td>
<td width="20" align="center"><img src="templates/zoneSilver/images/folder.gif" alt="{L_NO_NEW_POSTS}" /></td>
<td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
<td> </td>
<td width="20" align="center"><img src="templates/zoneSilver/images/folder_lock.gif" alt="{L_FORUM_LOCKED}" /></td>
<td><span class="gensmall">{L_FORUM_LOCKED}</span></td>
</tr>
</table>
Code: Select all
<td class="catLeft" colspan="5" ><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
Code: Select all
colspan="5"
Code: Select all
colspan="6"
Code: Select all
<td class="row1" align="center" valign="middle" ><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="25" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
Code: Select all
<td class="row1" align="center" valign="middle" >{catrow.forumrow.FORUM_ICON_IMG}</td>
JohanD wrote: Can this MOD be used to place an image in each forum to replace the forum name?
Code: Select all
index_body.tpl
Code: Select all
<td class="row1" width="100%" height="50"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />
</span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
</span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>
Code: Select all
<span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />
</span>
ycl6 wrote:JohanD wrote:Can this MOD be used to place an image in each forum to replace the forum name?
Yes you can, simply remove the forum name bit from the tpl. The icon itself will display forum name when mouse-over
~Mac
Code: Select all
########################################################
## MOD Title: Forum Icon with ACP Control
## MOD Version: 1.0.3
## MOD Author: Mac (Y.C. LIN) < ycl_6@sinamail.com > http://endless-tw.net
##
## MOD Description: This mod allow admin to give each forum a icon in the ACP
## Icons will show on index
##
## Installation Level: Easy
## Installation Time: 3 Minutes
##
## Files To Edit: 8
## index.php
## viewforum.php
## admin/admin_forums.php
## language/lang_english/lang_admin.php
## templates/subSilver/admin/forum_admin_body.tpl
## templates/subSilver/admin/forum_edit_body.tpl
## templates/subSilver/index_body.tpl
## templates/subSilver/viewforum_body.tpl
##
## Included Files: n/a
##
#################################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## Set your forum icon image paths as those rank images
##
## If you wish to using the LIST BOX option,
## you have to follow the instruction in EXTRA folder. Please DO NOT using the below code!
## Both options CANNOT be used together.
##
##############################################################
## MOD History:
##
## 2003-12-01 - Version 1.0.3
## - Forum icon selectable using list box (Option 2)
## - Add forum icon image to Forum Administration main panel
## - Add forum icon image to corresponding the viewforum.php
##
## 2003-11-15 - Version 1.0.2
## - Corrections were made for phpBB MOD Database submission
##
## 2003-11-08 - Version 1.0.1
## - Checked for 2.0.6 competibility, no change in coding
##
## 2003-11-04 - Version 1.0.0
## - Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################