Page 1 of 1

[3.2][DEV] Default Topic Icon

Posted: Mon Dec 04, 2017 7:18 am
by phreakwars
Working on an updated version of this: https://www.phpbb.com/customise/db/mod/ ... opic_icon/

Image

Yes this MOD will work in PhPBB 3.2.1 as well as 3.1.x

The instructions are just a hair different. I have some time off so after I get all the guidelines for creating extensions down, I will release an updated version that is compatible with PhPBB 3.2.X

For now, all you need to do to make this work in 3.1.x & 3.2.x, is open posting_editor.html

FIND:

Code: Select all

<!-- IF S_SHOW_TOPIC_ICONS or S_SHOW_PM_ICONS -->
	<dl>
		<dt><label for="icon">{L_ICON}{L_COLON}</label></dt>
		<dd>
			<label for="icon"><input type="radio" name="icon" id="icon" value="0" checked="checked" tabindex="1" /> <!-- IF S_SHOW_TOPIC_ICONS -->{L_NO_TOPIC_ICON}<!-- ELSE -->{L_NO_PM_ICON}<!-- ENDIF --></label>
			<!-- BEGIN topic_icon --><label for="icon-{topic_icon.ICON_ID}"><input type="radio" name="icon" id="icon-{topic_icon.ICON_ID}" value="{topic_icon.ICON_ID}" {topic_icon.S_ICON_CHECKED} tabindex="1" /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="{topic_icon.ICON_ALT}" title="{topic_icon.ICON_ALT}" /></label> <!-- END topic_icon -->
		</dd>
	</dl>
	<!-- ENDIF -->
REPLACE WITH:

Code: Select all

	<!-- IF S_SHOW_TOPIC_ICONS or S_SHOW_PM_ICONS -->
	<dl>
		<dt><label for="icon">{L_ICON}{L_COLON}</label></dt>
		<dd>
			<!-- BEGIN topic_icon --><label for="icon-{topic_icon.ICON_ID}"><input type="radio" name="icon" id="icon-{topic_icon.ICON_ID}" value="{topic_icon.ICON_ID}" {topic_icon.S_ICON_CHECKED}{S_NO_ICON_CHECKED} /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" /></label> <!-- END topic_icon -->
		</dd>
	</dl>
	<!-- ENDIF -->

After that, purge the cache from the Admin Control Panel, and select the default icon in the ACP under Posting>Topic Icons. Just move the icon you want to be default to the bottom and you're all set.