2012-08-15, 03:28 PM
There is already a random image function and supporting template in the main plugin file. You simply need to enable/tweak the hook call to run when you want it to., right now it is set to run at portal_start.
What it does is call myshowcase_portal_random() which for me was setup to run different for guests than registered users. The base code for that functionality is still there, just commented out if you want to use it (I ran an ad block for guests instead of an image). This function calls myshowcase_get_random() and returns 0 if nothing is found or the resulting template output.
The template is called portal_rand_showcase and you can edit as needed.
What it does is call myshowcase_portal_random() which for me was setup to run different for guests than registered users. The base code for that functionality is still there, just commented out if you want to use it (I ran an ad block for guests instead of an image). This function calls myshowcase_get_random() and returns 0 if nothing is found or the resulting template output.
The template is called portal_rand_showcase and you can edit as needed.
Lost interest, sold my sites, will browse here once in a while. It's been fun.