… almost working but having issues. (resolved)
In the ‘additional-info’ field for each image, created with your plugin I have this shortcode:
[mp3-popout tracks=”FEED:/music/home/mp3″] (mp3 jplayer plugin)
I also had added the same mp3 shortcode onto the page itself, just to make sure the code works.
Like this:
[nggallery id=1 template=wp-eStore]
[mp3-popout tracks=”FEED:/music/home/mp3″ ] (It does work.)
In my wp-eStore template for the nextgen gallery I added the following code after the ‘caption’ in the foreach loop:
<?php echo $image->ngg_custom_fields[“additional-info”]; ?>
<?php echo do_shortcode($image->ngg_custom_fields[“additional-info”]); ?>
The problem is that the shortcode is first printed exactly like this: [mp3-popout tracks=”FEED:/music/home/mp3″] (not parsed),and just below it is the parsed mp3 player popout icon.
But, when I remove the test shortcode that I had added from the page itself (The player appears at the bottom of the page.), it stops parsing in the ‘additional-info’ field also.
I’ve tried different variations.
If I call the ngg_custom_field like this without the echo,
<?php $image->ngg_custom_fields[“additional-info”]; ?>, it removes the unparsed shortcode.
But I can not get it to parse in the ngg custom field without also adding it to the bottom of the page.
—
Ok, I figured it out and am going to post in case it helps someone else. Its not a problem with the custom field plugin, but that my mp3 player plugin was not inserting its javascripts on the page unless it was included in the page itself. The mp3 plugin must be watching page content and selectively inserting the javascripts on pages that call its shortcode. I just have to selectively call the right javascripts on the gallery page and it works.