summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreaChirulescu <andrea.chirulescu@gmail.com>2021-03-10 20:44:42 +0100
committerAndreaChirulescu <andrea.chirulescu@gmail.com>2021-03-10 20:44:42 +0100
commit69d03fd9f451db8da8223119c363d2d5b982f273 (patch)
treebc08a5fd2a31a09304dd38827737ab4def4428bc
parent06af2ce37c3e6f2111d3be8ae91da94873609ec6 (diff)
downloadgigologadmin-69d03fd9f451db8da8223119c363d2d5b982f273.tar.gz
gigologadmin-69d03fd9f451db8da8223119c363d2d5b982f273.tar.bz2
gigologadmin-69d03fd9f451db8da8223119c363d2d5b982f273.zip
Moved helpfiles inside giglog admin class
Added help file for photo galleries
-rw-r--r--giglogadmin.php76
-rw-r--r--includes/admin/helpfiles/instr_photog.php297
2 files changed, 328 insertions, 45 deletions
diff --git a/giglogadmin.php b/giglogadmin.php
index b711baa..4e38a3f 100644
--- a/giglogadmin.php
+++ b/giglogadmin.php
@@ -18,50 +18,6 @@
*/
-
-/*Andrea's attempt at creating help files. Didn't get it to work inside giglogadmin class so it's all defined before that section */
- require_once __DIR__ . '/includes/admin/helpfiles/instrunctions.php';
- require_once __DIR__ . '/includes/admin/helpfiles/instr_reviewers.php';
- add_action( 'admin_menu', 'add_help_pages');
-
- function add_help_pages() {
-
- add_menu_page(
-
- "Help for ET users", // Page title
-
- "Help for ET users", // Menu title
-
- "upload_files", // Will show for users with this capability
-
- "helpfiles", // menu slug
-
- array( 'Instructions_Page', 'render_instr_html' ), // callable
-
- 'dashicons-tickets-alt', // Icon url
-
- 10); // Position, just below 'Media'
-
-
- add_submenu_page(
-
- "helpfiles", // parent slug
-
- "Reviewer help files", // page title
-
- "Reviewer help files", // menu title
-
- "upload_files", // required capability
-
- "reviewer_help", // menu slug
-
- array( 'Instructions_Reviewers', 'render_instr_rev_html' )); // callable
-
-
- }
-
-
-
if ( !class_exists( 'GiglogAdmin_Plugin' ) ) {
require_once __DIR__ . '/includes/public/shortcodes/giglog_bands.php';
require_once __DIR__ . '/includes/public/shortcodes/giglog_display_unprocessed.php';
@@ -69,6 +25,8 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) {
require_once __DIR__ . '/includes/public/shortcodes/giglog_process_files.php';
require_once __DIR__ . '/includes/admin/views/giglog_admin_page.php';
require_once __DIR__ . '/includes/admin/views/giglog_import_gigs.php';
+ require_once __DIR__ . '/includes/admin/helpfiles/instrunctions.php';
+ require_once __DIR__ . '/includes/admin/helpfiles/instr_reviewers.php';
class GiglogAdmin_Plugin
{
@@ -80,6 +38,7 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) {
add_shortcode('giglog_photog', 'giglogadmin_photographers');
add_action( 'admin_menu', array( 'GiglogAdmin_Plugin', 'add_admin_pages' ));
+ add_action( 'admin_menu', 'add_help_pages');
add_filter( 'wp_nav_menu_args', array( 'GiglogAdmin_Plugin', 'nav_menu_args' ));
}
@@ -114,7 +73,34 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) {
add_action( 'load-' . $import_hook, array( 'GiglogAdmin_ImportGigsPage', 'submit_form' ) );
}
-
+ function add_help_pages() {
+ add_menu_page(
+ "Help for ET users", // Page title
+ "Help for ET users", // Menu title
+ "upload_files", // Will show for users with this capability
+ "helpfiles", // menu slug
+ array( 'Instructions_Page', 'render_instr_html' ), // callable
+ 'dashicons-tickets-alt', // Icon url
+ 10); // Position, just below 'Media'
+
+ add_submenu_page(
+ "helpfiles", // parent slug
+ "Reviewer help files", // page title
+ "Reviewer help files", // menu title
+ "upload_files", // required capability
+ "reviewer_help", // menu slug
+ array( 'Instructions_Reviewers', 'render_instr_rev_html' )); // callable
+
+ add_submenu_page(
+ "helpfiles", // parent slug
+ "Photogalleries help files", // page title
+ "Photogalleries help files", // menu title
+ "upload_files", // required capability
+ "photog_help", // menu slug
+ array( 'Instructions_Photogs', 'render_instr_photo_html' )); // callable
+
+ }
+
/*
* Show menus based on whether user is logged in or not.
*
diff --git a/includes/admin/helpfiles/instr_photog.php b/includes/admin/helpfiles/instr_photog.php
new file mode 100644
index 0000000..34af4dd
--- /dev/null
+++ b/includes/admin/helpfiles/instr_photog.php
@@ -0,0 +1,297 @@
+<?php
+
+
+
+/*
+
+
+
+ * Copyright (C) 2021 Harald Eilertsen, Andrea Chirulescu
+
+
+
+ *
+
+
+
+ * This program is free software: you can redistribute it and/or modify
+
+
+
+ * it under the terms of the GNU Affero General Public License as
+
+
+
+ * published by the Free Software Foundation, either version 3 of the
+
+
+
+ * License, or (at your option) any later version.
+
+
+
+ *
+
+
+
+ * This program is distributed in the hope that it will be useful,
+
+
+
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
+
+
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+
+
+
+ * GNU Affero General Public License for more details.
+
+
+
+ *
+
+
+
+ * You should have received a copy of the GNU Affero General Public License
+
+
+
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+
+ */
+
+
+
+
+
+
+
+if ( !class_exists( 'Instructions_Photogs' ) ) {
+
+
+
+ class Instructions_Photogs {
+
+
+
+ static function render_instr_photo_html() {
+
+
+
+ ?>
+
+
+
+ <div class="wrap">
+
+<!-- wp:paragraph -->
+<p>Go to <a href="https://wp.eternal-terror.com/wp-admin/">https://wp.eternal-terror.com/wp-admin/</a></p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Step 1.</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Create new post</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:image {"id":826,"sizeSlug":"large","linkDestination":"none"} -->
+<figure class="wp-block-image size-large"><img src="https://wp.eternal-terror.com/wp-content/uploads/2021/03/image-3.png" alt="" class="wp-image-826"/></figure>
+<!-- /wp:image -->
+
+<!-- wp:paragraph -->
+<p>Step 2</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Load the Photo Gallery Template</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:image {"id":827,"sizeSlug":"large","linkDestination":"none"} -->
+<figure class="wp-block-image size-large"><img src="https://wp.eternal-terror.com/wp-content/uploads/2021/03/image-4.png" alt="" class="wp-image-827"/></figure>
+<!-- /wp:image -->
+
+<!-- wp:paragraph -->
+<p>Click OK on the popup asking you if you are sure</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Step 3</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Add a title to your gallery: EVENT NAME (festival or concert name)</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Step4</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Select Photo gallery as category and REMOVE any other selected category (until I figure out how to do this by default)</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:image {"id":828,"sizeSlug":"large","linkDestination":"none"} -->
+<figure class="wp-block-image size-large"><img src="https://wp.eternal-terror.com/wp-content/uploads/2021/03/image-5.png" alt="" class="wp-image-828"/></figure>
+<!-- /wp:image -->
+
+<!-- wp:paragraph -->
+<p>Step 5 Add event info, such as artist name, venue, organizer, photographer</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Step 6 Click on Add Gallery button which will open a nextgen gallery management window</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:image {"id":829,"sizeSlug":"large","linkDestination":"none"} -->
+<figure class="wp-block-image size-large"><img src="https://wp.eternal-terror.com/wp-content/uploads/2021/03/image-6.png" alt="" class="wp-image-829"/></figure>
+<!-- /wp:image -->
+
+<!-- wp:paragraph -->
+<p>Step 7 Click Manage Albums and in the window that opens fill in the album name netx to the text 'Add new album' and click ADD<br>Album name is the same as the event. Note that each album will contain several galleries (if needed)</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:image {"id":830,"sizeSlug":"large","linkDestination":"none"} -->
+<figure class="wp-block-image size-large"><img src="https://wp.eternal-terror.com/wp-content/uploads/2021/03/image-7-1024x255.png" alt="" class="wp-image-830"/></figure>
+<!-- /wp:image -->
+
+<!-- wp:paragraph -->
+<p>In the example above I call my album Tons of Rock 2021</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Step 8</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Go to Upload images. Write the name of the gallery and click Create&amp;Select. Each gallery represents a band name for your event</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:image {"id":831,"sizeSlug":"large","linkDestination":"none"} -->
+<figure class="wp-block-image size-large"><img src="https://wp.eternal-terror.com/wp-content/uploads/2021/03/image-8-1024x336.png" alt="" class="wp-image-831"/></figure>
+<!-- /wp:image -->
+
+<!-- wp:paragraph -->
+<p>I will call mine band1, band2 and band3</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Step 9</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>After you click create &amp; select you can drag images into the gallery and once they load in the window, click Upload files at the bottom. Now your images have been uploaded to the gallery</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>You are taken back to step 7 which you can repeat for all the bands in your event.</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Step 10</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Once you are done create a gallery for each band, go to Manage Albums</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>The rightmost column contains a list of all albums. You can also select an album from the drop down at the top</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:image {"id":832,"sizeSlug":"large","linkDestination":"none"} -->
+<figure class="wp-block-image size-large"><img src="https://wp.eternal-terror.com/wp-content/uploads/2021/03/image-9.png" alt="" class="wp-image-832"/></figure>
+<!-- /wp:image -->
+
+<!-- wp:paragraph -->
+<p>In my case I will select Tons of Rock 2021</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>With this album selected, I will drag and drop the newly created galleries into this album</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:image {"id":833,"sizeSlug":"large","linkDestination":"none"} -->
+<figure class="wp-block-image size-large"><img src="https://wp.eternal-terror.com/wp-content/uploads/2021/03/image-10-1024x466.png" alt="" class="wp-image-833"/></figure>
+<!-- /wp:image -->
+
+<!-- wp:paragraph -->
+<p>The galleries will be available in the middle column. And the column on the left are the galleries inside the current album. Initially,t here are no galleries in the album and it looks like this</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>After I drag and drop my albums called Band1, Band2 and Band3 from the second to the first column, it will look like this</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:image {"id":834,"sizeSlug":"large","linkDestination":"none"} -->
+<figure class="wp-block-image size-large"><img src="https://wp.eternal-terror.com/wp-content/uploads/2021/03/image-11-1024x357.png" alt="" class="wp-image-834"/></figure>
+<!-- /wp:image -->
+
+<!-- wp:paragraph -->
+<p>Click UPDATE button on top once you have dragged the correct galleries</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Step 11</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Click Insert Into Page and make sure you switcj from Galleries to Albums in the first field</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:image {"id":835,"sizeSlug":"large","linkDestination":"none"} -->
+<figure class="wp-block-image size-large"><img src="https://wp.eternal-terror.com/wp-content/uploads/2021/03/image-12.png" alt="" class="wp-image-835"/></figure>
+<!-- /wp:image -->
+
+<!-- wp:paragraph -->
+<p>Then from the next drop down menu select the newly created album</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:image {"id":836,"sizeSlug":"large","linkDestination":"none"} -->
+<figure class="wp-block-image size-large"><img src="https://wp.eternal-terror.com/wp-content/uploads/2021/03/image-13.png" alt="" class="wp-image-836"/></figure>
+<!-- /wp:image -->
+
+<!-- wp:paragraph -->
+<p>Leave the settings as they are and click Insert Gallery</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>The gallery palceholder will be added to your post. Preferably at the end of the post, but it's ok, the editor will fix it.</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Step 12</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:paragraph -->
+<p>Click Submit for review when done</p>
+<!-- /wp:paragraph -->
+
+<!-- wp:image {"id":837,"sizeSlug":"large","linkDestination":"none"} -->
+<figure class="wp-block-image size-large"><img src="https://wp.eternal-terror.com/wp-content/uploads/2021/03/image-14.png" alt="" class="wp-image-837"/></figure>
+<!-- /wp:image --> </div>
+
+
+
+ <?php
+
+
+
+ }
+
+
+
+ }
+
+
+
+}
+
+
+
+?> \ No newline at end of file