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

  #16  
Old 07 Oct 2013, 13:50
nerbert nerbert is offline
 
Join Date: May 2008
Is the window opening and you are seeing this in the new window?

What I see is part of the code for the new version of function print_textarea_row(). You need to re-do the paste-in of the new function into includes/adminfunctions.php. It looks like you copied up a little too much and got
"*/?>"
at the end. The function should end with the closing curlie bracket "}" and not have anything after that.

I no longer use this product as I have a much improved version but it's incorporated into a larger product I haven't released yet.
Reply With Quote
  #17  
Old 18 Aug 2014, 15:09
metebnueimat metebnueimat is offline
 
Join Date: Sep 2011
its not working on vb 3.7.6, bellow the error:
Fatal error: Class 'vB_Template_Runtime' not found in admincp/textarea.php on line 40 Call Stack #TimeMemoryFunctionLocation 10.0003640152{main}( )../textarea.php:0
Reply With Quote
  #18  
Old 18 Aug 2014, 18:15
nerbert nerbert is offline
 
Join Date: May 2008
I think it's time to upgrade!

This product is so old I don't even have a copy of it and I can't run vB 3 anymore, so I'm not sure I can get this working for you, but I'll give it a try here.

Open textarea.php and look for these:

Near the top

dir="<?php echo vB_Template_Runtime::fetchStyleVar('textdirection'); ?>"

lang="<?php echo vB_Template_Runtime::fetchStyleVar('languagecode'); ?>"

charset=<?php echo vB_Template_Runtime::fetchStyleVar('charset'); ?>"
Near the bottom
dir="<?php echo vB_Template_Runtime::fetchStyleVar('textdirection'); ?>"
Now just edit them out and see what happens. They should default to the right values.
Reply With Quote
  #19  
Old 01 Nov 2017, 22:29
thetechgenius's Avatar
thetechgenius thetechgenius is offline
 
Join Date: Jun 2014
This is by far the best AdminCP Code Editor Addon ever. I seen some other addons like this one, such as the one that uses the "codemirror" javascript libraries, but that one has many bugs and missing features.

With the Codemirror version when you press "CTRL+F" to bring up the "Find" box, nothing happens. Then when you use the browsers built-in find feature, the browser cannot search in the Code Editor Box, so it never finds anything.

But this addon has its own built in "Find" feature and when you press "CTRL+F", it actually bring up a small "Find" box to search for text inside the Code Editor Box.

Thank you!!
__________________
TheTechGenius.Net Official IRC Network (ONLINE)
Host: irc.thetechgenius.net
Port: 6667
TTG IRC Web Client - http://thetechgenius.net/irc.html
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 14:06.

Layout Options | Width: Wide Color: