applenights
Forum Replies Created
-
I found a bug in Photonic. I used the wizard this time, and generated the following shortcode parameters:
[gallery type='smugmug'
view='albums'
filter='jqZcSp,fGBq4z,W4ZgWr,TgjJDp,Lzf5wD,7gtPdH,bq2wb8,xWMnH5,Ld4CTn,Kf8JZS,8GCRQx,S4wN8B,HFhHxr,8gXTcb,hMd7fQ,f7kpMT,ZrtZqv,cNKmsn,MG5v5L,9sVB8z,MTpJnL,PkmNfh,H9xBML,8bLsrP,fCSjjV,WMNbbR,gc7JkB,bcv7kF,zsbLd9,vfG7bW,3RXtzJ,WGGdqh,4nxL8,vSTbSG,2fp52n,PXJzDx,LHZ7cH,t3btTf,rtPhJj,L99K29,PGsHDT,gSwDDW,FsJKCj,cfL4VH,b9f4b5,ZrdMC7,R2xcjv,Pg83J4,jPGSrb,75W2Th,vtVdnk,MdvpKQ,hk9qsx,gVKX5B,nZcZTQ,d5TLjf,F54npN,g6fnVd,sWd8SR,GcchJm,fbzG7F,VKRvmD,Q3s2F8,JPSCHw,6kn3Fn,74zgZL,jss26x,xJmmXg,2PSP8k,xdGP7K,tLRv6m,BPdRkv,9dMzJj,KFCfPw,zFfKTv,89gLPL,hQZpgx,XQCcNZ,pFj5Xf,kGmZJr,4QzHtK,S7bV7B,SHw2Sq,qhzQFP,Wz3Dv3,CvcT4f,8PfQVC,trVbF3,8wccdk,nzvJ68,v7NtvG,bDMGQj,PqCtmC,MSt3WL,TtBH3c,2qgxxh,67gVrk,rZZXcb,2LSmbR,sHnTJT,JpxXvG,JS5jZM,BpkVn8,3XKKw8,BCJbKc,68c24R,XnqB5t,jrMSMT,Qrgc2D,xDRHf6,gwH796,hPrrwX,kZSf86,vczGZ3,mrLC8N,2PJhT7,HkjgbM,rrQL66,KL64BG,mvZWZF,FqfHXK,X3gwHc,NnXBSC,WtMkfm,fVmxHH,XprWq4,8vL58Z,RRgLzH,bdQMN4,hZRhP5,GVw98X,L6bHKX,VcnDFK,jKZSgL,jRScD7,ZGSdtB,NNzLJL,7rt2nq,6RvPh7,6826Bv,hkmbzn,NJ4sxL,HjwZvP,Fk5S86,JHkWJV,H65ZVB,G5jbzn,nMss3X,kKvM4z,mCsZBC,TF2wwc,mpRRJZ,rtkfqs,WG86F6,mdmdSK,FWXSm2,jNWtH5,gpVLt2,fK4QKF,q44k7R,fPC8C2,vBbWKz,q8Xc2b,v89NHw'
nick_name='AppleNights'
columns='2'
sort_order='Descending'
sort_method='DateUploaded'
photo_count='18'
more='Show More'
load_mode='js'
layout_engine='css'
layout='masonry-horizontal']
Please take a look at the second image in the 1st row on this page:
https://woocommerce-1440268-5386905.cloudwaysapps.com/clubevent-photos/
Now click on the “Show More” button on the bottom. Every second click, instead of showing an even number of album covers, it inserts a random album cover in the second photo position. And when you scroll to the bottom to click on the show more button, you’ll notice odd number of photos; its not an even count anymore. When you click on the show more button, the photo counts are even again and the second photo in the 1st row goes back to normal displaying the correct second photo.
Is there a switch to fix this bug or will this have to be an actual code fix?
JoeI tried the layout=”horizantal masonry” and it looks like square with the small thumbnails. Please see the image below:

I’m not a fan of this look.. How can I write the “Justified Grid” shortcode parameter using the JS switch?
Joe
So everything else works fine now with the masonry display, except the photos display order is listed in order vertically per column.
Please view the album cover page on my website: https://woocommerce-1440268-5386905.cloudwaysapps.com/clubevent-photos/
Here is the album cover page in my smugmug account: https://photography.applenights.com/Concert-and-Club
How can I make Photonic display my album cover photos horizontally (3 images per row)?Joe
Hi Sayontan,
Thanks for your reply. I did notice this road block, which is disappointing. The setup I am trying to accomplish is almost perfect. I do like th Masonry layout or similar. The Square layout does display the images in the proper order, but they appear as little thumbnails in which I don’t like that type of display structure.
I removed the filter switch, the sort order worked for a little while but then eventually it started to randomize the display order again. Is there a way to make Masonry stop randomizing the display order?
Also I noticed the page limits the number of albums to display at 50. How can I set Photonic to allow all the album covers to display? Or if pagenation will be a better alternative for page load speed, how can I add pagenation buttons on the bottom?
Best regards,Joe
I am having some difficulty with the display order. According to Smugmug’s api call list i.e.:
Url: https://api.smugmug.com/api/v2/folder/user/AppleNights/Concert-and-Club!albumsAlbum [1 of 164] – Green and White Affair 2025
/api/v2/album/jqZcSpAlbum [2 of 164] – Enos Birthday Celebration
/api/v2/album/fGBq4zAlbum [3 of 164] – Maxappeal’s Birthday Celebration
/api/v2/album/W4ZgWrAlbum [4 of 164] – “My Birthday, My Way” Kreyol La Yacht Party / Ti Joe’s Birthday Bash
/api/v2/album/TgjJDpAlbum [5 of 164] – JE T’AIME MAMAN Feat. TATAN & SMOOTH JUDE
/api/v2/album/Lzf5wDAlbum [6 of 164] – Klass 13th Anniversary Gala
/api/v2/album/7gtPdHAlbum [7 of 164] – Joe Blizzy Album “Tha Plug” Album Release Party | After Work Mondays
/api/v2/album/bq2wb8Album [8 of 164] – Thanksgiving’s Classic Night featuring Tropicana and Zafem
/api/v2/album/xWMnH5Album [9 of 164] – SINFUL GOUYAD
/api/v2/album/Ld4CTnAs you can see, this list from Smugmug displays the albums within the Concert-and-Club folder exactly as it is listed in my Smugmug account. Here’s my smugmug account’s url for that folder:
https://photography.applenights.com/Concert-and-Club
This is the short code I entered on my web page to display the entire album within my Concert-and-Club folder:
[gallery type='smugmug' view='albums' album_sort_order='Date Added (Descending)' filter='jqZcSp,fGBq4z,W4ZgWr,TgjJDp,Lzf5wD,7gtPdH,bq2wb8,xWMnH5,Ld4CTn,Kf8JZS,8GCRQx,S4wN8B,HFhHxr,8gXTcb,hMd7fQ,f7kpMT,ZrtZqv,cNKmsn,MG5v5L,9sVB8z,MTpJnL,PkmNfh,H9xBML,8bLsrP,fCSjjV,WMNbbR,gc7JkB,bcv7kF,zsbLd9,vfG7bW,3RXtzJ,WGGdqh,4nxL8,vSTbSG,2fp52n,PXJzDx,LHZ7cH,t3btTf,rtPhJj,L99K29,PGsHDT,gSwDDW,FsJKCj,cfL4VH,b9f4b5,ZrdMC7,R2xcjv,Pg83J4,jPGSrb,75W2Th,vtVdnk,MdvpKQ,hk9qsx,gVKX5B,nZcZTQ,d5TLjf,F54npN,g6fnVd,sWd8SR,GcchJm,fbzG7F,VKRvmD,Q3s2F8,JPSCHw,6kn3Fn,74zgZL,jss26x,xJmmXg,2PSP8k,xdGP7K,tLRv6m,BPdRkv,9dMzJj,KFCfPw,zFfKTv,89gLPL,hQZpgx,XQCcNZ,pFj5Xf,kGmZJr,4QzHtK,S7bV7B,SHw2Sq,qhzQFP,Wz3Dv3,CvcT4f,8PfQVC,trVbF3,8wccdk,nzvJ68,v7NtvG,bDMGQj,PqCtmC,MSt3WL,TtBH3c,2qgxxh,67gVrk,rZZXcb,2LSmbR,sHnTJT,JpxXvG,JS5jZM,BpkVn8,3XKKw8,BCJbKc,68c24R,XnqB5t,jrMSMT,Qrgc2D,xDRHf6,gwH796,hPrrwX,kZSf86,vczGZ3,mrLC8N,2PJhT7,HkjgbM,rrQL66,KL64BG,mvZWZF,FqfHXK,X3gwHc,NnXBSC,WtMkfm,fVmxHH,XprWq4,8vL58Z,RRgLzH,bdQMN4,hZRhP5,GVw98X,L6bHKX,VcnDFK,jKZSgL,jRScD7,ZGSdtB,NNzLJL,7rt2nq,6RvPh7,6826Bv,hkmbzn,NJ4sxL,HjwZvP,Fk5S86,JHkWJV,H65ZVB,G5jbzn,nMss3X,kKvM4z,mCsZBC,TF2wwc,mpRRJZ,rtkfqs,WG86F6,mdmdSK,FWXSm2,jNWtH5,gpVLt2,fK4QKF,q44k7R,fPC8C2,vBbWKz,q8Xc2b,v89NHw' nick_name='AppleNights' layout='masonry' display='local' columns='2' start='1']For some reason, even though I listed the album codes exactly the way they’re listed in the Smugmug api. Photonic does not display my albums the same way. Even though I use this parameter: album_sort_order=’Date Added (Descending)’ , it still displays the album in a different order. Please view this page:
https://woocommerce-1440268-5386905.cloudwaysapps.com/clubevent-photos/
As you can see the album titles do not match the list order from the smugmug api url: https://api.smugmug.com/api/v2/folder/user/AppleNights/Concert-and-Club!albums
Is there a way I can enforce the sort order because this parameter setting “album_sort_order=’Date Added (Descending)'” doesn’t work.Please let me know thanks.
Joe
Hey Sayontan,
I fixed the album’s description format issue. Please take a look:
https://woocommerce-1440268-5386905.cloudwaysapps.com/photoalbum/Good morning Sayontan,
I appreciate your tip in using the base64_decode in order to pull the album id. This help resolve my issue, please view my home page link:
https://woocommerce-1440268-5386905.cloudwaysapps.com/
When you click on any album cover, it passes the correct album id over to the photoalbum page and displays the correct photo album content.
This is the code I entered in my child-theme’s function.php to parse out the album id:// This corrects the url and passes the proper parameter value for album="album id"
add_shortcode('dynamic_photonic_album', function() {
// Check if the base64 'photonic_gallery' parameter is present
if (isset($_GET['photonic_gallery'])) {
$encoded = $_GET['photonic_gallery'];
$decoded = base64_decode($encoded);
// Try to extract album="..." from the decoded string
if (preg_match('/album="([^"]+)"/', $decoded, $matches)) {
$album_id = sanitize_text_field($matches[1]);
$title = isset($_GET['photonic_gallery_title']) ? sanitize_text_field($_GET['photonic_gallery_title']) : '';
ob_start();
if ($title) {
echo '<h1 class="photonic-gallery-title">' . esc_html($title) . '</h1>';
}
// Construct the full Photonic shortcode dynamically
$shortcode = sprintf(
'[gallery columns="auto" layout="mosaic" display="local" popup="page" filter="" filter_type="include" more="" panel="" custom_classes="" alignment="" photo_layout="mosaic" caption="title-desc" thumb_size="Tiny" main_size="Largest" tile_size="same" video_size="1280" empty="false" view="album" nick_name="applenights" photo_count="500" media="all" album_sort_order="Date Added (Descending)" type="smugmug" style="default" overlay_size="Tiny" overlay_video_size="1280" album="%s"]',
esc_attr($album_id)
);
echo do_shortcode($shortcode);
return ob_get_clean();
} else {
return '<p>⚠️ Could not find album ID in gallery data.</p>';
}
} else {
return '<p>⚠️ No gallery data provided in URL.</p>';
}
});I am very surprised no one had experience this issue in all these years. Hopefully you will consider using this idea to provide this feature as a new shortcode parameter.
One more question, please take a look at the way the photo album’s description displays on top of the of the photos:

Is there a shortcode parameter setting to enable the description to keep it’s proper format?
Or a shortcode parameter to provide a read description button like this image from my smugmug gallery:
…and display the description in a popup window like this:

Please let me know if this is possible; thank you in advance!
Best regards,
Joseph Mathieu
At this point I guess I’ll have to revert back to that old ChatGPT function.php script method. Instead of passing that long base64 url string, is there a way I can pass a parameter that includes the “album id” when I click on one of the album cover thumbnails from my home page?
Is there a setting in Photonic I can change to enable this feature?
Joe


This is my destination page setting. . I deleted my Divi > custom theme builder’s > code module, and no photo displays when I navigate to this page. I need this page to be styled as the rest of the website, and provide viewers the ability to navigate elsewhere. Is there a way to keep my template, and display the album photos?
JoeHey Sayontan,
I am sorry this is confusing you.. I’ll explain my problem more clearer, this shortcode you provided:[gallery type="smugmug" view="albums" nick_name="applenights" layout="random" photo_count=500 popup="page"]This displays every single album cover from my Smugmug account on my photoalbum page: https://woocommerce-1440268-5386905.cloudwaysapps.com/photoalbum/
This page is suppose to show the contents of the photo albums, and not display the photo ablum covers. Btw, look at the photo count written on the bottom of each photo. When you click on the album cover, where do I view the photos? This is my problem 🙂Btw yes I didn’t know how to view the Photonic shortcode wizard builder before. But after followed your directions in creating a new page, I do see the shortcode wizard now. I used it, and I’m still stuck trying to figure out a solution the same problem.
I did already configured a popup=”page” setting within Photonics settings in order to view the popup page on the photoalbum page.
My main dilemma is how do I click on one of the 6 photo album covers from my home page:
https://woocommerce-1440268-5386905.cloudwaysapps.com/
Note: These are the 6 album covers I have displayed on my home page.
How do I view the selected album cover’s content (photos from these album cover) on the photoalbum page:
https://woocommerce-1440268-5386905.cloudwaysapps.com/photoalbum/
If you click on any one of these album covers, how do I view their content on this page below?
https://woocommerce-1440268-5386905.cloudwaysapps.com/photoalbum/Please let me know thanks.
Best regards,
Joe MathieuHi Sayontan,
I greatly appreciate your help and response. So after struggling for so many days in trying to find the right shortcode, I consulted Chatgpt for assistance. It provided me a php script to enter into my child function.php that parsed the url, and enabled it to provide listing I’m looking for… here’s the php script:////// Trying out a Photonic url decoder to properly display albums on my photoalbum page
// This corrects the url and passes the proper parameter values
add_filter('photonic_albums_smugmug_album_link', function($link, $album, $display) {
// SmugMug album ID (e.g. jqZcSp)
$album_id = $album['AlbumKey'];
// Album title (e.g. Green and White Affair)
$title = isset($album['Title']) ? sanitize_title_with_dashes($album['Title']) : 'untitled';
// Return custom internal link
return home_url("/photoalbum/?album_id={$album_id}&title=" . urlencode($title));
}, 10, 3);
// Shortcode: [dynamic_photonic_album]
add_shortcode('dynamic_photonic_album', function() {
if ( isset($_GET['album_id']) ) { // ✅ CHANGED FROM photonic_gallery to album_id
$album_id = sanitize_text_field($_GET['album_id']);
$title = isset($_GET['title']) ? sanitize_text_field($_GET['title']) : '';
ob_start();
// Optional title above album
if ($title) {
echo '<h1 class="photonic-gallery-title">' . esc_html($title) . '</h1>';
}
// Use [gallery] shortcode format preferred by Divi Code Module
echo do_shortcode('[gallery type="smugmug" view="album" album="' . esc_attr($album_id) . '" caption="title-desc" popup="page"]');
return ob_get_clean();
} else {
return '<p>⚠️ No album selected. Please provide an album_id in the URL.</p>';
}
});This url that’s passed from the home > album cover photo is missing the album id:
https://woocommerce-1440268-5386905.cloudwaysapps.com/photoalbum/?photonic_gallery=W2dhbGxlcnkgY29sdW1ucz0iYXV0byIgbGF5b3V0PSJtb3NhaWMiIGRpc3BsYXk9ImxvY2FsIiBwb3B1cD0icGFnZSIgZmlsdGVyPSIiIGZpbHRlcl90eXBlPSJpbmNsdWRlIiBtb3JlPSIiIHBhbmVsPSIiIGN1c3RvbV9jbGFzc2VzPSIiIGFsaWdubWVudD0iIiBwaG90b19sYXlvdXQ9Im1vc2FpYyIgY2FwdGlvbj0idGl0bGUtZGVzYyIgdGh1bWJfc2l6ZT0iVGlueSIgbWFpbl9zaXplPSJMYXJnZXN0IiB0aWxlX3NpemU9InNhbWUiIHZpZGVvX3NpemU9IjEyODAiIGVtcHR5PSJmYWxzZSIgdmlldz0iYWxidW0iIG5pY2tfbmFtZT0iYXBwbGVuaWdodHMiIHN0YXJ0PSIxIiBjb3VudD0iNiIgcGhvdG9fY291bnQ9IjUwMCIgbWVkaWE9ImFsbCIgYWxidW1fc29ydF9vcmRlcj0iRGF0ZSBBZGRlZCAoRGVzY2VuZGluZykiIHR5cGU9InNtdWdtdWciIHN0eWxlPSJkZWZhdWx0IiBvdmVybGF5X3NpemU9IlRpbnkiIG92ZXJsYXlfdmlkZW9fc2l6ZT0iMTI4MCIgYWxidW09Ilc0WmdXciJd&photonic_gallery_title=Maxappeal%E2%80%99s%20Birthday%20Celebration
ChaptGPT later suggested I go into Photonic settings to enable the option for a clean url where it will generate an album id for php script to use in order to display the correct photo album. I can’t find this option to change which is why I went searching for help and I found this forum.
I entered the shortcode you provided in the code module in my photoalbum page; yes it does work but the album id is hard coded to: album=”jqZcSp”. I’m unable to view the other album cover contents when I click on them from my Home page.
Can you provide a shortcode that will decode the base64 url string to pull out and use the album id to show the correct albums from the url strings passed by the photo album cover clicks?
Also can is it possible to make my photoalbum page look like this:
https://photography.applenights.com/Concert-and-Club/Green-White-Affair-2025
Displaying the banner image, the Read button to view the entire description written in its proper format?
Display the buy, arrow down (download) and share buttons?
Please let me know and once again thank you in advance.
Best regards,Joe Mathieu
Here is my home page (frontpage) code again:
<?php get_header(); ?> <?php $page_layout = sidebar_layout(); switch ($page_layout) { case "layout-sidebar-left": echo '<div class="sidebar-left">'; wz_setSection('zone-sidebar'); if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar-page')); echo '</div><!-- end .sidebar-left -->'; break; case "layout-sidebar-right": echo '<div class="sidebar-right">'; wz_setSection('zone-sidebar'); if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar-page')); echo '</div><!-- end .sidebar-right -->'; break; case "layout-full": echo '<div class="sidebar-right">'; wz_setSection('zone-sidebar'); if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar-page')); echo '</div><!-- end .sidebar-right -->'; break; } ?> <div class="fixed"> <div class="col-blog-archive"> <div class="title-caribbean"><h3><span style="color:#fff">UPCOMING</span> EVENTS</h3></div> <?php echo do_shortcode('[eventon_slider slider_type=\'carousel\' lan=\'L1\' orderby=\'ASC\' date_out=\'1\' date_in=\'1\' id=\'home_page_slider\' link=\'events_list\' skin=\'dark\' style_2=\'b\' cover=\'location\' ef=\'no\']');?> <br> <br> <div class="title-caribbean"><h3><span style="color:#fff">LATEST</span> BLOG POSTS</h3></div> <?php $query = array( 'post_type' => 'post', 'paged' => $paged ); $wp_query = new WP_Query($query); if (have_posts()) while ($wp_query->have_posts()): the_post(); $image_id = get_post_thumbnail_id($post->ID); $cover_blog = wp_get_attachment_image_src($image_id, 'blog-home'); $num_comments = get_comments_number(); echo ' <div class="blog-archive">'; if ($image_id) { echo ' <div class="blog-home-cover"> <a href="' . get_permalink() . '"> <img src="' . $cover_blog[0] . '" alt="' . get_the_title() . '" /> </a> </div><!-- end .blog-home-cover --> '; } echo ' <h2 class="event-arc-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2> <div class="blog-home-info"> <p class="blog-user">' . get_the_author() . '</p> <p class="blog-date">' . get_the_time('F jS, Y') . '</p> <p class="blog-comment"><a href="' . get_comments_link() . '">'; if ($num_comments == 0) { echo '' . __('No comments', 'clubber') . ''; } elseif ($num_comments == 1) { echo '' . __('One comment', 'clubber') . ''; } else { echo '' .$num_comments . ' ' . __('comments', 'clubber') . ''; } echo '</a></p> </div><!-- end .blog-home-info --> <p>' . the_excerpt_max(200) . '...</p> <div class="blog-arc-more2"><a href="' . get_permalink() . '" rel="bookmark">' . __('Read more', 'clubber') . '</a></div>'; echo ' </div><!-- end .blog-archive -->'; endwhile; ?> <div class="pagination-pos"> <?php if (function_exists("pagination")) { pagination(); } ?> </div><!-- end .pagination-pos --> </div><!-- end .col-blog-archive --> </div><!-- end .fixed --> <?php get_footer(); ?>The problem I am experiencing is whenever I click on the pagination number links, the posts stays the same. The url creates a page 2 parameter, but the posts still display the same.
- This reply was modified 9 years, 7 months ago by applenights.
The theme I used is called Clubber and no the template given was not set up as the demo provided… I’ve improvised quite alot. And sorry, I’ll place back-ticks around the code… here is the pagination function code again:
function pagination($pages = ”, $range = 4) { $showitems = ($range * 2) + 1; global $paged; if (empty($paged)) $paged = 1; if ($pages == ”) { global $wp_query; $pages = $wp_query->max_num_pages; if (!$pages) { $pages = 1; } } if (1 != $pages) { echo “<div class=\”pagination\”>”; if ($paged > 2 && $paged > $range + 1 && $showitems < $pages) echo “« First“; if ($paged > 1 && $showitems < $pages) echo “‹ Previous“; for ($i = 1; $i <= $pages; $i++) { if (1 != $pages && (!($i >= $paged + $range + 1 || $i <= $paged – $range – 1) || $pages <= $showitems)) { echo ($paged == $i) ? “<span class=\”current\”>” . $i . “</span>” : “” . $i . ““; } } if ($paged < $pages && $showitems < $pages) echo “Next ›“; if ($paged < $pages – 1 && $paged + $range – 1 < $pages && $showitems < $pages) echo “Last »“; echo “</div>\n”; } }- This reply was modified 9 years, 7 months ago by applenights.
So this is the function pagination is calling from my functions.php page:
function pagination($pages = ”, $range = 4) {
$showitems = ($range * 2) + 1;
global $paged;
if (empty($paged))
$paged = 1;
if ($pages == ”) {
global $wp_query;
$pages = $wp_query->max_num_pages;
if (!$pages) {
$pages = 1;
}
}
if (1 != $pages) {
echo “<div class=\”pagination\”>”;
if ($paged > 2 && $paged > $range + 1 && $showitems < $pages)
echo “« First“;
if ($paged > 1 && $showitems < $pages)
echo “‹ Previous“;
for ($i = 1; $i <= $pages; $i++) {
if (1 != $pages && (!($i >= $paged + $range + 1 || $i <= $paged – $range – 1) || $pages <= $showitems)) {
echo ($paged == $i) ? “<span class=\”current\”>” . $i . “</span>” : “” . $i . ““;
}
}
if ($paged < $pages && $showitems < $pages)
echo “Next ›“;
if ($paged < $pages – 1 && $paged + $range – 1 < $pages && $showitems < $pages)
echo “Last »“;
echo “</div>\n”;
}
}
Should I make a code change here?