Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Mys v1.3.x Mods (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=42)
-   -   Mys v1.3.4 Editor For Private Messages (http://www.mysidiaadoptables.com/forum/showthread.php?t=5518)

Silver_Brick 09-28-2017 09:23 AM

Editor For Private Messages
 
Heys guys silverbrick here ^^
Today i will guide you how to put a responsive and secured editor for your private message system :veeee:
Step 1
http://www.jqueryscript.net/images/WYSIHTML5.jpg
Go here and download the zip of the editor ^^

Step 2
Make a folder in your directory with name assets and extract that zip there and you will find a folder in assets and move all file of that folder to assets and delete that folder and zip ^^

Step 3
Add this to template.tpl of the theme that you use and make sure it should be in <body> tag :happycbig: and remember to replace that yoursite.com with your site name ^^
Quote:

<script src="/assets/lib/js/wysihtml5-0.3.0.js"></script>
<script src="/assets/lib/js/jquery-1.7.2.min.js"></script>
<script src="/assets/lib/js/prettify.js"></script>
<script src="/assets/lib/js/bootstrap.min.js"></script>
<script src="/assets/src/bootstrap-wysihtml5.js"></script>
Step 4
Add this also in template.tpl inside <body> tag and remember to change yoursite.com with your site address and do not be over smart and directly link it like "/assets/prettify.css" or it will spoil things ^^
Quote:

<link rel="stylesheet" type="text/css" href="/assets/lib/css/bootstrap.min.css"></link>
<link rel="stylesheet" type="text/css" href="/assets/lib/css/prettify.css"></link>
<link rel="stylesheet" type="text/css" href="/assets/src/bootstrap-wysihtml5.css"></link>
Step 5
Add this also to template.tpl
Quote:

<script>
$('textarea.edit-text').wysihtml5();
</script>
Step 6
Now go to messageview.php in view folder and change -
Quote:

$pmForm->add(new Comment($editor->editor("mtext", "Enter your message here.")));
To

Quote:

$pmForm->add(new Comment("<textarea name='mtext' class='form-control edit-text' placeholder='Enter your message here.'></textarea>"));
Hopes you like the mod and be sure to comment out if you liked it :pleased:


All times are GMT -5. The time now is 08:19 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.