AdminHelper – assistant application for site administrator
Visit site
PUG
SCSS
JavaScript
PHP
An application that automates the process of creating new material for the site. With its help, the administrator receives the finished HTML code of the article in a short period of time.
The application generates a ready-made HTML code for the article from the materials of the task (images and a Word file), and also saves cropped images to the /images/ folder.
This service, developed for process automation of creating a new page code, helps the site administrator quickly compose an article that includes text, photo and video carousels, link buttons, review sliders and price tables. Then the administrator can paste this code into the admin panel of the site during the creation of a new material.
Application functions are implemented on a bunch of JavaScript + Php. It is possible to create articles for 3 different sites. Layout was carried out using Crystalball (It is a web app project scaffolding tool powered with GULP for frontend development. Out-of-the box it has: PUG templating, SASS styling, WEBPACK bundler).
Implemented in the application (What does the app do)
The simplest authorization in PHP (login.php).
Reading Word file (getWordText.php) and inserting formatted text into Ckeditor 4 Html editor
Formation of code for link buttons, Price buttons (Page elements tab).
For the «Read more» block: getting the Html code of different web pages (getWebPageHtml.php), finding the title image and generating the finished code for this block (Page elements tab).
Getting YouTube video titles using PHP (getYoutubeData.php), generating YouTube gallery code (Page elements tab).
Formation of code for photo carousels (Page elements tab).
Cropping, renaming and saving images to the /images/ directory in PHP (createImageGallery.php).
Inserting code from different fields into the resulting field, adding Meta-title and Meta-description to the end of the finished code for 2 types of pages (Service and Blog Article), Copy code button (Ready HTML code tab).
Formation of ready-made Html code of price tables from text logically marked up with certain symbols (Price page).
The service includes updating price lists through integration with Google Sheets and Google Apps Script. This integration is described here in...
Algorithm of the administrator's work (Demo of the process)
The main stages of work on creating new material for the site
Reception task materials and uploading them to the site folder /adminhelper/files/.
Working in the AdminHelper application.
Inserting the finished HTML code into the Admin panel of the site.
Detailed algorithm of actions
In the mail, open a letter with a task, download the materials (Word file and images) to the computer in the site folder, copy the links for the buttons in the letter.
Upload the downloaded materials to the site in the directory /adminhelper/files/.
Click on the button Get word text, edit the text of the article, if necessary («Editor» tab).
Paste the links copied in the task into the field in the «Page elements» tab. Generate code.
In the «Page elements» tab, in the input field, enter a name for the images. If necessary, in the textarea Photo gallery of results, enter a list of image file names and the last line - a phrase after which you will need to insert a photo carousel.
Click the Generate code button.
Click the Insert All Into Article button.
In the «Ready HTML code» tab, select the type of material (Service or Article) and click on the Copy code button.
Go to the site's admin panel. Add a new material in the required section and paste the previously copied code into the Contents field. Complete the process of creating material on the site.
Ready! Open the created page on the site with text, photo carousels, buttons and a review slider.
The principle of generating HTML code
When generating fragments of HTML code, a markup language is used.
Text is inserted into the textarea field in combination with logical markup as a set of certain characters.
The Generate code button is pressed.
JavaScript handles the click on a specific button by returning a line of code.
Ready HTML code is inserted into the textarea field below.
All fragments according to a certain order are collected into a single resulting code after clicking on the Insert all into article button. The user will be redirected to the Ready HTML Code tab.
Example: link-buttons at the top of an article
Example: price table for the Pricing section
The Price page in the AdminHelper application.
How AdminHelper App helps
AdminHelper performs many operations automatically, thereby significantly reducing the time required to create a new page of the site.
The administrator does not have to:
Text: open text in Word; format text by adding H2 headings; copy this text and paste it into the admin panel editor for further work with it.
Images: crop them in some graphics editor; create smaller thumbnails; rename images; waste time uploading them to the site.
Photo sliders (owl-carousel): manually generate HTML code using image titles (alt) and new filenames (src); insert each carousel in the text after a specific phrase.
YouTube carousel: go to YouTube and copy the title of each video; manually generate the HTML code of the gallery.
Buttons: manually generate HTML code from links.
Price lists: manually generate HTML code for tables for the pages of the Prices section of the site.