From 69d03fd9f451db8da8223119c363d2d5b982f273 Mon Sep 17 00:00:00 2001 From: AndreaChirulescu Date: Wed, 10 Mar 2021 20:44:42 +0100 Subject: Moved helpfiles inside giglog admin class Added help file for photo galleries --- giglogadmin.php | 76 ++++---- includes/admin/helpfiles/instr_photog.php | 297 ++++++++++++++++++++++++++++++ 2 files changed, 328 insertions(+), 45 deletions(-) create mode 100644 includes/admin/helpfiles/instr_photog.php 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 @@ +. + + + + */ + + + + + + + +if ( !class_exists( 'Instructions_Photogs' ) ) { + + + + class Instructions_Photogs { + + + + static function render_instr_photo_html() { + + + + ?> + + + +
+ + +

Go to https://wp.eternal-terror.com/wp-admin/

+ + + +

Step 1.

+ + + +

Create new post

+ + + +
+ + + +

Step 2

+ + + +

Load the Photo Gallery Template

+ + + +
+ + + +

Click OK on the popup asking you if you are sure

+ + + +

Step 3

+ + + +

Add a title to your gallery: EVENT NAME (festival or concert name)

+ + + +

Step4

+ + + +

Select Photo gallery as category and REMOVE any other selected category (until I figure out how to do this by default)

+ + + +
+ + + +

Step 5 Add event info, such as artist name, venue, organizer, photographer

+ + + +

Step 6 Click on Add Gallery button which will open a nextgen gallery management window

+ + + +
+ + + +

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
Album name is the same as the event. Note that each album will contain several galleries (if needed)

+ + + +
+ + + +

In the example above I call my album Tons of Rock 2021

+ + + +

Step 8

+ + + +

Go to Upload images. Write the name of the gallery and click Create&Select. Each gallery represents a band name for your event

+ + + +
+ + + +

I will call mine band1, band2 and band3

+ + + +

Step 9

+ + + +

After you click create & 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

+ + + +

You are taken back to step 7 which you can repeat for all the bands in your event.

+ + + +

Step 10

+ + + +

Once you are done create a gallery for each band, go to Manage Albums

+ + + +

The rightmost column contains a list of all albums. You can also select an album from the drop down at the top

+ + + +
+ + + +

In my case I will select Tons of Rock 2021

+ + + +

With this album selected, I will drag and drop the newly created galleries into this album

+ + + +
+ + + +

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

+ + + +

After I drag and drop my albums called Band1, Band2 and Band3 from the second to the first column, it will look like this

+ + + +
+ + + +

Click UPDATE button on top once you have dragged the correct galleries

+ + + +

Step 11

+ + + +

Click Insert Into Page and make sure you switcj from Galleries to Albums in the first field

+ + + +
+ + + +

Then from the next drop down menu select the newly created album

+ + + +
+ + + +

Leave the settings as they are and click Insert Gallery

+ + + +

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.

+ + + +

Step 12

+ + + +

Click Submit for review when done

+ + + +
+
+ + + + \ No newline at end of file -- cgit v1.2.3