Customizing SMF > Tips and Tricks

Fonts drop down selection & URL in post screen

(1/20) > >>

Am I the only one who thinks that the way the size, font, and url method should to be changed? I think instead of by hitting the size button and have it enter the post screen as
--- Code: ---[size=10pt][/size]
--- End code ---
have a drop down menu where you to pick the available sizes on the forum. Same goes with font. When you click the font button it enters
--- Code: ---[font=Verdana][/font]
--- End code ---
but wouldn't you want users to know all of the font types available and so he wouldn't have to type the font type themself? So I suggest a drop down thing for that, perhaps how the color thing works. Wouldn't it be annoying if the color thing worked the same way, by hitting a color button it would pop up as
--- Code: ---[color=Black][/color]
--- End code ---
and you would have to manually change it. I think the same things goes with the others.

Also I think the URL method should be changed. While you could manually type in
--- Code: ---[URL=]test[/URL]
--- End code ---
it would be easier if when clicking the URL button for it to ask, 'enter the text to display for the link (optional)' and then it would ask for the URL of the link. 

You can achieve all this by themeing: modifying "Post.template.php" and eventually the .js file.

Some people do like this, others don't...


Well if that is the case, maybe in a future version of SMF you can have an option for admins to set as the default what method they want to have it. And then users could perhaps edit the default method to what they prefer. Also a mod of this would be okay if it won't be placed in as a feature.

open Post.template.php and look for:

--- Code: ---// Print a drop down list for all the colors we allow!
--- End code ---
add before it:

--- Code: --- // Print a drop down list for font size!
echo ' <select onchange="surroundText(\'[size=\'+this.options[this.selectedIndex].value+\']\', \'[/size]\', document.', $context['post_form'], '.', $context['post_box_name'], '); this.selectedIndex = 0;" style="margin-bottom: 1ex;">
<option value="" selected="selected">Font Size</option>
<option value="10pt">10pt</option>
<option value="14pt">14pt</option>
<option value="18pt">18pt</option>
echo '<br />';

--- End code ---
and you have your own font size dropdown list .. the same method can be used for fonts name.


[0] Message Index

[#] Next page

Go to full version