Random Featured Exhibit function

Hi,

I was using the display_random_featured_exhibit()function in my theme. After upgrading the Exhibit Builder plug-in, the function now throws a fatal error. I am running 1.0 beta, but will upgrade to the latest release to see if that helps. Any other guesses?

By the way, will uninstalling the Exhibit Builder plug-in really delete all my exhibits? I wanted to try re-installing to see if that fixed it but got the pop-up warning and decided against.

Upgraded both the plug-in and Omeka and the function is still not working. Did it change? Here's what I'm using...

<div id="featured-exhibit">
<?php echo display_random_featured_exhibit(); ?>
</div>

We namespaced the helper functions for the exhibit builder to include 'exhibit_builder_' in front of each. So try this:

<div id="featured-exhibit">
<?php echo exhibit_builder_display_random_featured_exhibit(); ?>
</div>

Let us know if this works, or if you run into any more problems!

Worked like a charm. Thanks, Jeremy.

One more question...

Is there a parameter for the Featured Random Exhibit function with which I can display a snippet of the exhibit Description?

(similar to what's built into the Random Featured Collection and Random Featured Item)

Sorry for the delay in responding. There currently aren't any parameters for the random featured exhibit function.

If you would like to modify the output of that function, its located in /ExhibitBuilder/helpers/ExhibitFunctions.php, around line 499. I'm surprised we didn't add the exhibit description to this helper function, so we'll be sure to do that for a future release. If you have code you'd like to contribute to that end, let me know!

Here's what I'm using for the modified function:

function exhibit_builder_display_random_featured_exhibit()
{
    $html = '<div id="featured-exhibit">';
    $featuredExhibit = exhibit_builder_random_featured_exhibit();
    $html .= '<h2>Featured Exhibit</h2>';
    if ($featuredExhibit) {
       $html .= '<h3>' . exhibit_builder_link_to_exhibit($featuredExhibit) . '</h3>';
       $html .= '<p>' . snippet($featuredExhibit->description, 0, 500,exhibit_builder_link_to_exhibit($featuredExhibit, '<br/>Read More')) . '</p>';

    } else {
       $html .= '<p>You have no featured exhibits.</p>';
    }
    $html .= '</div>';
    return $html;
}

I just added a description snippet and a Read More link. Nothing fancy but it works for now.

Hello,
does anyone know where can be modified the exhibit_builder_display_random_featured_exhibit function in version 2.0.2? I see it called in the index.php file of my theme directory but I can't find it.
Thanks,
François.

It's in this file in the plugin:

ExhibitBuilder/helpers/ExhibitFunctions.php

Thank you!