I just did a search and couldn't find a way to put "featured public photos" on the homepage. I'm surprised - this issue has been around forever. Does anyone have an approach? Even with a php block?
Rob
I just did a search and couldn't find a way to put "featured public photos" on the homepage. I'm surprised - this issue has been around forever. Does anyone have an approach? Even with a php block? Rob |
A rabbit hole! thanks Rob, been looking at this for a while now... ManOfTeal.COM a Proud UNA site, six years running strong! |
actually i think there is no direct solution for it (its my thought if someone have one please provide it). It requires some code addition in the photos module. If you want i can provide it with steps and a zip with files. First i will do it myself then will provide it here so don't expect a quick solution. so much to do.... |
That would be awesome Prashank. |
actually i think there is no direct solution for it (its my thought if someone have one please provide it). It requires some code addition in the photos module. If you want i can provide it with steps and a zip with files. First i will do it myself then will provide it here so don't expect a quick solution. As usual, jump right in. I'm so thankful for coders like u! ManOfTeal.COM a Proud UNA site, six years running strong! |
2 likes up for this! ManOfTeal.COM a Proud UNA site, six years running strong! |
sorry, for delay but i was busy with my client. So, here it is, i found a simple way so that would be better. 1. Create a php block with the name "Featured Photos" on homepage with deanos tools. 2. Add the following code in it require_once(BX_DIRECTORY_PATH_MODULES . 'boonex/photos/classes/BxPhotosSearch.php'); $this->oSearch = new BxPhotosSearch(); $this->oSearch->aCurrent['restriction']['featured'] = array( 'field' => 'Featured', 'value' => '', 'operator' => '=', 'paramName' => 'featured' ); $this->oSearch->aConstants['linksTempl']['featured'] = 'browse/featured'; $aCustom = array( 'per_page' => '8', 'menu_bottom_type' => 'featured', 'wrapper_class' => 'result_block' ); $aCode = $this->oSearch->getBrowseBlock(array('featured' => 1, 'allow_view' => $this->aVisible), $aCustom); if ($this->oSearch->aCurrent['paginate']['totalNum'] > 0) return array($aCode['code'], $aCode['menu_top'], $aCode['menu_bottom'], ''); Simple isn't it..:) so much to do.... |
Wow! - you made short work of that. I can't wait to try it. Thanks Prashank! |
You're welcome Wow! - you made short work of that. I can't wait to try it. Thanks Prashank!
so much to do.... |
Featured Photos is working!! Many thanks Prashank!! You can see it here: www.asia-connect-th.com Stuart There are none so blind as those that will not see. |
Featured Photos is working!! Many thanks Prashank!! You can see it here: www.asia-connect-th.com Stuart none of your photos are showing on your site. ManOfTeal.COM a Proud UNA site, six years running strong! |
yup its not showing any photo on your site. You can create a new topic if you want. so much to do.... |
This worked flawlessly for me and took only minutes to set up. Thanks again Prashank - you are a champion! |
I am glad i could help you guys. cheers. so much to do.... |
Yep, you have to be logged in to see the photos... I don't know what the problem is, still trying to figure that one out :-( Stuart
Featured Photos is working!! Many thanks Prashank!! You can see it here: www.asia-connect-th.com Stuart none of your photos are showing on your site.
There are none so blind as those that will not see. |
btw your sites images give this error Fatal error: Uncaught exception 'HTMLPurifier_Exception' with message 'Cannot retrieve raw version without specifying %HTML.DefinitionID' in /home/admin/domains/asia-connect-th.com/public_html/plugins/htmlpurifier/HTMLPurifier.standalone.php:1684 Stack trace: #0 /home/admin/domains/asia-connect-th.com/public_html/plugins/htmlpurifier/HTMLPurifier.standalone.php(1623): HTMLPurifier_Config->getDefinition('HTML', true) #1 /home/admin/domains/asia-connect-th.com/public_html/inc/utils.inc.php(595): HTMLPurifier_Config->getHTMLDefinition(true) #2 /home/admin/domains/asia-connect-th.com/public_html/modules/boonex/photos/classes/BxPhotosModule.php(63): clear_xss() #3 /home/admin/domains/asia-connect-th.com/public_html/inc/classes/BxDolRequest.php(98): BxPhotosModule->actionGetImage('thumb') #4 /home/admin/domains/asia-connect-th.com/public_html/inc/classes/BxDolRequest.php(51): BxDolRequest::_perform('thumb', 'df8fb6adbc010d6...') #5 /home/admin/domains/asia-connect-th.com/public_html/modules/boonex/photos/request.php(27): BxDolR in /home/admin/domains/asia-connect-th.com/public_html/plugins/htmlpurifier/HTMLPurifier.standalone.php on line 1684 if it helps :) so much to do.... |
That might explain why they are not showing up when not logged in. They do show when logged in. How do I fix this ? :-) There are none so blind as those that will not see. |
I already told you create a new topic for it. That might explain why they are not showing up when not logged in. They do show when logged in. How do I fix this ? :-)
so much to do.... |
For Featured Videos on homepage. please read. I searched but couldn't find it. Thanks Prashank25! sorry, for delay but i was busy with my client. So, here it is, i found a simple way so that would be better. 1. Create a php block with the name "Featured Photos" on homepage with deanos tools. 2. Add the following code in it require_once(BX_DIRECTORY_PATH_MODULES . 'boonex/photos/classes/BxPhotosSearch.php'); $this->oSearch = new BxPhotosSearch(); $this->oSearch->aCurrent['restriction']['featured'] = array( 'field' => 'Featured', 'value' => '', 'operator' => '=', 'paramName' => 'featured' ); $this->oSearch->aConstants['linksTempl']['featured'] = 'browse/featured'; $aCustom = array( 'per_page' => '8', 'menu_bottom_type' => 'featured', 'wrapper_class' => 'result_block' ); $aCode = $this->oSearch->getBrowseBlock(array('featured' => 1, 'allow_view' => $this->aVisible), $aCustom); if ($this->oSearch->aCurrent['paginate']['totalNum'] > 0) return array($aCode['code'], $aCode['menu_top'], $aCode['menu_bottom'], ''); Simple isn't it..:)
These codes work. For Featured Videos block on homepage, just change the word "photos" to the word "videos". Replace the words with the same capitalization as featured photos code. Name the block "Featured Videos" instead of "Featured Photos". Make the code look like this: require_once(BX_DIRECTORY_PATH_MODULES . 'boonex/videos/classes/BxVideosSearch.php'); I just added featured videos and featured photos to my homepage and it works fine. Backup your database first. This is for the newbies like me. |
Thank you, it works just fine for me. |
It's a great solution. I was looking for this. But much I care for me to create an extra man/woman in photos featured categories. Is this possible?
Please advice |
Creating categories: Male / Female and Random would be brilliant. Maybe someone will know how to do it? |
Sorry for hijacking this topic but.... How do I adjust the filter so it respects the privacy settings? If a member has their profile set to friends only, their photos should not show up here, or even the regular photos block for that matter, unless I am in their friends list. Thanks! http://www.mytikibar.com |
This was great and worked first time
http://lookscarpy.x10.mx Social network dedicated to carp anglers |