[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

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

Post by ycl6 »

I've made a new version for this MOD, before approved by MOD team, you may get this from my sourceforge project site
http://sourceforge.net/project/showfile ... _id=107943

This version includes changes that fix the cosmetic issue raised by MrC. However, I did not have a step-by-step code change instruction. Please use a diff program (e.g. WinMerge) to view the changes.

~Mac
MrC
Registered User
Posts: 857
Joined: Mon Jun 30, 2003 4:11 pm
Location: The Netherlands
Name: Ivo
Contact:

Post by MrC »

Very nice, will try this asap and post my comments.
Manipe
Former Team Member
Posts: 1146
Joined: Thu Jul 22, 2004 6:30 pm
Location: Éire
Contact:

Post by Manipe »

MOD Updated to version 1.1.0
See first post for Download Link
My MODs: [ Topics a user has started ] , [ Profile views ] , [ Colour on poll results ] , [ Topic posters ] , [ Add number to PM ] , [ Default avatar ] , [ View category name ] , [ Null vote ] , [ Forum description in viewforum ] , [ Resync forum ids ] , [ View PM while replying ] , [ Quick poll insert ] , [ Limit login attempts ] , [ Track PMs ]

www.ManipeF1.com
gnflyby
Registered User
Posts: 23
Joined: Fri Jan 28, 2005 1:26 am

Post by gnflyby »

Worked great for me, thank you for your hard work, Nelson. :)
beary
Registered User
Posts: 4
Joined: Sat Feb 19, 2005 4:24 pm

Post by beary »

May I know anyone has tried applying this mod to the Morpheus Style? I managed to do the rest but stuck at this... Hope someone can enlighten me...

#-----[ OPEN ]------------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<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>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<td class="row1" width="100%" height="50"><table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr><td><a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_ICON_IMG}</a></td>
<td 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}<br />
</span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span>
</td>
</tr>
</table></td>


Morpheus index_body.tpl
<table width="100%" cellspacing="1" cellpadding="4" border="0" align="center" class="nav">
<tr>
<td class="nav" align="left" valign="middle"><span class="nav"><a href="{U_INDEX}">{L_INDEX}</a></span></td>
<td class="nav navform" align="right" valign="middle"><span class="nav"><form action="{CA_SEARCH_INDEX}" method="post" style="display: inline;">
<input type="hidden" name="show_results" value="topics" />
<input type="text" name="search_keywords" class="post" size="15" />
<input type="submit" value="{L_SEARCH}" class="mainoption" />
</form></span></td>
</tr>
</table>

<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 -->
{PRIVATE_MESSAGE_INFO}<br />
{LAST_VISIT_DATE}<br />
<!-- END switch_user_logged_in -->
{CURRENT_TIME}<br />
{S_TIMEZONE}<br />
</span></td>
<td align="right" valign="bottom" class="gensmall">
<!-- BEGIN switch_user_logged_in -->
<a href="{U_MARK_READ}">{L_MARK_FORUMS_READ}</a><br />
<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>

<!-- BEGIN switch_xs_enabled -->
<?php

$catrow_count = ( isset($this->_tpldata['catrow.']) ) ? sizeof($this->_tpldata['catrow.']) : 0;
if($this->vars['TPL_HDR1_BLUE'])
{
for($catrow_i = 0; $catrow_i < $catrow_count; $catrow_i++)
{
$catrow_item = &$this->_tpldata['catrow.'][$catrow_i];
// check for new messages
$new_msg = false;
$forumrow_count = ( isset($catrow_item['forumrow.']) ) ? sizeof($catrow_item['forumrow.']) : 0;
for ($forumrow_i = 0; $forumrow_i < $forumrow_count; $forumrow_i++)
{
$forumrow_item = &$catrow_item['forumrow.'][$forumrow_i];
$new_item = strpos($forumrow_item['FORUM_FOLDER_IMG'], '_new') > 0 ? true : false;
if($new_item)
{
$new_msg = true;
$forumrow_item['XS_NEW'] = '_new';
}
}
// add xs switch
$catrow_item['TPL_HDR1'] = $new_msg ? $this->vars['TPL_HDR1_ORANGE'] : $this->vars['TPL_HDR1_BLUE'];
}
$old_hdr = $this->vars['TPL_HDR1_BLUE'];
$this->vars['TPL_HDR1_BLUE'] = '';
}
?>
<!-- END switch_xs_enabled -->

<!-- BEGIN catrow -->
{catrow.TPL_HDR1}{TPL_HDR1_BLUE}<a href="javascript:ShowHide('cat_{catrow.CAT_ID}','cat2_{catrow.CAT_ID}','catrow_{catrow.CAT_ID}');">{catrow.CAT_DESC}</a>{TPL_HDR2}<div id="cat_{catrow.CAT_ID}" style="display: ''; position: relative;"><table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th colspan="2" height="25" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th>
<th nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
<th nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th>
<th nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
</tr>
<!-- BEGIN forumrow -->
<tr>
<td class="row" align="center" valign="middle" width="30" height="30"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="28" height="32" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
<td class="row" width="70%"><a class="forumlink{catrow.forumrow.XS_NEW}" href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_NAME}</a><br />
<span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
</span><span class="moderators">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>
<td class="row" align="center" valign="middle"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td>
<td class="row" align="center" valign="middle"><span class="gensmall">{catrow.forumrow.POSTS}</span></td>
<td class="row" align="center" valign="middle" width="130"><span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
</tr>
<!-- END forumrow -->
</table></div><div id="cat2_{catrow.CAT_ID}" style="display: none; position: relative;"><table width="100%" cellpadding="0" cellspacing="1" border="0" class="forumline"><tr><td class="spacerow" width="100%" height="3"><img src="{T_TEMPLATE_PATH}/images/spacer.gif" width="1" height="3" border="0" alt="" /></td></tr></table></div>{TPL_FTR}
<script language="javascript" type="text/javascript">
<!--
tmp = 'catrow_{catrow.CAT_ID}';
if(GetCookie(tmp) == '2')
{
ShowHide('cat_{catrow.CAT_ID}','cat2_{catrow.CAT_ID}','catrow_{catrow.CAT_ID}');
}
//-->
</script>
<!-- END catrow -->
<!-- BEGIN switch_xs_enabled -->
<?php
$this->vars['TPL_HDR1_BLUE'] = $old_hdr;
?>
<!-- END switch_xs_enabled -->

{TPL_HDR1}<a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a>{TPL_HDR2}<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<!-- BEGIN switch_user_logged_in -->
<td class="row" align="center" valign="middle" rowspan="2"><img src="{T_TEMPLATE_PATH}/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
<!-- END switch_user_logged_in -->
<!-- BEGIN switch_user_logged_out -->
<td class="row" align="center" valign="middle" rowspan="3"><img src="{T_TEMPLATE_PATH}/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
<!-- END switch_user_logged_out -->
<td class="row" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>
</td>
</tr>
<tr>
<td class="row" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}<br />{L_ONLINE_EXPLAIN}</span></td>
</tr>
<!-- BEGIN switch_user_logged_out -->
<tr>
<td class="row" align="center"><form method="post" action="{S_LOGIN_ACTION}"><span class="gensmall">
{L_USERNAME}: <input class="post" type="text" name="username" size="10" />
&nbsp;&nbsp;{L_PASSWORD}: <input class="post" type="password" name="password" size="10" maxlength="32" />
<!-- BEGIN switch_allow_autologin -->
&nbsp;&nbsp;<label>{L_AUTO_LOGIN} <input class="text" type="checkbox" name="autologin" checked="checked" /></label>
<!-- END switch_allow_autologin -->
&nbsp;&nbsp; <input type="submit" class="mainoption" name="login" value="{L_LOGIN}" />
</span></form></td>
</tr>
<!-- END switch_user_logged_out -->
</table>{TPL_FTR}

<table cellspacing="3" border="0" align="center" cellpadding="0">
<tr>
<td width="20" align="center"><img src="{T_TEMPLATE_PATH}/images/folder_new_big.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="{T_TEMPLATE_PATH}/images/folder_big.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="{T_TEMPLATE_PATH}/images/{TPL_COLOR}/folder_locked_big.gif" alt="{L_FORUM_LOCKED}" /></td>
<td><span class="gensmall">{L_FORUM_LOCKED}</span></td>
</tr>
</table>
raymonkondos
Registered User
Posts: 74
Joined: Tue May 04, 2004 11:40 pm

Post by raymonkondos »

So the images (icons) are aligned to the left of the forum name and description. Is there any way to have some of those icons align to the right (which sounds useful to make use of the empty space)?
alehawk
Registered User
Posts: 33
Joined: Sun Nov 13, 2005 12:54 am

Post by alehawk »

I checked and rechecked the mod but I cant find why the icon its only displayed on viewtopic. I installed the lines in all tpls and phps but it will only be displayed in viewtopic.
Any idea?
Tnx
alehawk
Registered User
Posts: 33
Joined: Sun Nov 13, 2005 12:54 am

Post by alehawk »

fixed
heoo
Registered User
Posts: 1
Joined: Wed Feb 22, 2006 8:50 pm

Post by heoo »

Can anyone help me? Trying to install this on BreatheFX theme without success. I cant work out the template edits... The theme can be downloaded at http://www.phpbb-design.com if anyone is interested in helping me with the template edits...

Cheers
Mut
Registered User
Posts: 150
Joined: Fri Oct 21, 2005 9:09 am
Contact:

Post by Mut »

Whoever has this installed. Can I see screenshots or a link to your forums? Thanks.
http://www.rolleyes.net/forums - A site for general discussion, anime, game, tv, movies, fun articles, and more. Come by and become a member.
User avatar
Freitag
Registered User
Posts: 147
Joined: Mon Jul 11, 2005 10:17 pm

Post by Freitag »

Installation failed for me in several places...

I am running 2.0.19 with several other mods already applied.

Around line #276 I had the follwoing problem:
The "find" didn't match the template that I have.

The find had been looking for

Code: Select all

<td class="row2"><span class="gen"><a href="{catrow.forumrow.U_VIEWFORUM}" target="_new">{catrow.forumrow.FORUM_NAME}</a></span>
but mine looked like

Code: Select all

<td class="row2"{catrow.forumrow.STYLE}><span class="gen"><a href="{catrow.forumrow.U_VIEWFORUM}" target="_new">{catrow.forumrow.FORUM_NAME}</a></span><br /><span class="gensmall">{catrow.forumrow.FORUM_DESC}</span></td>

Since this is the only line in the file that refrences "row2" you could key off that text and not have to find an exact match.

Substituting the following in the setup file made it work:

Code: Select all

#-----[ FIND ]------------------------------------------ 
# 
		<td class="row2"
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
#
		<span class="gen">
# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 

Then around line #292 another "find" failed (This one I think is because of the mod "simple sub-forums")

The find that failed was:

Code: Select all

#-----[ FIND ]------------------------------------------ 
# 
	<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>
# 
My index_body.tpl looked like:

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 />
<!-- IF catrow.forumrow.MODERATORS --><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}<br /></span><!-- ENDIF -->
	  <!-- BEGIN sub --><!-- DEFINE $HAS_SUB = 1 --><!-- IF catrow.forumrow.sub.NUM > 0 -->, <!-- ELSE --><span class="genmed">{L_SUBFORUMS}: <!-- ENDIF -->{catrow.forumrow.sub.LAST_POST_SUB} <a href="{catrow.forumrow.sub.U_VIEWFORUM}" <!-- IF catrow.forumrow.sub.UNREAD -->class="topic-new"<!-- ENDIF --> title="{catrow.forumrow.sub.FORUM_DESC_HTML}">{catrow.forumrow.sub.FORUM_NAME}</a><!-- END sub -->
	  <!-- IF $HAS_SUB --></span><!-- UNDEFINE $HAS_SUB --><!-- ENDIF -->
	</td>
And replacing it with

Code: Select all

# 
#-----[ FIND ]------------------------------------------ 
# 
	<td class="row1" width="100%" height="50">
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
	<td class="row1" width="100%" height="50">
# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
# 

		<table width="100%" cellpadding="2" cellspacing="0" border="0">
		<tr><td><a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_ICON_IMG}</a></td><td width="100%">

# 
#-----[ FIND ]------------------------------------------ 
# 
	<span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
  			</td></tr></table>
# 
made it work
User avatar
Freitag
Registered User
Posts: 147
Joined: Mon Jul 11, 2005 10:17 pm

Post by Freitag »

If you are still taking requests for this mod, I'd like checkboxes to show/hide the icon in the various locations that it can be. (main page, forum top, read thread)

I have not yet tried applying an icon to a sub-forum to see how it acts. I will try that later too.

EDIT:
It works fine on forums - for soem reason easy mod didn't apply the command that started crammed up against the left margin (see code above "class=.....")
Once I fixed that it worked great.

I tried adding an icon to a sub-forum and although the subforum shows in the admin panel detail that it has an icon, it does not show it in the admin panel list, nor in the user view (from viewforum_body.tpl)

Sorry, I thought I was going to be able to give you a simple patch to make it work with simple sub-fourm mod
bigwookie
Registered User
Posts: 32
Joined: Wed Mar 08, 2006 11:40 am

Post by bigwookie »

is there a ported version of this mod available for platinum nuke 7.6b4 (www.futurenuke.com)?
Viper07
Registered User
Posts: 85
Joined: Mon Jan 16, 2006 8:34 pm

Post by Viper07 »

I have the Simple Subforums MOD installed, and Im having trouble getting round this on index_body.tpl:

Code: Select all

	<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}<br />
	  </span><!-- IF catrow.forumrow.MODERATORS --><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}<br /></span><!-- ENDIF -->
	  <!-- BEGIN sub --><!-- DEFINE $HAS_SUB = 1 --><!-- IF catrow.forumrow.sub.NUM > 0 -->, <!-- ELSE --><span class="genmed">{L_SUBFORUMS}: <!-- ENDIF -->{catrow.forumrow.sub.LAST_POST_SUB} <a href="{catrow.forumrow.sub.U_VIEWFORUM}" <!-- IF catrow.forumrow.sub.UNREAD -->class="topic-new"<!-- ENDIF --> title="{catrow.forumrow.sub.FORUM_DESC_HTML}">{catrow.forumrow.sub.FORUM_NAME}</a><!-- END sub -->
	  <!-- IF $HAS_SUB --></span><!-- UNDEFINE $HAS_SUB --><!-- ENDIF -->
	</td>

Code: Select all

<td class="row1" width="100%" height="50"><table width="100%" cellpadding="2" cellspacing="0" border="0">
		<tr><td><a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_ICON_IMG}</a></td>
			<td 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}<br />
  				</span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span>
  			</td>
  		</tr>
  	</table></td>
Can anyone help?
User avatar
Freitag
Registered User
Posts: 147
Joined: Mon Jul 11, 2005 10:17 pm

Post by Freitag »

Is your probelm install related or post-install?

If it is install related then the fix I used might work directly for you (several posts back).

If it doesn't work directly, then it might work indirectly. Copy the text that is actually in your .tpl file into the MOD file so that it can find exactly what you have with it's "FIND" and "IN-LINE FIND" commands.

If it is post-install I think we need more description of the problem to be able to help.
Post Reply

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