Hi - I'm trying to use the Random Content Blob and it's not working. It Throws this error where the random blob should be.
Fatal error: Class 'HtmlBlobOperations' not found in plugins/function.random_blob.php on line 20
I have 2 content blobs that start with the prefix "random_" as suggested.
Any help would be great.
Thanks,
David
Random Content Blob Tag
Re: Random Content Blob Tag
Where did you get the Random Content Blob, I've looked around, forge/downloads, in 3 diff. ver. installs, Documentation, and can't find any mention of it, sounds interesting.
Re: Random Content Blob Tag
Sorry Mark - It's a tag... Sounded perfect for me too except it doesn't work. I think it's for an old version but I don't know Smarty well enough to see what's going on.
http://dev.cmsmadesimple.org/projects/randomblob
David
http://dev.cmsmadesimple.org/projects/randomblob
David
Re: Random Content Blob Tag
Bump - Anybody know how to fix this? Thanks in advance!
David
David
Re: Random Content Blob Tag
Change the first line of the function smarty_cms_function_random_blob (on line 20 of function.random_blob.php)
from
to
from
Code: Select all
$blobs = HtmlBlobOperations::LoadHtmlBlobs();
Code: Select all
global $gCms;
$global_content_ops =& $gCms->getGlobalContentOperations();
$blobs = $global_content_ops->LoadHtmlBlobs();
Re: Random Content Blob Tag
Brilliant - Thanks Dee. That fixed it...
David
David

Last edited by Kavrick on Mon Oct 09, 2006 4:40 pm, edited 1 time in total.
Re: Random Content Blob Tag
You mean if you use the tag more than once on a page?Kavrick wrote: Any chance you'd know how to update the tag so it doesn't show duplicate Content Blobs on a given page?
Hmm, that wouldn't be very easy. You'd have to create a global (Smarty) variable to contain the blobs included already and handle the situation where you include the tag more than the number of random blocks.
Re: Random Content Blob Tag
Yeah - Sorry Dee... I wasn't thinking that through very well.
I solved it by creating two random content blob calls with a different prefix and then just made sure there wasn't duplicate content in each of the prefix types.
Thanks again for your help...
David
I solved it by creating two random content blob calls with a different prefix and then just made sure there wasn't duplicate content in each of the prefix types.
Thanks again for your help...
David
Re: Random Content Blob Tag
This replacement code did the trick for me also. Thank you Dee! 
