vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - EditArea Code Editor for Templates & Plugins in Admin CP (vB3, vB4) (https://vborg.vbsupport.ru/showthread.php?t=288362)

cmwg 08-24-2013 08:49 PM

Thank you very much mate. Works fine!

tbworld 08-24-2013 10:08 PM

@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

nerbert 08-24-2013 10:59 PM

Quote:

Originally Posted by tbworld (Post 2440850)
@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.

tbworld 08-25-2013 12:52 AM

Quote:

Originally Posted by nerbert (Post 2440869)
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.

Jack.D 10-07-2013 11:26 AM

I can't seem to get it to work when I open the large edit box, I get the following.

PHP Code:

textarea_id 'ta_' $name '_' fetch_uniqueid_counter(); if (!$doeditbutton OR strpos($name,'[') !== false) { $openwindowbutton ''$javascript ''// trigger hasLayout for IE to prevent template box from jumping (#22761) $ie_reflow_css = (is_browser('ie') ? 'style="zoom:1"' : ''); $resizer = "
textarea_id}')\">$vbphrase[increase_size] textarea_id}')\">$vbphrase[decrease_size]
"
; } else { $openwindowbutton '


'
;     switch ($name) { case "installcode" $syntax "php"; break; case "uninstallcode" $syntax "php"; break; case "phpcode"     $syntax "php"; break; case "template"     $syntax "html"; break; default     : $syntax "html"; } $javascript ''; if($editarea_file !== true) { $javascript .= ''$editarea_file true; } $javascript .= '     ';     // trigger hasLayout for IE to prevent template box from jumping (#22761) $ie_reflow_css = (is_browser('ie') ? 'zoom:1;' : ''); $resizer = "
textarea_id}'); var r = resize_textarea(1, '{$vbulletin->textarea_id}'); eAL.toggle('{$vbulletin->textarea_id}'); return r; \" />  textarea_id}'); var resize_textarea(-1'{$vbulletin->textarea_id}'); eAL.toggle('{$vbulletin->textarea_id}'); return r; \" />
"
; } print_label_row$title $openwindowbutton$javascript "
$resizer
"
'''top'$name ); } */?> 


nerbert 10-07-2013 11:50 AM

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.

metebnueimat 08-18-2014 01:09 PM

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

nerbert 08-18-2014 04:15 PM

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.

thetechgenius 11-01-2017 08:29 PM

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!!


All times are GMT. The time now is 02:54 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01065 seconds
  • Memory Usage 1,759KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete