Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
Code-Mirror Editor for Templates and Plugins in Admin CP (vB3, vB4) Details »»
Code-Mirror Editor for Templates and Plugins in Admin CP (vB3, vB4)
Version: 1.00, by nerbert nerbert is offline
Developer Last Online: Aug 2017 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 4.2.2 Rating:
Released: 08-03-2014 Last Update: Never Installs: 15
Re-useable Code Code Changes Additional Files  
No support by the author.

This product replaces my earlier EditArea version https://vborg.vbsupport.ru/showthread.php?t=288362 using the more advanced Code-Mirror editor.

With this product installed you will have a small version of the Code-Mirror editor instead of the plain textarea for editing templates, plugins and other code. You can get the full page version with all the features by clicking the Large Edit Box button.

With my toolbars the Code-Mirror editor provides basic code editor features: syntax highlighting, search and replace, text matching, undo/redo, font size and syntax selection, auto indent, tab size, tabs/spaces, go to line, word wrapping toggle and code collapsing (click line numbers)

Installation:

1. Upload the entire codemirror-3.0 folder to the clientscript folder.

2. Name out a copy of admincp/textarea.php (for example textarea_ORIGINAL.php) and upload the new version of textarea.php file to the admincp folder.

(The best way to do this is first create a "zips" folder in your main forum directory, upload the zip file to it and use cPanel or other server manager to unzip the file into the new folder. Then you can copy or move files wherever you want them.)

3. Open the new version of admincp/textarea.php, scroll down to the commented code at the bottom and copy the print_textarea_row() function.

4. Name out a copy of includes/adminfunctions.php (for example adminfunctions_ORIGINAL.php). Open the file and find the function print_textarea_row() on line 999 in vB4 or earlier in vB3, change the name to print_textarea_row_old() and paste in the new version you copied from textarea.php.

It should be ready to go.

Download Now

File Type: zip template_editor_upload.zip (593.9 KB, 101 views)

Screenshots

File Type: jpg admincp.jpg (112.5 KB, 0 views)
File Type: jpg textarea.jpg (83.4 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
3 благодарности(ей) от:
elsa23, MarkFL, tbworld

Comments
  #2  
Old 08-04-2014, 01:01 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

reserved for later
Reply With Quote
  #3  
Old 08-04-2014, 01:17 PM
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
Posts: 829
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks this is indeed a better solution than mine so i'll install this, but i still need vbulletin template syntax highlighting, hope i'll find a way to integrate the vbulletin mode from vb5 or rewrite it for vb4
Thank you
Reply With Quote
  #4  
Old 08-04-2014, 01:32 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Scanu View Post
..... hope i'll find a way to integrate the vbulletin mode from vb5 or rewrite it for vb4
I'm not familiar with vB5. Is the admin CP different? What changes have they made?
Reply With Quote
  #5  
Old 08-04-2014, 02:03 PM
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
Posts: 829
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Neither do I, actually I just installed it to upgrade my mods, it's still the same old, buggy and bad-coded admincp using iframes but it has new style that looks better, and they also added codemirror to every textarea. When making a new template, looking at the code I've seen it's a custom version of codemirror (slightly different) and that they developed a 'vbulletin mode'. The thing works well and i can bring it to vbulletin 4 just including vb5 codemirror files and vbulletin.js but with this mode there is no possibility to use other codemirror addons like autoclose tag etc...
Reply With Quote
  #6  
Old 08-04-2014, 02:24 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's interesting. I'm tempted to create a vB5 developer domain. I hope they don't change the adminCP too much. It's old-fashioned code but it's pretty robust.

Do you know what codemirror version they're using? It may be possible to transplant their html syntax file over to this product to properly highlight vB template syntax.
Reply With Quote
  #7  
Old 08-04-2014, 02:38 PM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is the best mod ever. This is something I asked for long time ago in the wishlist on vbulletin.com

I installed it on vb4.2.2 and works great without issues.

Thanks for the great job!!

Update #1: I just noticed that the search feature doesn't work inside the template to find any exact word or expression. I guess there is an issue here...
Reply With Quote
  #8  
Old 08-04-2014, 02:59 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by fxdigi-cash View Post
Update #1: I just noticed that the search feature doesn't work inside the template to find any exact word or expression. I guess there is an issue here...
It's working for me. You can highlight some text (or not) and click "on", then you can either highlight some other text or type in something in the search field then click "find"
Reply With Quote
Благодарность от:
fxdigi-cash
  #9  
Old 08-04-2014, 06:57 PM
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
Posts: 829
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nerbert View Post
That's interesting. I'm tempted to create a vB5 developer domain. I hope they don't change the adminCP too much. It's old-fashioned code but it's pretty robust.

Do you know what codemirror version they're using? It may be possible to transplant their html syntax file over to this product to properly highlight vB template syntax.
Version is 3.1
Reply With Quote
  #10  
Old 08-04-2014, 08:09 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Versions 3.0 and 3.1 should be mutually compatible. I think I patched this 3.0 version with a 3.1 patch. You might be able to move vB mode files over to this. They probably used modified versions of htmlmixed and xml. If it looks like this would work and you hit a snag, PM me.
Reply With Quote
Reply

Thread Tools

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


All times are GMT. The time now is 09:18 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05928 seconds
  • Memory Usage 2,323KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (4)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (3)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete