givanz / VvvebJs

Drag and drop page builder library written in vanilla javascript without dependencies or build tools.
https://www.vvveb.com/vvvebjs/editor.html
Apache License 2.0
6.86k stars 1.58k forks source link

Integrating Vvveb into a MEVRN project #311

Open Fedibrahem opened 11 months ago

Fedibrahem commented 11 months ago

hello Student here i was tasked with integrating a website builder into the web project and after many failed attempts i stumbled upon vvveb i tried the live version and i liked it and i managed to integrate it in my node project there are few issues tho that i wish that you can help me with! first of all thank you for the great project

-the save/upload and scan files are php and for the project to recognize them i had to put them in the views folder -creating a new file with any template results in a blank page with the error" Cannot GET /my-pages/my-paffge.html" ( it s an exemple name) you can drag n drop modules but they won t show with css or bootstrap after refreshing the page files don t stay

-files don t get saved after modifying them even tho i changed the save.php file when i press save this is the message that i receive "_REGISTER_GLOBAL_MODEL) { foreach ($model as $key => $'value) { $$key = $'value; } } // add express templates path to php includes path set_include_path($model->_VIEWS_PATH); // render the template include "$model->_TEMPLATE"; ?>"

-you can upload images but they won t show up as intended and will show as blanks

all these problems are probably due to the php files even tho i added the php extensions in the node server file with vvveb full access to the sub folders

any help will be appreciated if you want more clarification on any of the issue i will gladly explain it more and provide screenshots and videos thank you

and on a side note a documentation on the updated version would be useful i still haven t figured out how to make it work yet i am interested in adding the components of the new version to this old one thank you

givanz commented 11 months ago

Hi

Thank you.

You can't run php with node, you need to have php installed.

I added a basic node version in the last commit https://github.com/givanz/VvvebJs/commit/dcb3ca9942f4a16727c5de5e13dae94caaf8fa65 for save page save.js

To use it run the following in the VvvebJs folder.

npm install express
node save.js

Open http://localhost:8080/editor.html

https://github.com/givanz/VvvebJs#save-page

documentation on the updated version

I'm not sure what you mean with updated version, is the theme bundle release?

i am interested in adding the components of the new version to this old one

If you didn't make changes to the files then git will merge the changes on git pull

If you have changes then you can manually update using a diff tool such as https://meldmerge.org/ just compare your folder of VvvebJs with the latest version.