Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
EditArea Code Editor for Templates & Plugins in Admin CP (vB3, vB4) Details »
EditArea Code Editor for Templates & Plugins in Admin CP (vB3, vB4)
Mod Version: 1.00, by nerbert (Coder/Designer) nerbert is offline
Developer Last Online: Aug 2017 I like it Show Printable Version Email this Page

vB Version: 4.1.12 Rating: (0 vote - 0 average) Installs: 17
Released: 27 Sep 2012 Last Update: Never Downloads: 59
Supported Code Changes Additional Files Re-usable Code Translations External Content  

Description:

This modification puts the same editor as cPanel uses right in your admin CP for templates, plugins and other code inputs. It's based in part on work done here: http://www.vbulletin.org/forum/showthread.php?p=1854664 , but with all the problems fixed and the editing consolidated into one paste-in. You will have to upload the EditArea product from SourceForge and one file here. You will replace one file, admincp/textarea.php, and optionally edit includes/adminfunctions.php, saving the originals in case you change your mind (you won't!).

If you're not familiar with EditArea from cPanel, it has full syntax dependent highlighting, indenting, a search feature, undo, redo, selectable font size, word wrap toggle and more. See http://www.cdolivet.com/editarea/ .

When installed in your admin CP a small version of EditArea will appear in place of the plain text editor in the template, plugin and other pages where you enter code. The size can be changed with the Increase Size and Decrease Size buttons. If you click the Large Edit Box button you get a full page version (larger than the present plain text version).

Tested in vB4.1.12, should work in all vB4 and vB3 versions.

Installation:
  1. Get EditArea from http://sourceforge.net/projects/editarea/. Upload the edit_area (NOT editarea) folder to forum/clientscript.

  2. Make a copy of forum/admincp/textarea.php, renaming it textarea_original.php

  3. Now upload my textarea.php to forum/admincp.

  4. Make a copy of my file, renaming it textarea_ce.php to save it next time you upgrade.
Now you have the usual text editor in the aminCP page and a code editor in the large edit box. Test it out to be sure everything works. If you want editArea in the main page follow these additional steps:
  1. Make a copy of forum/includes/adminfunctions.php, renaming it adminfunctions_original.php.

  2. Open the new version of textarea.php and copy the new version of function print_textarea_row() at the bottom.

  3. Open forum/includes/adminfunctions.php and find function print_textarea_row(). In vB4.1.12 it's on line 999 but before that in earlier versions. Rename it print_textarea_row_old(). Now just above it paste in the new version of the function and Save.

  4. Now copy this edited version of forum/includes/adminfunctions.php, renaming it adminfunctions_new.php to save it for next time you upgrade.

You're done, no further editing required.

Here's the file. Best to upload it as a file to preserve tabulation though.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	admin1.png
Views:	308
Size:	58.3 KB
ID:	141469   Click image for larger version

Name:	admin2.png
Views:	236
Size:	65.1 KB
ID:	141470   Click image for larger version

Name:	textarea.png
Views:	250
Size:	58.4 KB
ID:	141471  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Integration with vBulletin VEA (EditArea for vb :: Code Editor for Template) Uno vBulletin 3.8 Add-ons 16 13 Sep 2009 11:19

Comments
  #2  
Old 27 Sep 2012, 03:19
nerbert nerbert is offline
 
Join Date: May 2008
Reserved
Reply With Quote
  #3  
Old 27 Sep 2012, 12:11
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Excellent, just yesterday I was thinking there should be something like this. Nice job.
Reply With Quote
  #4  
Old 27 Sep 2012, 14:14
DannyV DannyV is offline
 
Join Date: Mar 2012
Looking good.
Will try it out later today.
Reply With Quote
  #5  
Old 27 Sep 2012, 14:22
TheSupportForum TheSupportForum is offline
 
Join Date: Jan 2007
tagged for later use

but think this should be updated to 4.2.0 version too please
__________________
http://www.multihunters.co.uk - all your coding needs
Reply With Quote
  #6  
Old 27 Sep 2012, 17:24
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Seems to work fine in vb 4.2.0.
Reply With Quote
  #7  
Old 27 Sep 2012, 17:37
nerbert nerbert is offline
 
Join Date: May 2008
Originally Posted by kh99 View Post
Seems to work fine in vb 4.2.0.
Thanks for posting that. I didn't want to ask my other admin to upgrade just for my vB.org mod hobby.

Not much changes in the admin CP from one version to another, except to add new features.
Reply With Quote
  #8  
Old 29 Sep 2012, 17:12
Kiran-E-Sehar Kiran-E-Sehar is offline
 
Join Date: Jan 2011
Open the new version of textarea.php and copy the new version of function print_textarea_row() at the bottom. can you explain from where to where need to copy?
thanks
Reply With Quote
  #9  
Old 29 Sep 2012, 17:15
Kiran-E-Sehar Kiran-E-Sehar is offline
 
Join Date: Jan 2011
Installed, Nominated for the MOTM

Thanks a lor for this great feature

Please explain more for additional feature for main page
thanks buddy
Reply With Quote
  #10  
Old 29 Sep 2012, 17:31
nerbert nerbert is offline
 
Join Date: May 2008
Originally Posted by Kiran-E-Sehar View Post
Installed, Nominated for the MOTM

Thanks a lor for this great feature

Please explain more for additional feature for main page
thanks buddy
Go to textarea.php and copy everything below the fancy box all the way down to the last curly bracket and paste it into adminfunctions.php right above the original version of the function. Then change the name of the original version of the function so you don't have two versions of the same function. Since you should already have a copied version of adminfunctions.php you could just delete the old version of the function.. Or you could copy the new function out of the code here in the opening post.
Reply With Quote
  #11  
Old 24 Aug 2013, 22:49
cmwg cmwg is offline
 
Join Date: Apr 2006
Thank you very much mate. Works fine!
Reply With Quote
  #12  
Old 25 Aug 2013, 00:08
tbworld tbworld is offline
 
Join Date: Oct 2008
@nerbert - I had a good laugh at myself.

I spent good time and energy adding codemirror to my admincp, and all along you had already completed this mod. I was even the first person to thank you for this mod. So I am feeling a bit foolish right now. Next time I need to ask around before I do some code Well still great work on your part!

Of the two editors, which one do you like better, if you have compared them... codemirror, editarea?



G
Reply With Quote
  #13  
Old 25 Aug 2013, 00:59
nerbert nerbert is offline
 
Join Date: May 2008
Originally Posted by tbworld View Post
@nerbert - I had a good laugh at myself.

I spent good time and energy adding codemirror to my admincp, and all along you had already completed this mod. I was even the first person to thank you for this mod. So I am feeling a bit foolish right now. Next time I need to ask around before I do some code Well still great work on your part!

Of the two editors, which one do you like better, if you have compared them... codemirror, editarea?



G
Funny you should ask ...

I built a new product for this using CodeMirror but I'm not quite ready to publish it yet because I'm also working on a full file manager that completely replaces the awful one in cPanel and I thought I would just incorporate the template/plugin editor into the file manager product. It shouldn't be too much longer before I publish the file manager + template editor + an improved version of my function and hook finder.

As for the comparison between EditArea and CodeMirror there's no contest: CodeMirrror is by far the better product (no glitches, works in Opera, much faster). The reason it isn't used more is that it doesn't come with toolbars, but I have those working with search and replace, highlight matching, auto-formatting (for minified JS) and other features. Most of what still needs done is phrasing and I'm sure you know how tedious that can be. But of course a project this complicated seems never to be 100% done.
Reply With Quote
  #14  
Old 25 Aug 2013, 02:52
tbworld tbworld is offline
 
Join Date: Oct 2008
Originally Posted by nerbert View Post
Funny you should ask ...
I am impressed. I have also upgraded the plugin hook system it lacked some real tools. I guess I really didn't need to do any of it, but it gave me a reason to go through the code, way back when. I can't wait to see what you have done!

I do understand the undertaking of phrasing and since most of the time I can avoid it, I do. Since my development has been for private boards it is nice to slice a few things off the task list. But you get major kudos from me for the undertaking.

The website I run that uses the forum used to be international, but since most of the industrialized nations use English for international business we converted to English only and embedded translators instead. Unfortunately, translators are terrible when you are trying to convey an exact point. Having people leave messages in all sorts of languages is useless too. My point is I am glad I am out of the language business -- for now. Management can always change their mind.
Reply With Quote
  #15  
Old 07 Oct 2013, 13:26
Jack.D Jack.D is offline
 
Join Date: Mar 2011
I can't seem to get it to work when I open the large edit box, I get the following.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 00:26.

Layout Options | Width: Wide Color: