Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.2.x Mods

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 10-11-2011, 06:07 PM
Inf3rnal's Avatar
Inf3rnal Inf3rnal is offline
Member
 
Join Date: Mar 2011
Location: Florida
Posts: 108
Gender: Male
Credits: 21,813
Inf3rnal is on a distinguished road
Default Better Messages Buttons

I know this is quite redundant seeing the next release is going to have a WYSIWYG editor but I might as well release it.
This mod with change the messengers buttons into something more pretty as shown in the image below:



First download rte_icons.zip

Unzip and place the files in yoursite.com/templates/icons/
So your directory structure should look like this: yoursite.com/templates/icons/rte_icons/

Now put the following anywhere in your theme(s) style.css file. (Or whatever you named it.)

Code:
/* Better Messages Buttons */
.msgbutton {border: 1px solid #DD3822; height:25px; width:25px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;}
.bold {background:#fff url(../icons/rte_icons/bold.png) no-repeat center center;}
.italic {background:#fff url(../icons/rte_icons/italic.png) no-repeat center center;}
.underline {background:#fff url(../icons/rte_icons/underline.png) no-repeat center center;}
.link {background:#fff url(../icons/rte_icons/link.png) no-repeat center center;}
.picture {background:#fff url(../icons/rte_icons/picture.png) no-repeat center center;}
.strike {background:#fff url(../icons/rte_icons/strike.png) no-repeat center center;}
.youtube {background:#fff url(../icons/rte_icons/media.png) no-repeat center center;}
.profile {background:#fff url(../icons/rte_icons/user.png) no-repeat center center;}

Now open messages.php
Around line 163 find:


Code:
<p>Message Text:  </p>
<p>
	<input type=\"button\" value=\"Bold\" onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+'Bold Text Here'\">
	<input type=\"button\" value=\"Italics\" onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+'Italic Text Here'\"> 
	<input type=\"button\" value=\"Underline\" onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+'Underlined Text Here'\">
	<input type=\"button\" value=\"URL / Link\" onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+'Link text goes here'\">
	<input type=\"button\" value=\"Image\" onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+''\">
	<input type=\"button\" value=\"Image w/ Link\" onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+''\">
	<input type=\"button\" value=\"Links a Text\" onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+'[urlsame=]Linked Text Here[/urlsame]'\">
	<input type=\"button\" value=\"Striking Format\" onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+'[s]Strike Text Here[/s]'\">
	<input type=\"button\" value=\"Youtube Video\" onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+'[youtube]http://www.youtube.com/videoname[/youtube]'\">
	<input type=\"button\" value=\"User Profile\" onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+'[profile]Username[/profile]'\">
	<input type=\"button\" value=\"Image Maps\" onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+'[imgmap]http://www.urlhere.com/[/imgmap]'\">
	<input type=\"button\" value=\"Map Locations\" onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['pagecontent'].value+'[map][where=#,#,#,#=http://www.firstlinkhere.com/][wherecirc=#,#,#=http://www.secondinkhere.com/][/map]'\">
	<br />
	<textarea name='mtext' cols='45' id='mtext'></textarea> 
</p>
Replace with:

Code:
</p>  
	<p>Message Text:</p>
	<input class='msgbutton bold' type='button' title='Bold' value='' name='Bold' onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+'{b}{/b}'\">
	<input class='msgbutton italic' type='button' title='Italic' value='' onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+'{i}{/i}'\"> 
	<input class='msgbutton underline' type='button' title='Underline' value='' onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+'{u}{/u}'\">
	<input class='msgbutton link' type='button' title='Link' value='' onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+'{url=}{/url}'\">
	<input class='msgbutton picture' type='button' title='Image' value='' onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+'{img}{/img}'\">
	<input class='msgbutton strike' type='button' title='Strike Through' value='' onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+'{s}{/s}'\">
	<input class='msgbutton youtube' type='button' title='Youtube' value='' onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+{youtube}{/youtube}'\">
	<input class='msgbutton profile' type='button' title='User Profile' value='' onClick=\"document.forms['form1']. elements['mtext'].value=document.forms['form1']. elements['mtext'].value+'{profile}Username{/profile}'\">
	<br /><br /><textarea name='mtext' cols='80' rows='6' id='mtext' ></textarea>
</p>
That's it and you all done. Enjoy!

EDIT: I just noticed that the forum parsed some of the bbcode inside of the code.
So anyone who installed this please check your code.

I replaced all the ['s with {'s so when you do change those back to ['s before installing. I wish there was some sort of <pre> tag

Last edited by Inf3rnal; 10-28-2011 at 12:07 PM. Reason: Forum Parsing D:
Reply With Quote
  #2  
Old 10-12-2011, 03:39 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 488,085
Hall of Famer is on a distinguished road
Default

This looks quite nice, thanks for making it. Members should find it useful until WYSIWYG editor is incorporated with Mys in version 1.3.x.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #3  
Old 10-28-2011, 12:11 PM
Inf3rnal's Avatar
Inf3rnal Inf3rnal is offline
Member
 
Join Date: Mar 2011
Location: Florida
Posts: 108
Gender: Male
Credits: 21,813
Inf3rnal is on a distinguished road
Default

I just found a bug caused by the forum's bbcode parsing.

The forum parsed all the square brackets so I replaced all the square brackets with braces.
Just an heads up for anyone that used this. Just recopy the code and replace the braces with square brackets. =\
__________________
Finished Mods/Themes:
Admin Notes | Better Messages Buttons | Avatars in Memberlist
Chibiry! Theme | Midnight Rain Theme
Work in Progress:
Redesign of the core functions
Couple more themes
Reply With Quote
Reply

Tags
icons, mods, text editor


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is the formatting for form buttons? Infernette Questions and Supports 4 06-18-2015 07:47 PM
User Profile Buttons NOT working. AndromedaKerova Questions and Supports 8 04-26-2015 07:19 PM
Error messages~ Pear Questions and Supports 15 09-05-2014 01:45 PM
Affiliate buttons? Bibarel Feedback and Suggestions 0 01-16-2012 02:46 PM
Help: messages and email Isura Questions and Supports 1 07-24-2011 03:09 PM


All times are GMT -5. The time now is 06:57 PM.

Currently Active Users: 734 (0 members and 734 guests)
Threads: 4,081, Posts: 32,031, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636