Featured Photos on Homepage

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

Quote · 15 Apr 2012

A rabbit hole!

thanks Rob, been looking at this for a while now...

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 15 Apr 2012

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....
Quote · 15 Apr 2012

That would be awesome Prashank. 

Quote · 15 Apr 2012

 

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!
Quote · 15 Apr 2012

2 likes up for this!

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 15 Apr 2012

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....
Quote · 15 Apr 2012

Wow!  - you made short work of that.  I can't wait to try it.  Thanks Prashank! 

Quote · 15 Apr 2012

 You're welcome

Wow!  - you made short work of that.  I can't wait to try it.  Thanks Prashank! 

 

so much to do....
Quote · 15 Apr 2012

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.
Quote · 15 Apr 2012

 

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!
Quote · 15 Apr 2012

yup its not showing any photo on your site. You can create a new topic if you want.

so much to do....
Quote · 15 Apr 2012

This worked flawlessly for me and took only minutes to set up.  Thanks again Prashank - you are a champion!

Quote · 15 Apr 2012

I am glad i could help you guys. cheers.

so much to do....
Quote · 16 Apr 2012

 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.
Quote · 16 Apr 2012

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....
Quote · 16 Apr 2012

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.
Quote · 16 Apr 2012

 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....
Quote · 16 Apr 2012

 

 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');

$this->oSearch = new BxVideosSearch();

$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'], '');

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.Cool

Quote · 20 Aug 2013

Thank you, it works just fine for me. 

Quote · 20 Aug 2013

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?


I would like also to newly added photos to the "featured photos" were in this block as first and not from the oldest to the newest featured photos added. Is it also possible?

Please advice

Quote · 14 Jan 2014

Creating categories: Male / Female and Random would be brilliant. Maybe someone will know how to do it?

Quote · 16 Jan 2014

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
Quote · 25 Feb 2014

This was great and worked first time 

I would like to make it a single picture say 400px x 400px that changes after a time or can be scrolled im trying to add it so that as member upload pictures it will display the latest ones on the home page but as a large picture that can be scrolled

Be great full if anyone can help with this been bang my head over the code and cannot figure it


Thanks In advanced   

http://lookscarpy.x10.mx Social network dedicated to carp anglers
Quote · 1 Sep 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.