The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
vBulletin4 - Admincp Editor Replacement - CodeMirror, Any Interest?
I had a special project at work that needed code mirror so I took a look at vb4 and decided for the fun of it, if I could replace the template editor and the plugin editor. I haven't finished the plugin editor (still some more JavaScript to do), but the template editor is working nicely.
I am not sure what to do with this because it is unlikely that I can turn it into any sort of instructions for someone else to install -- since there are basically no hooks in the admincp and too many critical edits. Maybe I can auto-parse files, but that would only work for a single version most likely. If anyone has a better suggestion please let me know and maybe I can share the work ... I would also like to know if anyone is interested in this so I do not waste my time. |
#2
|
||||
|
||||
Are you using the vbulletin mode? I grabbed it from vBulletin 5 but it's really ugly and it looks different on vB4. The css is the same but html codes are different, for example on vbulletin 5 one class is "lineNumbers" and on vB4 it is "lineNumber". That's why it's so different. Did you get it working completely?
|
#3
|
||||
|
||||
bump
|
#4
|
||||
|
||||
This actually looks pretty interesting. I know it was necro'd but, might as well.
|
#5
|
|||
|
|||
I think I finished this a year ago and no one commented. Since then a buddy of mine @Nerbert put out a modification, so I never bothered with turning mine into a modification. I have radically changed it since then, just kind of modding as I need features. I started the code before vBulletin included theirs, in fact I have never looked at their implementation -- I probably should, maybe I will learn something.
@nerbert's modification is very good as a base and it will quickly get you going. I recommend it! If you have any issues with @Nerbert's modification, I am always around and I will always talk code. Make sure you thank him. I think the only thing that @nerbert's modification is really missing is enlarging. If I remember. P.S. - It is a real time saver if you are constantly trying things out and making small changes. --------------- Added 31 Jul 2014 at 15:46 --------------- I am currently -- very slowly as I have time -- implementing CKeditor4 for vbulletin4, just for the kicks of it. It will never be released here, but I am happy to share the concepts and code fragments with others that might want to attempt it. vBulletin extensively tests their code, I do not have that luxury and editors are a sensitive area, so releasing or displaying the code on vBulletin could lead to an exploit on someones site. I use to use photopost for a gallery on my daughter's board before my own programming out paced theirs. It lacked a real editor at the time -- I think they just recently (last six months) added MCE --, and so I implemented CKeditor4 and styled it more like CKeditor3 so as to not upset the users. I have also implemented CKeditor4 for her mobile platform. After working out most of the bugs on the current platforms, I have decided to implement a rendition for the main board. Currently, I have been trying to figure out away to make it switchable via the user so that I have a larger testing base with the new editor, yet give them the comfort of the old editor for everyday use. |
#6
|
||||
|
||||
I've seen nerbert's solution but i don't really like EditArea
I'd love to use codemirror with vbulletin as mode, i get codemirror working but the html mixed mode don't fit well with vbulletin template syntax. I ended up grabbing vbulletin mode from vb5 but it doesn't work very well, for example as i said the style is for some html reasons different and also I can't use anymore codemirror's addons, such as code folding and autoclose tag.. So i'd love to see how you implemented it if possible, i'm not asking to realease a modification of corse |
#7
|
|||
|
|||
[quote=Scanu;2509223]I've seen nerbert's solution but i don't really like EditArea
I'd love to use codemirror with vbulletin as mode, i get codemirror working but the html mixed mode don't fit well with vbulletin template syntax. I ended up grabbing vbulletin mode from vb5 but it doesn't work very well, for example as i said the style is for some html reasons different and also I can't use anymore codemirror's addons, such as code folding and autoclose tag.. So i'd love to see how you implemented it if possible, i'm not asking to realease a modification of corse When I have time, I will take a look at what I did. Mine is really a kludge, meaning that I do not use the plugin system -- so I have to kind of hunt things down. I do remember writing/adding some helper JavaScript to get things working the way I wanted. It needed a little help in exception wording for vbulletin curly braces, <vb-if> tags and highlighting. Not sure if I ever added code folding and I am sure I stripped out the code dragging function. @Nerbert's code never did any of it and it worked perfectly fine. I remember helping a friend use codemirror on a vbulletin project and we pretty much used the standard distribution. Unfortunately, I cannot find @Nerbert's code listed on the board; not sure what happened there, maybe I imagined he released it. I am not hung-up on sharing or showing code, if it is legal to share. The company I work for, owns me so I have a few restrictions there, other than that I am happy to assist. |
Благодарность от: | ||
Scanu |
#8
|
||||
|
||||
Ok then don't worry about that, seems like I better stay with the vbulletin 5 mode without addons (I've fixed css) or stay with the html mixed mode without vbulletin template syntax highlighting because I'm not skilled enough in javascript coding to fix one of these 2 problems.
I think you didn't imagine that. He said that he would have released a codemirror version but I think he never did. Nevermind thank you for your help And for the plugins part, I guess it's impossible since there aren't many hooks there my solution is different from the nerbert's one and it's editing template.php file adding js resources at the start and adding Codemirror setup after the textarea is printed, and i Used the javascript variable textarea_id. |
#9
|
|||
|
|||
It's pure chance I happened to log in here and stumble on this thread. Haven't been coding for months.
I do have a Code-Mirror editor for templates and plugins (and other admin textareas) for vB4 but it's part of a file manager project I've been working on. I could copy out the required parts I guess and make a product out of it. It will involve a direct file edit in includes/adminfunctions.php. I don't know anything about vB5 so you're on your own there. This could take a day or so. I have two different versions and I have to check out which is best. And i'm veeeeeeeeeeeeeery rusty at coding. |
Благодарность от: | ||
Scanu |
#10
|
||||
|
||||
Thank you very much for this, does your codemirror version recognize vbulletin template syntax?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|