News:

Wondering if this will always be free?  See why free is better.

Main Menu

Increase/Decrease Postbox Size

Started by Daniel15, January 30, 2007, 04:33:21 AM

Previous topic - Next topic

Daniel15

Link to Mod

This mod will add - and + buttons to the bottom of the postbox (box used to type in a New Topic or Reply), to increase or decrease the size. It will also add the buttons to the Quick Reply box.


Also, a new setting will be added to the "Posts and Topics" section of the admin panel, which will allow you to change the amount of rows the buttons add/remove.

Changelog
Version 1.0
- Initial release.
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

RoarinRow


SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

@ngel

Works great on IE 7.0 (and with Maxthon)

However, I removed the Quick Reply installation (In Display.template.php) because I had an error with this module.  I think this because I added some mods.

Sarke

Looks good, I was wondering when something like this was going to show up.

My MODs          Please don't PM me for support, post in the appropriate topic.

Markuz Nightwind

#4
Hi, very good mod! But i cannot install it, cause i've tried your package parser (to view themes edit) and this is what i've got:

ERROR: The package-info.xml file is invalid!

Debugging Information
Error message: String could not be parsed as XML
Source: /var/www/smf/package.php:93
Errors encountered while parsing XML file:

Stack Trace:
#0 /var/www/smf/package.php(93): SimpleXMLElement->__construct('')
#1 /var/www/smf/package.php(54): parsePackageInfoXML('/tmp/smf_xml/pa...', 'install', 'theme')
#2 /var/www/smf/package.php(707): parseArchive('/tmp/php2HWMgS', 'install', 'theme')
#3 {main}

Daniel15

Markuz Nightwind, this is because the SMF mods site doesn't treat tar.gz files properly. I'll try repackaging it as a .zip, which should fix this.
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Daniel15

OK, I've reuploaded it as a .zip, please try again :)
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Gargoyle

Rock on!! MOD works great and installed fine with 12 other mods installed!! I love it when a mod comes together.. ;D

Daniel15

Thanks for the comments Gargoyle... That's why I like small mods like this, they don't usually interfere with anything :)
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

chep

#9
Fantastic mod I have been waiting for.

I had a minor installation issue.


This line was not there in Display.template.php

<textarea cols="75" rows="7" style="width: 95%;" name="message" id="message" tabindex="1"></textarea><br />


I used this one instead.
<textarea class="editor" name="', $context['post_box_name'], '" rows="', $context['post_box_rows'], '" cols="', $context['post_box_columns'], '" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="6"></textarea>


Here are the mods I have installed on SMF 1.1.1

Mod Name Version 
1. Ultimate Shoutbox 1.40 
2. Increase/Decrease Postbox Size 1.0
3. Users Online Today Mod 1.4.0   
4. Enhanced Quick Reply TBA   
5. boardicon1.1 1.1   
6. RSS Feed Icon 1.1   
7. Spam Me Not Mod 1.02   

Daniel15

Quote4. Enhanced Quick Reply TBA   
That's the mod that causes it. To add the + and - buttons to the quick reply, find (Display.template.php):

<textarea class="editor" name="', $context['post_box_name'], '" rows="', $context['post_box_rows'], '" cols="', $context['post_box_columns'], '" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="6"></textarea>


Replace with:

<textarea class="editor" name="', $context['post_box_name'], '" id="', $context['post_box_name'], '" rows="', $context['post_box_rows'], '" cols="', $context['post_box_columns'], '" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="6"></textarea><br />
<!-- Begin modification - Increase/Decrease postbox size -->
<div style="float: left; margin-left: 2.5%">
<input type="button" value="-" onclick="document.getElementById(\'', $context['post_box_name'], '\').rows -= ', (empty($modSettings['postbox_incdec']) ? '10' : (int) $modSettings['postbox_incdec']), '" />
<input type="button" value="+" onclick="document.getElementById(\'', $context['post_box_name'], '\').rows += ', (empty($modSettings['postbox_incdec']) ? '10' : (int) $modSettings['postbox_incdec']), '" />
</div>
<!-- End modification -->



I'll upload a package compatible with this mod later.
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

chep

#11
Thanks for confirming. You must have been reading my mind. I sort of asked for this mod about 5 days ago on another thread where the enhanced qrp is.

edi67

great mod as usual excellent daniel15

only one question for you i want that the height of default for my post box is more big of the actual where i can change it and make more bigger of now ? i saw in post.template the variable $context['post_box_rows'] but i cannot find where i can modify this value.

thx for all your excellent mod
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Markuz Nightwind

#13
Quote from: Daniel15 on January 30, 2007, 09:13:20 PM
Thanks for the comments Gargoyle... That's why I like small mods like this, they don't usually interfere with anything :)
Thanks, it works just fine now ^_^ Very great mod, thanks very much *thumbs up*

lexhair

Extremely useful mod. Works well in Safari and Firefox. It doesn't seem to be adding the buttons to my 'Quick Reply' box in any of my browsers including IE 7.0, but I don't use that normally.

chep

Quote from: lexhair on January 31, 2007, 09:35:05 AM
Extremely useful mod. Works well in Safari and Firefox. It doesn't seem to be adding the buttons to my 'Quick Reply' box in any of my browsers including IE 7.0, but I don't use that normally.

Interesting. It is working on the quick reply and in IE7 for me.  

lexhair

#16
Quote from: chep on January 31, 2007, 10:37:41 AM
Quote from: lexhair on January 31, 2007, 09:35:05 AM
Extremely useful mod. Works well in Safari and Firefox. It doesn't seem to be adding the buttons to my 'Quick Reply' box in any of my browsers including IE 7.0, but I don't use that normally.

Interesting. It is working on the quick reply and in IE7 for me. 
I can see it modified the default theme Display.template.php but since I use Babylon which has it's own Display.template.php, it doesn't look like the package manager made the changes to the Babylon theme. I manually went into the Babylon theme, Display.template.php and added the following code on line 653:<!-- Begin modification - Increase/Decrease postbox size -->
<div style="float: left; margin-left: 2.5%">
<input type="button" value="-" onclick="document.getElementById(\'message\').rows -= ', (empty($modSettings['postbox_incdec']) ? '10' : (int) $modSettings['postbox_incdec']), '" />
<input type="button" value="+" onclick="document.getElementById(\'message\').rows += ', (empty($modSettings['postbox_incdec']) ? '10' : (int) $modSettings['postbox_incdec']), '" />
</div>
<!-- End modification -->
Works like a champ now.

Tanks

#17
i installed this manually to my 1.1 RC3 forum and i got this strange text

look at this screenshot, hope you dont mind helping me even if i still use RC3.. the code installed fine so i wonder why it shows this text ?


Tanks

i installed this manually to my 1.1 RC3 forum and i got this strange text

look at this screenshot, hope you dont mind helping me even if i still use RC3.. the code installed fine so i wonder why it shows this text ?




Never mind i got it working now but i was unable to edit my post above  ::) .. was all my own fault.. thanks for a great and useful mod  ;)

Oldiesmann

We're aware of the problem with editing posts. I'm trying to figure out what's causing it.
Michael Eshom
Christian Metal Fans

Advertisement: