Post Icons - drop down list (good for lots of icons!)
This modification is in the archives.
This hack will put all the post icons into a dropdown list instead, which will save lots of space especially if you have lots of post icons available (or WANT to have a lot of post icons available )
Look at attached screenshot to see how it looks like If you have a suggestion, let me know! Anyways, here we go Please make sure that all your icons have a title because this title will be shown in the dropdown menu! Otherwise it will be blank; it will still work and people can select it, but it doesn't help in knowing what the icon will show Instructions Open up includes/functions_newpost.php and find PHP Code:
if ($seliconid == $iconid)
PHP Code:
if ($seliconid == $iconid)
PHP Code:
$show['posticons'] = false;
PHP Code:
$show['dropdownicons'] = 1;
PHP Code:
eval('$posticonbits .= "' . fetch_template('posticonbit') . '";');
PHP Code:
eval('$posticondropdown .= "' . fetch_template('posticon_dropdown') . '";');
HTML Code:
<td width="12%" nowrap="nowrap"><label for="rb_iconid_0"><input type="radio" name="iconid" value="0" id="rb_iconid_0" tabindex="1" onclick="swap_posticon(null)" $iconchecked />$vbphrase[no_icon] </label></td> $posticonbits HTML Code:
<if condition="$show['dropdownicons']"><td><select name="iconid" id="iconid" onchange="changeImage(this.value)">$posticondropdown</select> <img id="posticonimage" /></td><else /><td width="12%" nowrap="nowrap"><label for="rb_iconid_0"><input type="radio" name="iconid" value="0" id="rb_iconid_0" tabindex="1" onclick="swap_posticon(null)" $iconchecked />$vbphrase[no_icon] </label></td>$posticonbits</if> HTML Code:
// --> HTML Code:
<if condition="$show['dropdownicons']"> function changeImage(selVal) { if (selVal != 0) { document.getElementById('posticonimage').src = selVal; } else { document.getElementById('posticonimage').src = 'clear.gif'; } } </if> HTML Code:
<option value="$iconpath"$iconselect>$alttext</option> I hope you enjoy this hack Download No files for download. Screenshots
|