[Aphrodite] Forum icon in subforum

Specific instructions on how to apply certain mods to certain styles.

Moderator: Moderators

[Aphrodite] Forum icon in subforum

Postby okada1314 on Wed Feb 01, 2006 10:21 am

You must install subforum

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_forums.php

#
#-----[ FIND ]------------------------------------------
#
'FORUM_DESC' => $forum_rows[$k]['forum_desc'],


#
#-----[ AFTER, ADD ]------------------------------------
#
'FORUM_ICON_IMG' => ( $forum_rows[$k]['forum_icon'] ) ? '<img src="' . $phpbb_root_path . $board_config['forum_icon_path'] .'/' . $forum_rows[$k]['forum_icon'] . '" alt="'.$forum_data[$k]['forum_name'].'" title="'.$forum_data[$k]['forum_name'].'" />' : '',

#
#-----[ OPEN ]------------------------------------
#
viewforum.php

#
#-----[ FIND ]------------------------------------
#
'FORUM_NAME' => $subforum_data[$j]['forum_name'],

#
#-----[ Before add ]------------------------------------
#
'FORUM_ICON_IMG' => ($icon) ? '<img src="' . $phpbb_root_path . $icon . '" alt="'.$subforum_data[$j]['forum_name'].'" title="'.$subforum_data[$j]['forum_name'].'" />' : '', // Forum Icon Mod

#
#-----[ FIND ]------------------------------------
#
$posts = $subforum_data[$j]['forum_posts'];
$topics = $subforum_data[$j]['forum_topics'];

#
#-----[ AFTER ADD ]------------------------------------
#
$icon = $subforum_data[$j]['forum_icon']; // Forum Icon Mod

#
#-----[ OPEN ]------------------------------------
#
templates/ca_aphrodite/viewforum_body.tpl

#
#-----[ FIND ]------------------------------------
#
<td class="row1h{catrow.forumrow.XS_NEW} row-forum" width="70%" onclick="window.location.href='{catrow.forumrow.U_VIEWFORUM}'"><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}
</span><br /><span class="moderators">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>

#
#-----[ REPLACE WITH ]------------------------------------
#
<table width="100%" cellspacing="0">
<tr>
<!-- IF catrow.forumrow.FORUM_ICON_IMG <> "" --><td width="50">{catrow.forumrow.FORUM_ICON_IMG}</td><!-- ENDIF -->
<td>
<a class="forumlink{catrow.forumrow.XS_NEW}" href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_NAME}</a><br />
</span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
<!-- IF catrow.forumrow.MODERATORS --><span class="moderators">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span><br /><!-- ENDIF -->
</td>
</tr>
</table>
<td class="row2 row-center-small">{catrow.forumrow.TOPICS}</td>
<td class="row2 row-center-small">{catrow.forumrow.POSTS}</td>
<td class="row3 row-center-small" width="130">{catrow.forumrow.LAST_POST}</td>
</tr>

#
#-----[ OPEN]------------------------------------
#
admin/forum_admin_body.tpl

#
#-----[ FIND ]------------------------------------
#My mean is all link
<a href="{catrow.forumrow.U_VIEWFORUM}" target="_new">{catrow.forumrow.FORUM_NAME}</a></spa

#
#-----[ REPLACE WITH ]------------------------------------
#All link REPLACE WITH
<td class="row2"{catrow.forumrow.STYLE}>{catrow.forumrow.FORUM_ICON_IMG}&nbsp;&nbsp;<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>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------
#
# EoM
Last edited by okada1314 on Mon May 01, 2006 9:04 am, edited 1 time in total.
User avatar
okada1314
Registered User
Registered User
 
Posts: 192
Joined: Thu Dec 29, 2005 4:04 pm

Postby webnoobie on Fri Apr 07, 2006 10:32 pm

Greetings,

Okay. I am having a little bit of problems here. I have done all the code edits, but still the icon will not show up in the 'viewforum' page when in a forum with a subForum. I added the image in the ACP, just wont show up? Mmmhmmm... Can someone help me please! :D
Best Regards:
webnoobie
webnoobie
Registered User
Registered User
 
Posts: 366
Joined: Wed Jun 08, 2005 10:38 pm
Location: My Computer

Postby okada1314 on Sat Apr 08, 2006 6:33 am

you mean is not display in ACP?
User avatar
okada1314
Registered User
Registered User
 
Posts: 192
Joined: Thu Dec 29, 2005 4:04 pm

Postby webnoobie on Sat Apr 08, 2006 6:03 pm

1. Did not display in ACP...
and
2. Did not display when I viewed a parent forum w/ a subForum.
Best Regards:
webnoobie
webnoobie
Registered User
Registered User
 
Posts: 366
Joined: Wed Jun 08, 2005 10:38 pm
Location: My Computer

Postby okada1314 on Sat Apr 08, 2006 6:50 pm

Code: Select all

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

admin/admin_forums.php 


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

                           'FORUM_DESC' => $forum_rows[$k]['forum_desc'], 



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

                           'FORUM_ICON_IMG' => ( $forum_rows[$k]['forum_icon'] ) ? '<img src="' . $phpbb_root_path . $board_config['forum_icon_path'] .'/' . $forum_rows[$k]['forum_icon'] . '" alt="'.$forum_data[$k]['forum_name'].'" title="'.$forum_data[$k]['forum_name'].'" />' : '', 

#   
#-----[ SAVE/CLOSE ALL FILES ]--------------------------   
#   
# EoM
User avatar
okada1314
Registered User
Registered User
 
Posts: 192
Joined: Thu Dec 29, 2005 4:04 pm

Postby webnoobie on Sat Apr 08, 2006 8:11 pm

Ya Ok. I already new that part. But my question is, why wont my Images Show up in the Parent Forums SubForum?
Best Regards:
webnoobie
webnoobie
Registered User
Registered User
 
Posts: 366
Joined: Wed Jun 08, 2005 10:38 pm
Location: My Computer

Postby brandsrus on Fri Apr 14, 2006 11:05 am

Okada1314, you are on the good way but the code changes are this:

Open
Code: Select all
root/viewforum.php

Find
Code: Select all
'FORUM_NAME' => $subforum_data[$j]['forum_name'],


Before add
Code: Select all
'FORUM_ICON_IMG' => ($icon) ? '<img src="' . $phpbb_root_path . $icon . '" alt="'.$subforum_data[$j]['forum_name'].'" title="'.$subforum_data[$j]['forum_name'].'" />' : '',    // Forum Icon Mod


Find
Code: Select all
$posts = $subforum_data[$j]['forum_posts'];
         $topics = $subforum_data[$j]['forum_topics'];


After add
Code: Select all
$icon = $subforum_data[$j]['forum_icon'];   // Forum Icon Mod


The file viewforum_body.tpl is good changed, but also the admin_forums.php that you have posted!

Image
brandsrus
Registered User
Registered User
 
Posts: 115
Joined: Fri Jan 06, 2006 6:08 am
Location: Leeuwarden, The Netherlands

Postby okada1314 on Mon May 01, 2006 8:19 am

thank you for your fix !
User avatar
okada1314
Registered User
Registered User
 
Posts: 192
Joined: Thu Dec 29, 2005 4:04 pm

Postby MattTheMan on Wed May 23, 2007 5:10 pm

Hi.

In the zip file :

simple_subforums_1.0.2b.zip (38k)

There are two files :

modx.subsilver.en
simple_subforums_1.0.2.xml

Am I supposed to do anything with these two files ?

Thanks
MattTheMan
Registered User
Registered User
 
Posts: 30
Joined: Sat Nov 18, 2006 11:48 pm
Location: Nottinghamshire, UK

Postby DooBDee on Wed May 23, 2007 6:17 pm

[quote user="MattTheMan" post="89692"]Hi.

In the zip file :

simple_subforums_1.0.2b.zip (38k)

There are two files :

modx.subsilver.en
simple_subforums_1.0.2.xml

Am I supposed to do anything with these two files ?

Thanks[/quote]

Dont worry about modx file of xml file. Those are just ModX format. You can use normal txt file to install it if there is one and dont need to worry about those two files.
DooBDee
Website Ninja
DooBDee.net
User avatar
DooBDee
Moderator
Moderator
 
Posts: 3530
Joined: Tue Mar 01, 2005 6:28 pm
Location: DooBDee.net

Postby MattTheMan on Wed May 23, 2007 8:01 pm

Many thanks for clearing that up for me DooBDee :)
MattTheMan
Registered User
Registered User
 
Posts: 30
Joined: Sat Nov 18, 2006 11:48 pm
Location: Nottinghamshire, UK

Postby DooBDee on Wed May 23, 2007 8:55 pm

[quote user="MattTheMan" post="89703"]Many thanks for clearing that up for me DooBDee :)[/quote]If you want more information about it (MODX), visit this link: http://www.phpbb.com/mods/modx/
DooBDee
Website Ninja
DooBDee.net
User avatar
DooBDee
Moderator
Moderator
 
Posts: 3530
Joined: Tue Mar 01, 2005 6:28 pm
Location: DooBDee.net

Postby Captain Tycoon on Thu May 24, 2007 4:34 pm

#-----[ OPEN ]------------------------------------
#
templates/ca_aphrodite/viewforum_body.tpl

#
#-----[ FIND ]------------------------------------
#
<td class="row1h{catrow.forumrow.XS_NEW} row-forum" width="70%" onclick="window.location.href='{catrow.forumrow.U_VIEWFORUM}'"><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}
</span><br /><span class="moderators">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>

#
#-----[ REPLACE WITH ]------------------------------------
#
<table width="100%" cellspacing="0">
<tr>
<!-- IF catrow.forumrow.FORUM_ICON_IMG <> "" --><td width="50">{catrow.forumrow.FORUM_ICON_IMG}</td><!-- ENDIF -->
<td>
<a class="forumlink{catrow.forumrow.XS_NEW}" href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_NAME}</a><br />
</span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
<!-- IF catrow.forumrow.MODERATORS --><span class="moderators">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span><br /><!-- ENDIF -->
</td>
</tr>
</table>
<td class="row2 row-center-small">{catrow.forumrow.TOPICS}</td>
<td class="row2 row-center-small">{catrow.forumrow.POSTS}</td>
<td class="row3 row-center-small" width="130">{catrow.forumrow.LAST_POST}</td>
</tr>

#



I'm confused, here is my current code before those changes are made...


<!-- BEGIN catrow -->
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{catrow.CAT_DESC}&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" 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>
<td class="row1" width="100%" height="50"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink<!-- IF catrow.forumrow.UNREAD --> topic-new<!-- ENDIF -->">{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>
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td>
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td>
<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
</tr>
<!-- END forumrow -->
</table>
<br />
<!-- END catrow -->


Could you help me? When i make those changes that you tell me to do, it messes up the whole forum layout...
User avatar
Captain Tycoon
Registered User
Registered User
 
Posts: 8
Joined: Wed May 23, 2007 3:40 am
Location: United Kingdom

Postby Stryker on Thu May 24, 2007 4:41 pm

this is because you need to install also mod "forum icons with acp control", the code ocada provided is only "addon", maybe he forgot to mention this :)
User avatar
Stryker
Registered User
Registered User
 
Posts: 1318
Joined: Mon Aug 29, 2005 7:54 am
Location: ------------

Postby Captain Tycoon on Thu May 24, 2007 4:49 pm

I already have that mod, and i've fixed it. I think his code is out-of-date, so its not 100% accurate.
User avatar
Captain Tycoon
Registered User
Registered User
 
Posts: 8
Joined: Wed May 23, 2007 3:40 am
Location: United Kingdom


Return to How to mod some styles

Who is online

Users browsing this forum: No registered users and 2 guests

cron