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

Reply
 
Thread Tools
VEA (EditArea for vb :: Code Editor for Template) Details »»
VEA (EditArea for vb :: Code Editor for Template)
Version: 1.00, by Uno Uno is offline
Developer Last Online: Aug 2014 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.8.2 Rating:
Released: 05-04-2009 Last Update: Never Installs: 18
Code Changes Additional Files  
No support by the author.

This small mod for vb is the integration di EditArea (http://www.cdolivet.com/index.php?page=editArea) in admin panel on the windows "large edit box"
(work also with the older versions of vb, i think from 3... 3.5)

EditArea is a free javascript editor for source code (That is no way a WYSIWYG editor). This editor is designed to edit souce code files in a textarea. The main goal is to allow text formatting, search and replace and real-time syntax highlight (for not too heavy text).

All rights di EditArea are of Christophe on cdolivet.com but he has released this software on license LGPL, Apche and BSD. Therefore free and freely distributable and then have now VEA


Is beautifulst for work on the template online


Installation:

Upload the folder "edit_area" which is in the zip
edit_area.zip in folder /admincp

Open
file /admincp/textarea.php

delete all between (line 35)
(before you make a copy of backup)

HTML Code:
$vbulletin->GPC['name'] = preg_replace('#[^a-z0-9_-]#', '', $vbulletin->GPC['name']);


and
(line 77)

HTML Code:
<?php


Now replace with


HTML Code:
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $stylevar['textdirection']; ?>" lang="<?php echo $stylevar['languagecode']; ?>">
<head>
    <title><?php echo $vbulletin->options['bbtitle'] . " - vBulletin $vbphrase[control_panel]"; ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $stylevar['charset']; ?>" />
    <link rel="stylesheet" type="text/css" href="../cpstyles/<?php echo $vbulletin->options['cpstylefolder']; ?>/controlpanel.css" />

<script language="Javascript" type="text/javascript" src="edit_area/edit_area_full.js"></script>
<script language="Javascript" type="text/javascript">
        // initialisation
        editAreaLoader.init({
                         language:"en"
            ,id: "popuptextarea"    // id of the textarea to transform        
            ,start_highlight: true    // if start with highlight
            ,allow_toggle: true
                        ,syntax: "html"
                        ,allow_resize: "both"
                        ,toolbar: "search, go_to_line, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight"
                        ,syntax_selection_allow: "html,php,js,css"
                        ,show_line_colors: true
                       
        });

function toogle_editable(id)
        {
            editAreaLoader.execCommand(id, 'set_editable', !editAreaLoader.execCommand(id, 'is_editable'));
        }
</script>

    <script type="text/javascript" src="../clientscript/vbulletin_global.js"></script>
    <script type="text/javascript">
    <!--
    function js_textarea_send(textarea,doclose)
    {
        opener.document.getElementsByName('<?php echo $vbulletin->GPC['name']; ?>')[0].value = textarea.value;
        if (doclose==1)
        {
            opener.focus();
            self.close();
        }
    }
    // -->
    </script>

</head>

<body onload="self.focus(); fetch_object('popuptextarea').value=opener.document.getElementsByName('<?php echo $vbulletin->GPC['name']; ?>')[0].value;" style="margin:0px">

<!-- body onload="self.focus(); value=opener.document.getElementsByName('<php echo $vbulletin->GPC['name']; ?>')[0].value; editAreaLoader.setValue('popuptextarea', value )" style="margin:0px">  
-->
<form name="popupform" tabindex="1">
<table cellpadding="4" cellspacing="0" border="0" width="100%" class="tborder">

<tr>
    <td class="alt1" align="center">       
       <input type='button' onclick='editAreaLoader.insertTags("popuptextarea", "<if condition=\"\">", "</if>");' value='condition' />  
       <input type='button' onclick='editAreaLoader.insertTags("popuptextarea", "<else>", "");' value='else' />
       <input type='button' onclick='editAreaLoader.insertTags("popuptextarea", "<div>", "</div>");' value='div' />
       <input type='button' onclick='editAreaLoader.insertTags("popuptextarea", "<table>", "</table>");' value='table' />
       <input type='button' onclick='editAreaLoader.insertTags("popuptextarea", "<tr>", "</tr>");' value='tr' />
       <input type='button' onclick='editAreaLoader.insertTags("popuptextarea", "<td>", "</td>");' value='td' />
       <input type='button' onclick='editAreaLoader.insertTags("popuptextarea", "<br/>", "");' value='br/' />
       <input type='button' onclick='editAreaLoader.insertTags("popuptextarea", "<strong>", "</strong>");' value='strong' />
       <input type='button' onclick='editAreaLoader.insertTags("popuptextarea", "<img src=\"\" alt=\"\" width=\"\" heigth=\"\" border=\"0\">", "");' value='img' />                                                                                      
       <input type='button' onclick='editAreaLoader.insertTags("popuptextarea", "<a href=\"\">", "</a>");' value='url' />
       <input type='button' onclick='editAreaLoader.insertTags("popuptextarea", "<span>", "</span>");' value='span' />
     

       <textarea name="popuptextarea" id="popuptextarea" class="code" style=" width: 100%; height:570px" onkeydown="editAreaLoader.delete_instance('popuptextarea'); js_textarea_send(this, 0);" onkeyup="editAreaLoader.delete_instance('popuptextarea'); js_textarea_send(this, 0);"> 
        </textarea>
       </td>
</tr>
<tr>
    <td class="tfoot" align="center">

     <input type="button" class="button" value="<?php echo $vbphrase['send']; ?>" onclick="editAreaLoader.delete_instance('popuptextarea'); js_textarea_send(this.form.popuptextarea, 1);" accesskey="s" />
    </td>
</tr>
</table>
</form>
</body>
</html>
Is possible choose many languages changing the variable: language

The languages are:
"Croatian, Czech, Danish, Dutch, English, Esperanto, French, German, Italian, Japanese, Macedonian, Polish, Portuguese, Russian, Slovak, Spanish"

I have set up some tag of common use for vb and html:
"condition, else, div, table, tr, td, br, strong, img, url, span"

but is very easy add others or to modify these.


Sorry for my english

Support in italian on vBulletinItalia.it

Screenshots

File Type: png area_edit.png (154.8 KB, 0 views)
File Type: png area_edit1.png (122.9 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 05-05-2009, 09:31 PM
jGas jGas is offline
 
Join Date: May 2007
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks! if you can improve it a little bit...maybe without changing vbulletin php files, it would be better..but i like it
Reply With Quote
  #3  
Old 05-05-2009, 09:38 PM
Uno Uno is offline
 
Join Date: May 2005
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jGas View Post
thanks! if you can improve it a little bit...maybe without changing vbulletin php files, it would be better..but i like it
Sorry, there is not a Hoock on textarea.php
But this file is equal on most vb version, if you copy can make upgrade of vbulletin without problem.
Reply With Quote
  #4  
Old 05-06-2009, 01:18 PM
Daniel_HBK Daniel_HBK is offline
 
Join Date: Feb 2006
Location: Egypt
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent hack !
Reply With Quote
  #5  
Old 05-06-2009, 03:11 PM
Uno Uno is offline
 
Join Date: May 2005
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Daniel_HBK View Post
Excellent hack !
Thank you
Reply With Quote
  #6  
Old 05-06-2009, 03:28 PM
vbboarder's Avatar
vbboarder vbboarder is offline
 
Join Date: Jun 2008
Location: Silicon Valley, CA
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks great! Useful integration for template editing. However, can you also do a mod or enable it for plugin editing? Thanks.
Reply With Quote
  #7  
Old 05-06-2009, 09:53 PM
Mutt's Avatar
Mutt Mutt is offline
 
Join Date: Nov 2001
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

same hack
https://vborg.vbsupport.ru/showthread.php?t=165595
Reply With Quote
  #8  
Old 05-06-2009, 10:24 PM
Uno Uno is offline
 
Join Date: May 2005
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vbboarder View Post
Looks great! Useful integration for template editing. However, can you also do a mod or enable it for plugin editing? Thanks.
perhaps you can use the other version, or perhaps i will try to make of a version simpler

Quote:
Originally Posted by Mutt View Post
Sorry, I had not seen this hack .... uhum... my version is only for template but is more simple to insert. (other approach)


however if the moderators think that this my hack is a double/copy can also cancel this thread

Edit: i have also add the button for some tag of common use for vb
Reply With Quote
  #9  
Old 05-06-2009, 11:21 PM
TAIFUN_T's Avatar
TAIFUN_T TAIFUN_T is offline
 
Join Date: Apr 2009
Location: Ukraine
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Uno, Thx! Very nice hack
Installed
Reply With Quote
  #10  
Old 05-06-2009, 11:24 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tagged, I'll be looking into this mod - Thanks!

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 03:01 AM.


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.05677 seconds
  • Memory Usage 2,338KB
  • 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_html
  • (4)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
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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