choosing album for portal side block

Support for Administration, Installation, Update & Conversion
Locked until 1.1.0 was released.

choosing album for portal side block

Postby cwjs » Sun Jan 08, 2012 12:01 am

Gallery Version: 1.1.4
phpBB Version: 3.0.9
Gallery-Link: [url]please see message text[/url]


Error description and message
I have phpbb3 3.09
Board3 Portal 2.0.0b1
Gallery 1_1_4
Gallery Block 2_1_1

It is all working great but I am a little confused over how to use the blocks.

I want a side block that just shows a picture from a certain album, I can get one recent or random but they come from any public album.
I have seen code for a RRC which has album selection, but do not understand how to use it.
I have not put a link to my site as you need to be registered to see the gallery and I feel it would not help anyway.
Can anyone help please

Clive
cwjs
Posts 10 - 20
Posts 10 - 20
 
Posts: 13
Topics: 2
Joined: Sat Jan 07, 2012 10:59 pm

Re: choosing album for portal side block

Postby nickvergessen » Sun Jan 08, 2012 1:10 pm

portal/modules/portal_gallery_side.php
find:
Code: Select all
$block->set_pegas((bool) $config['board3_gallery_side_pgalleries_' . $module_id]);

after add:
Code: Select all
$block->add_albums(array(1, 2));
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5748
Topics: 217
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: choosing album for portal side block

Postby cwjs » Sun Jan 08, 2012 1:41 pm

Thanks Nick, but just making that change gives me the following errors

[phpBB Debug] PHP Warning: in file /includes/gallery/block.php on line 215: array_map() expects parameter 1 to be a valid callback, function 'int' not found or invalid function name
[phpBB Debug] PHP Warning: in file /includes/gallery/block.php on line 215: array_merge(): Argument #2 is not an array
[phpBB Debug] PHP Warning: in file /includes/gallery/block.php on line 215: array_unique() expects parameter 1 to be array, null given

do I need to include the rrc somewhere ?
cwjs
Posts 10 - 20
Posts 10 - 20
 
Posts: 13
Topics: 2
Joined: Sat Jan 07, 2012 10:59 pm

Re: choosing album for portal side block

Postby cwjs » Tue Jan 10, 2012 10:14 am

anyone please !
cwjs
Posts 10 - 20
Posts 10 - 20
 
Posts: 13
Topics: 2
Joined: Sat Jan 07, 2012 10:59 pm

Re: choosing album for portal side block

Postby nickvergessen » Tue Jan 10, 2012 10:37 am

cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5748
Topics: 217
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: choosing album for portal side block

Postby cwjs » Tue Jan 10, 2012 11:07 am

Thank you nickv,

That has sorted out the error messages, but how do I choose which album I want ?

Clive
cwjs
Posts 10 - 20
Posts 10 - 20
 
Posts: 13
Topics: 2
Joined: Sat Jan 07, 2012 10:59 pm

Re: choosing album for portal side block

Postby nickvergessen » Tue Jan 10, 2012 11:22 am

Code: Select all
$block->add_albums(array(1, 2));
Just enter your album ids here
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5748
Topics: 217
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: choosing album for portal side block

Postby cwjs » Tue Jan 10, 2012 11:36 am

sorry I was expecting to select it in the acp

my album is ID 9, I have tried $block->add_albums(array(9)); but now the block does not show up at all, I have refreshed and purged the cache.

I only have one photo in the album, does that matter - I ask because if I put $block->add_albums(array(1)); it works.
cwjs
Posts 10 - 20
Posts 10 - 20
 
Posts: 13
Topics: 2
Joined: Sat Jan 07, 2012 10:59 pm

Re: choosing album for portal side block

Postby cwjs » Tue Jan 10, 2012 12:05 pm

I know the reason for the above.
The album was set to not show up in random/recent, when I changed that, it now shows up in the side block, but it also shows up in the main block which I did not want.
cwjs
Posts 10 - 20
Posts 10 - 20
 
Posts: 13
Topics: 2
Joined: Sat Jan 07, 2012 10:59 pm

Re: choosing album for portal side block

Postby nickvergessen » Tue Jan 10, 2012 12:57 pm

Can you please post that as a ticket in tracker.php?p=6
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5748
Topics: 217
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Next

Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

 

cron