Welcome Guest [Log In] [Register]
This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy.


Visit the NEW ZetaBoards Support forum!

Username:   Password:
Add Reply
Add Post Resize to More Areas/Use Images; The + and - when typing a post!
Topic Started: Jun 14 2008, 07:03 PM (1,618 Views)
Nicola
Darth Vader's Sewing Instructor

I can't take too much credit for this. I pillaged one of the ZB JS files which Seth wrote...but there is probably a better way of adding to the code rather than doing the code again, if that makes sense.

This does the following:

- Adds the box increase/decrease under more places, such as the 'PM quick compose', Fast reply, Preferences notepad etc.
- You can opt to use images rather than the normal + and -.

To Use Images
jQuery
 
<script type="text/javascript">
//<![CDATA[
$("td#c_post #c_post-resize").remove();
$("textarea#c_post-text, textarea#quickcompose, dl#fast-reply dd textarea, td#c_notes textarea").after('<div id="c_post-resize"><span onclick="postSize(1)"><img src=" increase image URL " border="0" alt="+"/></span><span onclick="postSize(0)"><img src=" decrease image URL" border="0" alt="-"/></span></div>');
function postSize(a){var b=$("textarea#c_post-text, textarea#quickcompose, dl#fast-reply dd textarea, td#c_notes textarea").height()-50+(100*a);b=(b<175)?175:b;$("textarea").height(b)};
//]]>
</script>


To Use Generic + or -
jQuery
 
<script type="text/javascript">
//<![CDATA[
$("td#c_post #c_post-resize").remove();
$("textarea#c_post-text, textarea#quickcompose, dl#fast-reply dd textarea, td#c_notes textarea").after('<div id="c_post-resize"><span onclick="postSize(1)">+</span><span onclick="postSize(0)">-</span></div>');
function postSize(a){var b=$("textarea#c_post-text, textarea#quickcompose, dl#fast-reply dd textarea, td#c_notes textarea").height()-50+(100*a);b=(b<175)?175:b;$("textarea").height(b)};
//]]>
</script>


Place in Above the Copyright in the board template.

You'll need to use CSS in order to style/position them how you'd like. I can only help you with this if you make a theme support topic and clearly state (with a board link) what you want it to do.
Offline Profile Quote Post Goto Top
 
Victrixs
Member Avatar
Website Developer
[ *  *  * ]
This resize's words in posts?
Offline Profile Quote Post Goto Top
 
Nicola
Darth Vader's Sewing Instructor

Victrixs
Jun 14 2008, 07:48 PM
This resize's words in posts?
No...I'm sorry I lacked the topic title space to say 'box', even though I figured it'd be obvious what I was referring to from the topic content.
Hopefully the new topic description will help....
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]
Looks very nice ^^.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · User Created Codes · Next Topic »
Add Reply