[MODDB] Forum Icon with ACP Control [ Latest: 1.0.7 ]

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

[MODDB] Forum Icon with ACP Control [ Latest: 1.0.7 ]

Post by ycl6 »

Code: Select all

######################################################## 
## MOD Title:		Forum Icon with ACP Control (Default)
## MOD Version:		1.0.7
## MOD Author:		Mac (Y.C. LIN) < ycl6@users.sourceforge.net > http://macphpbbmod.sourceforge.net/
##
## MOD Description:	This mod allow admin to give each forum a icon in the ACP
##			Icons will show on index, viewforum and viewtopic
## 
## Installation Level:	Easy 
## Installation Time:	10 Minutes 
##
## Files To Edit:	10
##	index.php
##	viewforum.php
##	viewtopic.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
##	templates/subSilver/viewtopic_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:
##	Tested on 2.0.10. Can be used in 2.0.6+
##
##	If you wish to using the LIST BOX option,
##	you have to follow the instruction in Forum_Icon_ListBox_en.txt. 
##	Please DO NOT using the below code! Both options CANNOT be used together.
## 
############################################################## 
## MOD History: 
##
##   2003-11-04 - Version 1.0.0
##      - Initial Release
##
##   2003-11-08 - Version 1.0.1
##      - Checked for 2.0.6 competibility, no change in coding
##
##   2003-11-15 - Version 1.0.2
##      - Corrections were made for phpBB MOD Database submission
##
##   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 viewforum.php
##
##   2004-02-11 - Version 1.0.4
##      - Fix ListBox no-picture problem when icon is slected for the first time
##		People using the default option DOES NOT need to upgrade
##
##   2004-03-13 - Version 1.0.5
##      - Fix ListBox no-picture problem when create new forum
##		People using the default option DOES NOT need to upgrade
##
##   2004-05-29 - Version 1.0.6
##      - Corrections in MOD template were made for phpBB MOD Database submission
##
##   2004-08-15 - Version 1.0.7
##	- Add forum icon image to viewtopic.php
##	- Change in lang_admin.php
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################

:idea: Download: Forum Icon with ACP Control

:idea: Screenshots: In the download package

=====
Ok, V1.0.6 has now been officially released here
http://www.phpbb.com/phpBB/viewtopic.ph ... highlight=
=====

~Mac
Last edited by ycl6 on Sun Aug 15, 2004 6:22 am, edited 10 times in total.
User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

if you planned to upload your MOD to the MOD DB, you should remove this from the header :

Code: Select all

## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites 
:wink:


Then,
Only tested on 2.0.4, will update to 2.0.6 compatible in later version


Again, make it compatible with phpBB 2.0.6 first, test it and then, upload it :wink:
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:
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

Has just submitted to mod db :wink:

~Mac
Tel
Registered User
Posts: 158
Joined: Mon Apr 28, 2003 5:33 pm
Location: UK

Post by Tel »

I'm getting this error:

Parse error: parse error, unexpected ';'
admin_forums.php
Line 349

I think line 349 is this bit of code:

'DESCRIPTION' => $forumdesc, // Forum Icon MOD
'ICON' => ( $forumicon ) ? $forumicon : '', // Forum Icon MOD
'ICON_DISPLAY' => ( $forumicon ) ? '<img src="../' . $forumicon . '" />' : '' // Forum Icon MOD
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

Tel wrote: 'DESCRIPTION' => $forumdesc, // Forum Icon MOD
'ICON' => ( $forumicon ) ? $forumicon : '', // Forum Icon MOD
'ICON_DISPLAY' => ( $forumicon ) ? '<img src="../' . $forumicon . '" />' : '' // Forum Icon MOD
)

be careful about this part, the closing bracker ")" must be in the next line, not behind "// Forum Icon MOD"

~Mac
Tel
Registered User
Posts: 158
Joined: Mon Apr 28, 2003 5:33 pm
Location: UK

Post by Tel »

This is how the code looks in file:

Code: Select all

'DESCRIPTION' => $forumdesc, // Forum Icon MOD
				'ICON' => ( $forumicon ) ? $forumicon : '', // Forum Icon MOD
				'ICON_DISPLAY' => ( $forumicon ) ? '<img src="../' . $forumicon . '" />' : '' // Forum Icon MOD
			);
			$template->pparse("body");
			break;
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

should look like this

Code: Select all

				'DESCRIPTION' => $forumdesc, // Forum Icon MOD
				'ICON' => ( $forumicon ) ? $forumicon : '', // Forum Icon MOD
				'ICON_DISPLAY' => ( $forumicon ) ? '<img src="../' . $forumicon . '" />' : '' // Forum Icon MOD
				)
			);
			$template->pparse("body");
			break;
Tel
Registered User
Posts: 158
Joined: Mon Apr 28, 2003 5:33 pm
Location: UK

Post by Tel »

Thanks, works fine now.

How about instead of typing in images/icons/icon.gif

Couldn't you just have these in a drop down box?
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

Tel wrote: Couldn't you just have these in a drop down box?

how to have them in a drop down menu?
do you mean it list all the images in a certain folder in your server and allow you to choose which image you want for that forum? wonldn't it be easier for the user to type in whatever image name & path he/sher wants?

~Mac
Tel
Registered User
Posts: 158
Joined: Mon Apr 28, 2003 5:33 pm
Location: UK

Post by Tel »

I just thought it would be easier with a drop down box.

I've added the mod for the drop down box for the rank images here:

http://www.phpbbhacks.com/viewhack.php?id=1448

Maybe you could use the same method.
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

Mmm... ok, that's what I think your previous post is asking for.

I'm not going to do that in this standard release, since having a empty text box is more flexible to the end user than a drop down box. an add-on could be written to give a different choice to people

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

Post by ycl6 »

This MOD has been denied by the phpBB MOD-Validation process, mainly due to template issues. A corrected version 1.0.2 has been re-submitted for validation

~Mac
Tel
Registered User
Posts: 158
Joined: Mon Apr 28, 2003 5:33 pm
Location: UK

Post by Tel »

ycl6 wrote: should look like this

Code: Select all

				'DESCRIPTION' => $forumdesc, // Forum Icon MOD
				'ICON' => ( $forumicon ) ? $forumicon : '', // Forum Icon MOD
				'ICON_DISPLAY' => ( $forumicon ) ? '<img src="../' . $forumicon . '" />' : '' // Forum Icon MOD
				)
			);
			$template->pparse("body");
			break;


I've changed mod this to your updated version and I got the same error again, so I tried removing that extra bracket and now it's okay.
A.I. BOT
Registered User
Posts: 1848
Joined: Thu Apr 17, 2003 11:43 pm
Location: Newfoundland, Canada
Contact:

Post by A.I. BOT »

can this work with easy mod?
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

Tel wrote:

Code: Select all

				'DESCRIPTION' => $forumdesc, // Forum Icon MOD
				'ICON' => ( $forumicon ) ? $forumicon : '', // Forum Icon MOD
				'ICON_DISPLAY' => ( $forumicon ) ? '<img src="../' . $forumicon . '" />' : '' // Forum Icon MOD
				)
			);
			$template->pparse("body");
			break;
I've changed mod this to your updated version and I got the same error again, so I tried removing that extra bracket and now it's okay.

It's changed to this in the instruction

Code: Select all

				'DESCRIPTION' => $forumdesc, // Forum Icon MOD 
				'ICON' => ( $forumicon ) ? $forumicon : '', // Forum Icon MOD 
				'ICON_DISPLAY' => ( $forumicon ) ? '<img src="' . $phpbb_root_path . $forumicon . '" />' : '') // Forum Icon MOD
as long as the bracket is in the next line or before "// Forum Icon MOD" it would be fine
A.I. BOT wrote: can this work with easy mod?

I've not read about easy mod and what should be done to made a mod usable with easy mod. So I think it's not at the moment

~Mac
Locked

Return to “[2.0.x] MODs in Development”