PDA

View Full Version : Administrative and Maintenance Tools - [ForumOps] vBulletin Development Environment


ForumOps
06-01-2011, 10:00 PM
https://vborg.vbsupport.ru/

vBulletin Development Environment

vBulletin Development Environment (VDE) is a tool that allows you to build vBulletin products entirely from the filesystem. By using the filesystem, it allows you to follow best practises such as using version control, and simply working on actual files. Having to switch between browser windows and copy/paste is extremely inefficient.

This product has been updated to work with with vBulletin 3.5 and up to the latest 4.x series.

Runtime Environment

Assuming all of your files are in place, VDE checks your ./projects directory on every page load, and injects all of your projects' templates, plugins, etc. into memory and runs them as if they were natively installed into vBulletin.

Product Builder

VDE also comes with a project builder, which allows you to export your project into a standard product XML, and also any associated files with your project.

Open Source

This product is open source, and I encourage everyone who uses it to contribute back via GitHub (https://github.com/ForumOps/vBulletin-Development-Environment).

Installation Instructions

Short version: upload files, import product XML. There are slightly different instructions based on whether or not you are running vBulletin 3 or 4.

Full instructions can be found at:
https://github.com/ForumOps/vBulletin-Development-Environment

I will not be posting any change logs or detailed instructions here, because they may change heavily with each version. Please refer to the GitHub page.

Disclaimer: this product was originally developed by SirAdrian / Adrian Schneider, who is part of our staff, and the primary maintainer of the product still.

TheLastSuperman
06-02-2011, 05:10 PM
Awesome Adrian, thanks for releasing! - Installed!

If I weren't on staff I would nominate and vote for motm ;).

ForumOps
06-02-2011, 05:17 PM
My pleasure.

Please note, I will be posting some simple modifications built with this over the next week or two to try and provide more useful examples as there is a bit of a learning curve the first time around.

Adrian Schneider
06-03-2011, 12:47 AM
Would anyone be interested in having the ability to generate the filesystem stuff based on the product data in vBulletin? (reverse the build process)

Usage would be something like,
php vde.php import product_idI need it myself, so will probably start that soon, but speak up if it's also useful for you so I can bump it up in the priority list.

Blaine0002
06-03-2011, 02:31 AM
yes! copying phrases from the admin into seperate text files is a big PAIN!

Andreas
06-03-2011, 07:24 AM
Awesome stuff :)

I thought about building smth. similar for a long time but never had enough time / interest to actually start developing.

You could avoid the file edit by changing

vBulletinHook::$pluginlist[$hook] = 'global $vdeRuntime;' .
"\n" . '$vdeRuntime->listenAtHook("' . $hook . '");' .
"\n" . $hookObj->pluginlist[$hook];


to


$this->_registry->pluginlist[$hook] = 'global $vdeRuntime;' .
"\n" . '$vdeRuntime->listenAtHook("' . $hook . '");' .
"\n" . $this->_registry->pluginlist[$hook];
vBulletinHook::setPluginlist($this->_registry->pluginlist);

Guest190829
06-03-2011, 03:36 PM
Nice, I'll try this out on my next vB project. :up:

Sayid
06-03-2011, 03:51 PM
interesting mod, will try it soon in the summer holiday :D

Adrian Schneider
06-03-2011, 03:56 PM
Thanks, Andreas. :up: I'll try to get that updated soon, as I hate file edits.

Brandon Sheley
06-03-2011, 04:11 PM
If I weren't on staff I would nominate and vote for motm ;).

I voted for ya :up:

Adrian Schneider
06-03-2011, 07:05 PM
I actually needed the ability to port an existing product into VDE today so it has been written! I'll update Github first within the next few days (maybe sooner) and the actual packages a bit later as time permits.

ForumOps
06-04-2011, 07:42 PM
Update: you can now specify entire directories by name rather than having to list each of their files in a project's config.php file.

Example,

array('files' => array(
'/my_dir'
));

Is automatically expanded to

array('files' => array(
'/my_dir'/index.php',
'/my_dir/another_file.php'
));


Also, you can now import existing products into VDE automatically, by using the 'port' command:

php vde.php port existing_product_id projects/save_here

Next up is adding is removing the required edit as per Andreas' comment above. The latest code is on GitHub - I will only have time to update the official packages once per week or so.

Has anyone had a chance to build a plugin from scratch with this yet? Would love some feedback, especially on the documentation side of things as it was quite rushed. I've been using this method for years, so my steps are probably lacking.

TheLastSuperman
06-04-2011, 10:00 PM
I voted for ya :up:

TY TY!

And Adrian coming along even better I should have been eying this closer per your comments on messenger... I believe Adrian said it took them 3 hours to port a product that should have normally taken 30+ hours via the admincp (huge btw) so all-in-all this is killer imo! I still have not tested this myself however I have installed it on the forum some of us Advisors here use as I thought it might be helpful to BirdofPrey5 and DigitalJedi if they wanted to utilize it and well me too eventually.

Just plain awesome :cool:.

Hareth
06-04-2011, 10:04 PM
Great work Adrian,, Thank you!

Hareth
06-05-2011, 08:55 PM
Not working with me!

Warning: scandir([path]/projects) [function.scandir]: failed to open dir: No error in [path]\includes\vde\runtime.php on line 115

Warning: scandir() [function.scandir]: (errno 0): No error in [path]\includes\vde\runtime.php on line 115

Warning: Invalid argument supplied for foreach() in [path]\includes\vde\runtime.php on line

TheLastSuperman
06-06-2011, 12:07 AM
Not working with me!

Warning: scandir([path]/projects) [function.scandir]: failed to open dir: No error in [path]\includes\vde\runtime.php on line 115

Warning: scandir() [function.scandir]: (errno 0): No error in [path]\includes\vde\runtime.php on line 115

Warning: Invalid argument supplied for foreach() in [path]\includes\vde\runtime.php on line

You've uploaded the files and made the proper file edit (different for 3.x than it is 4.x please note) mentioned in the README.txt on GitHub correct?

https://github.com/ForumOps/vBulletin-Development-Environment

Adrian Schneider
06-06-2011, 03:29 PM
Not working with me!

Warning: scandir([path]/projects) [function.scandir]: failed to open dir: No error in [path]\includes\vde\runtime.php on line 115

Warning: scandir() [function.scandir]: (errno 0): No error in [path]\includes\vde\runtime.php on line 115

Warning: Invalid argument supplied for foreach() in [path]\includes\vde\runtime.php on line
You need to create a 'projects' directory in your forum path. Let me know if that doesn't fix it... will mend instructions if this is the case.

Cheers

nhawk
06-06-2011, 07:16 PM
Getting an error when trying to port an existing mod..

From the style of the command, I would assume this needs to be run from a terminal window.

php vde.php port advapp projects/advapp
Invalid command. Use build or run

Adrian Schneider
06-06-2011, 07:25 PM
The download package here is old... I will be updating it today. We've made few updates since it was released.

If you download the latest version from GitHub (https://github.com/ForumOps/vBulletin-Development-Environment/zipball/master) it should solve your problems.

Cheers

nhawk
06-06-2011, 08:28 PM
Thanks, that worked.

But, I must be missing something really simple....

With the development environment enabled, my mod stops working completely. Disable the development environment and it works fine.

nhawk
06-06-2011, 08:38 PM
Nevermind, I had to enable it in the project directory.

Adrian Schneider
06-06-2011, 10:57 PM
I'll push a proper update out tomorrow with the latest code, a fix for that file edit, and a few more updates to the documentation (FAQs, perhaps)...

Glad to hear you figured it out.

Adrian Schneider
06-10-2011, 01:12 AM
Sorry guys, still having to update.

How many of would find this useful for style development? (if it's possible)

Kolbi
06-15-2011, 07:19 PM
Are there screens?

Adrian Schneider
06-15-2011, 07:28 PM
There are absolutely no interfaces anywhere, so there is nothing to screenshot. :)

Blaine0002
06-23-2011, 02:43 AM
Adrian, just a heads up, the link in your forumops signature has an invalid thread id

also, do you think it would be possible to load options into the vbulletin admincp runtime to make sure i have textfields yesno etc set properly?

Adrian Schneider
06-23-2011, 02:55 AM
Hmmm, it works for me (as guest or as member). Can you PM me the details so I can look into it?

To answer your question... no, unfortunately.

That would be a ton of work and would probably have duplicate some vBulletin code. I guess you get used to the different development style, and when something is somewhat stable, you can export it to another test site to test.

You technically can export, disable VDE, and import on the same site, but it can get a little confusing so I like to keep it separate.

I'll think about what the options are... maybe there is an easy way.

Blaine0002
06-23-2011, 03:19 AM
no biggie :) will pm you about the broken link.

merk_aus
06-23-2011, 04:02 AM
Fantastic effort Adrian,
I for a long time have wanted to get into this type of thing and so this will definately be a start. I am pretty sure it is my thing that you said would normally take 30+ hours but using this was done in the space of about 3 hours.

I have voted for motm for you.

Blaine0002
06-23-2011, 05:39 AM
also, im having a problem with this since the newest update. has anything changed with the options? i see my options files being included on the page.
I have a usergroup id number set in the options, and im an additional user in that usergroup id, however
$usergroups = $vbulletin->options['vbay_seller_usergroups'];
$usergroups = str_replace(" ", "", $usergroups);
$groups = explode(',',$usergroups);
is_member_of($vbulletin->userinfo, $groups)
is now returning false...

Blaine0002
06-23-2011, 06:03 AM
yes, i dont seem to be getting the use of $vboptions or $vbulletin->options for products with VDE

filename: vbay_seller_usergroups.php
<?php

$option = array(
'title' => 'Seller Usergroups',
'description' => 'Usergroup IDs for people that can post auctions, seperated by commas',
'datatype' => 'free',
'optioncode' => 'input',
'displayorder' => 1,
'defaultvalue' => "",
'value' => "9"
);

$vboptions[vbay_seller_usergroups] in any template returns nothing.

Adrian Schneider
06-23-2011, 03:05 PM
ah, yes.

<?php return array(
// stuff here
);Let me know if that fixes it for you. The documentation @ GitHub has been updated as well, FYI.


@Brendon, there were two projects I did around the same time, but yours was one of them, yes. :) Yours was the first of the two, so it was a little slower, but the second one was super quick.

And guys, I'm guilty. I still have to push some updates and update the packages as well.

Blaine0002
06-23-2011, 05:12 PM
oh good! i was thinking i was just having a derp moment and missing a semicolon or bracket somewhere ;)

edit: and yes that fixed it for me. thanks muchly.

Adrian Schneider
06-28-2011, 02:00 AM
Would you guys be interested in some sort of mechanism to allow you to have all of your files + projects directory OUT of vBulletin, for the sake of easier (and lighter) versioning?

Phase 1 would be support for the projects to live outside of vBulletin. Have a command line function to copy all of the files into vBulletin. (or for power users, rsync or similar to keep the directories in sync)

Phase 2 would be a PHP-based solution for this, though I'm not really sure what that would look like yet in terms of linux + windows compatibility...

Any thoughts?

Marv
06-28-2011, 04:52 AM
Jesus christ, what a mod! Adrian, we germans call that the eierlegende Wollmilchsau (a funnier version of one-does-it-all)! Great work, much appreciated. Nominated.

Adrian Schneider
06-28-2011, 04:17 PM
Glad you like it. :D

It has been an enormous help to me on a daily (hourly?) basis.

EquinoxWorld
06-28-2011, 06:13 PM
Adrian, I am somewhat a noob at coding and at developing software, would this be a good place to start with? Would it be easy for me to start developing my own mod with this tool? I have owned and managed my website for over 2 years and do all of the "technical" stuff but haven't really put myself to learn the actual development; in the last weeks I have dived in , literally dived in to a warm delicious pool of codes and variables and I must say I LOVE IT! Any pointers for a noob to start playing with this mod to get a better handle on how vb modification come about? Or any light in the right direction for that matter would be awesome. Thanks Adrian! :)

P.S.: Anyone looking to be a mentor for a "natural" (wishful thinking) coder please let me know. :)
P.S.: Joined Github - EquinoxAW

Adrian Schneider
06-28-2011, 07:18 PM
VDE adds a small layer of complexity on top of what exists already, so I can't say whether or not it will help you understand programming.

However, if you use it to convert a downloaded product into actual files you can look at it, you will be able to get your hands dirtier a lot faster since you can edit a file, save it, and see what happens.

Best advise I can give you is to ask a ton of questions. The private coders discussion forum is probably your best bet for vBulletin stuff.

Cheers

ForumOps
07-08-2011, 10:26 PM
Next planned features:

Include other files in a release - Immediately - Add a way to include other files as part of the release that don't go in 'upload'. This will probably be a new subfolder per project so you can create folders such as "do_not_upload" or "docs" in there.

Merging Automatic Template Compiler (https://vborg.vbsupport.ru/showthread.php?t=170361) with VDE - Several Weeks - ATC is a similar modification to VDE, but instead of running things from filesystem and injecting into memory, it actually persists the templates properly into a style. This is fantastic for style development, or if you are working on an actual site and not just a product you want to distribute.

I'm working on a large new forum / skin / etc. right now, and I've created a original_templates and customized_templates inside of my project folder. If I want to customize a stock vBulletin template, then I copy it from original into customized, and as soon as I edit it, it will actually edit the template inside vBulletin. This allows us to still export the style as we normally would.

I plan on doing something similar for stock phrases, stylevars, etc. since when working on an actual site, it is crucial to modify this stuff.

Who here would find this useful? If not, I'll keep doing it how I'm doing it and not further develop it.

Jeff Ledger
07-08-2011, 10:47 PM
Merging Automatic Template Compiler with VDE - Several Weeks - ATC is a similar modification to VDE, but instead of running things from filesystem and injecting into memory, it actually persists the templates properly into a style. This is fantastic for style development, or if you are working on an actual site and not just a product you want to distribute.

I'm a lot interested in this one, any chance to get a test account ?

Adrian Schneider
07-08-2011, 10:50 PM
I'm just using VDE + ATC right now, didn't have to modify much to get it working.

For ATC, change the (only) plugin to global_bootstrap_complete, and global $vbulletin as a quick fix. All the configuration is in the plugin. That should give you enough to go off of. Other than that, I'm not sure what you mean by a "test account".

I do plan on adding that functionality to VDE though, but like I said above, it's probably several weeks away due to my workload at the moment. I'll do it in pieces as I need different functionality.

Cheers

Jeff Ledger
07-08-2011, 10:57 PM
A test account means I thought you were developing and testing on somewhere in a test board.

Thank you for these informations, I will test them soon and see if I can give you any suggestions or feedbacks.

Honestly, I never tried the Automatic Template Compiler before but I will definitely give it a try.

Jeff

Plugin Pete
07-13-2011, 06:57 PM
Adrian and Co... this looks like a fantastic tool, and I wish I'd had it when I started porting my latest project from WordPress to vBulletin. I'm going to spend the time now to move my project into your environment for ongoing development.

Thanks, and keep up the great work!

Adrian Schneider
08-05-2011, 04:50 AM
Hey Guys,

We've been working with ATC+VDE on the past few projects and were able to make some big fixes/changes to ATC. I'm going to start combining the two shortly.

For now, Jeff, feel free to PM me if you want the updated ATC code that works.

Adrian Schneider
08-17-2011, 05:02 PM
I should have a combined product released in a few days here. Anyone want to help test it later this week?

Thanks

Adrian Schneider
08-17-2011, 06:20 PM
If anyone wants to help look at the new updates, check them out on my fork (https://github.com/AdrianSchneider/vBulletin-Development-Environment).

New features:
-Merged ATC into VDE
-Scripts: generate posts, generate forums, export templates (from db to fs)

Will get merged in the next few days into the official repo.

Birched
04-24-2012, 01:30 AM
Does anyone who uses the Template Modification System (https://vborg.vbsupport.ru/showthread.php?t=152931) have experience trying to use it and VDE on the same install? Do they play nicely together?

merk_aus
05-21-2012, 09:53 PM
I believe that it was a port of an old mod for me to vb4 that adrian talked about on msn - a port that would usually take 30 hours took just a handful and that is why I have always supported adrian.

He gave me a 2 week estimate and the next day I received an e-mail saying here it is let me know if there are any issues.

I too would be interested to see if there was anyone who had created a project using this that they are ready to release.

datoneer
05-22-2012, 09:12 PM
Thank you awesome mod

Adrian Schneider
05-24-2012, 05:49 PM
I've pushed a ton of updates...

The latest version does support style / template development, though the documentation is probably only 80% there.

Let me know if any of you are still using this stuff and I'll spend more time on the docs!

Cheers

Dr.CustUmz
04-23-2014, 04:43 AM
i know this is old, but i love it!! i would just like to know, your git file doesn't include an xml... is the xml provided here the one we should use with the files from the git?

im mainly just interested in the template editing on the fly but just this whole thing is like vb orgasmic lol