[2.0.19] Forum Icon with ACP Control

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
36
60%
Very Good
14
23%
Good
6
10%
Fair
2
3%
Poor
2
3%
 
Total votes: 60

metalhedd
Registered User
Posts: 12
Joined: Fri Mar 07, 2003 7:04 pm

Post by metalhedd »

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.
It's a poodle.. Put it on 'delecate'

gurukast
Registered User
Posts: 230
Joined: Fri Aug 29, 2003 4:13 pm

Post by gurukast »

ahh thats why theres the preview function ;)

User avatar
bjjbeijing
Registered User
Posts: 29
Joined: Tue Dec 16, 2003 5:48 pm

Post by bjjbeijing »

hi guys,

i've also got database questions... i just wanted to make sure what i was doing before i screw up my board totally...

ALTER TABLE `phpbb2_forums` ADD `forum_icon` VARCHAR( 255 ) default NULL;

i'm using phpmyadmin 3.xx. Do I just locate my database and then click on the phpbb_forums?

I come to a page where it lists a bunch of fields in a vertical table. At the bottom, it gives me choices like:

Structure
Browse
SQL
Select
Insert
Export
Operations
Empty
Drop

Then below that, there is a text field for me to enter some text. The description for the text field reads:

Run SQL query/queries on database baxirous_xmb5

Do I just type into the text field the following?

ALTER TABLE `phpbb2_forums` ADD `forum_icon` VARCHAR( 255 ) default NULL;

Sorry to be such a pest...

Thanks again!

Andy
andy@baxiroushu.com

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

bjjbeijing,

At the top of every page you should have a row of funtions, one would be SQL, click on that will bring you to a page where you can key in your SQL query.

Because the SQL query in the installation is completed wit the table name, you don't have to go into the specific table to perform the action. But either way, as long as you key-in the query in the SQL query box. you should be fine.

The only thing to note is your table prefix. X_forums where X is the prefix. In my example, I uses phpbb2_forums.

~Mac

User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:

User avatar
bjjbeijing
Registered User
Posts: 29
Joined: Tue Dec 16, 2003 5:48 pm

thanks mac

Post by bjjbeijing »

hi mac,

just wanted to send you word that everything worked out fine! great work on the MOD!

thanks again,

Andy

FrostBurn
Registered User
Posts: 7
Joined: Thu Jan 15, 2004 12:22 pm

Problems installing the MOD

Post by FrostBurn »

I have had a couple of problems installing this MOD on a Fresh installation of phpbb 2.0.6. This is the first MOD i will installing on this Fresh Copy.

When I add this SQL Query using phpMyAdmin using the corrent prefix I got this error below.
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


The lines mentioned in "FIND" do not exsist in the respective .tpl files.
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/index_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</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>

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

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)


FrostBurn, looking through your error message, you have a slight error in your sql statement. In the above code, a red-colored comma is highlighted to show where is the problem you are having (missing comma)

In the installation, be extra careful about the following step

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']) . "'
as for your next question, I don't know why you can't find those lines :?:
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/index_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</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>


~Mac

ren honjo
Registered User
Posts: 1
Joined: Sun Jan 18, 2004 2:53 pm

Post by ren honjo »

Help!!! I've tried to install the mod but in my template folders i have the ZoneSilver. This is my index_body.tpl

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">&nbsp;</td> --->
  </tr>
  <tr> 
	<th colspan="3" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th>
	<th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
	<th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th>
	<th class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</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} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {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" />
		&nbsp;&nbsp;&nbsp;{L_PASSWORD}: 
		<input class="post" type="password" name="password" size="10" maxlength="32" />
		&nbsp;&nbsp; &nbsp;&nbsp;{L_AUTO_LOGIN} 
		<input class="text" type="checkbox" name="autologin" />
		&nbsp;&nbsp;&nbsp; 
		<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>&nbsp;&nbsp;</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>&nbsp;&nbsp;</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>

it's different from subSilver! Help i can't modify at right my board[/code]

JohanD
Registered User
Posts: 9
Joined: Tue Jan 20, 2004 9:07 pm

Post by JohanD »

Can this MOD be used to place an image in each forum to replace the forum name?

The icons are there so it shouldn't be that difficult. Problem is that I don't know chips about PHP and stuff..

Any suggestions?

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

ren honjo
FIND

Code: Select all

<td class="catLeft" colspan="5" ><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
IN-LINE FIND

Code: Select all

colspan="5"
REPLACE WITH

Code: Select all

colspan="6"
FIND

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>
AFTER ADD

Code: Select all

<td class="row1" align="center" valign="middle" >{catrow.forumrow.FORUM_ICON_IMG}</td>
~Mac

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

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

OPEN

Code: Select all

index_body.tpl
FIND

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>
IN-LINE FIND

Code: Select all

<span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />
	  </span>
DELETE THE ABOVE CODE

~Mac

JohanD
Registered User
Posts: 9
Joined: Tue Jan 20, 2004 9:07 pm

Post by JohanD »

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


Thanks Mac!

But.. I think I didn't make myself very clear.. :?

Now the icons show up in the index page.
When a user goes to a forum from the index page the forum page will load and the forum name is showing as a link in the top left corner.
What I like to see is to replace this forum name with an image, with the link if possible.
As long as a user is viewing threads in this particular forum the image has to be seen in the left top corner.

Example,

Forum link from index page,

Image

Current view when entering a forum,

Image

View with image the way I think it would look nice :wink: ,

Image

8MM
Registered User
Posts: 75
Joined: Thu Jan 15, 2004 8:57 am
Contact:

oi help me!!!! LOL

Post by 8MM »

I have installed this hack but there is no upload button


What do i put in here and where do i upload the images


AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

:P

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

JohanD,

I got what you mean now. Yes the latest version (V1.0.3) does have the forum icon appear in viewforum. I've have it submitted to DB for verification, but it has not been updated yet. You can find the latest version in the thread in BETA board

http://www.phpbb.com/phpBB/viewtopic.php?t=149002

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 
##############################################################
~Mac

Post Reply

Return to “[2.0.x] MOD Database Releases”