-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Webpage editor #57
Comments
I think it would definetly be possible. I will investigate the details and give you an update if I find a smart way to implement/test this. |
Thanks! I guess file upload support is already in edupage_api/cloud.py but I didn't find the ability to read the file list and create folders. I looked at the news edit page (/news/?akcia=save) and I see that the data sent in POST is compressed using https://github.com/imaya/zlib.js and converted to Base64. I don't know if zlib libraries from python will be compatible with zlib.js? This page decodes data sent by the news editor: https://jgraph.github.io/drawio-tools/tools/convert.html |
To my knowledge, there is no way in the Edupage's website itself to upload folders (only .zip files that contain folders), or to browse the files you (or someone else uploaded). Can you do that? Did I not notice something? |
I mean creating new empty directories. On the /customize/files.php page, in the lower right corner, there is a button with a directory icon (class "newFolderBtn"). As for reading the list of files, it should be doable but requires parsing the HTML returned by files.php (POST cmd=FilesBrowser akcia=getTab). |
Seems pretty hard to implement:/. I've written some code, but nothing complete. I am putting this feature into my backlist and I will work on it when I have more time. It would be very helpful if you could provide at least some code or example requests (or you can specify what exactly you need). |
Hi, thanks for the info. In the end, I decided to use javascript directly in the browser console window. This way I can access some of the edupage functions directly and not have to write them from scratch. My goal was to move the news content from the existing joomla site to the edupage site. This was more or less successful, although I still have my doubts that the news entered manually doesn't display a little differently than the imported ones. However, this may be the result of different text formatting in joomla. |
Would it be possible for you to provide the code you used? (The javascript you run in the browser would be enough) |
Key scripts are:
The newsItemEditor.js script handles the saving and publishing of news. You can find there an object with list of public functions:
In addition to this, the key element is the substituted POST support from jQuery in the edubarUtils.js file:
The save() function from newsItemEditor retrieves the data from the editor form on the page, prepares the data structure and sends it using a substituted $.post in edubarUtils which compresses the entire query and sends it to the backend. The way my code works is that it prepares an analogous data structure, but before sending it to $.post it substitutes the HTML content with data exported from joomla. IMPORTANT: the assumption is that my script runs from the console and only when the news edit dialog is open in the browser. First, I'm querying for:
Creating url for posting data:
News data structure (notice the use of the external getData function directly from the editor on the page):
Next, I'm parsing returned html and looking for first text field.
Substitution (sorry about those widgets.widgets... mess):
News title:
Yet another structure, this time for edubarUtils' post:
And now we are ready to send postData structure to edubarUtils' post (accessible by $j.post):
|
Thank you very much! |
Is there support for editing the school website in the library expansion plans? I am looking for the ability to modify:
The text was updated successfully, but these errors were encountered: