forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: m0gb0y74 on June 16, 2006, 12:39:43 pm

Title: Showing spcific user galleries on front page
Post by: m0gb0y74 on June 16, 2006, 12:39:43 pm
Hi,

I am trying to showcase specific galleries/folders on the front page via the anycontent.php

What I want to do is pick and handful of galleries and then render them in the same way as the rest are rendered on the front page. I have looked at the code but I got lost as i am not that proficient with PHP. Could anyone give me a pointer on how I could do this?

Thanks,

james :-)
Title: Re: Showing spcific user galleries on front page
Post by: Sami on June 16, 2006, 01:56:21 pm
This need some php coding experience
Paver may help you ;)
Title: Re: Showing spcific user galleries on front page
Post by: Gizmo on June 17, 2006, 12:38:54 pm
It's not clear by what you mean by
Quote
render them in the same way as the rest are rendered on the front page
because the front page can be set up to display in several different ways using the Configuration panel and even more if you code it yourself. Some galleries have photos on the front page and others do not such as my sports gallery because there are many different galleries to chose from and it would be too "busy" with all those galleries showing so the front page is based on the year and sport. If you can attach some screenshots and a description of how you want it to look, we would be better able to help you.

Cheers,

Gizmo
Title: Re: Showing spcific user galleries on front page
Post by: m0gb0y74 on June 20, 2006, 11:23:09 am
Hi,

thanks for the response. If you take a look at my current site http://www.infinitedreamers.co.uk/cpg132/ (http://www.infinitedreamers.co.uk/cpg132/) you can see the way I have layed out my front page. What i want to do is specify a set of albums that are within 'My friends galleries' to be rendered in extactly the same way. i.e. the album listing at http://www.infinitedreamers.co.uk/cpg132/index.php?cat=10008 (http://www.infinitedreamers.co.uk/cpg132/index.php?cat=10008).

Here is what I am trying to get:

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.infinitedreamers.co.uk%2Ffs.jpg&hash=af4c7f1fd6589e717b77ac006df5021d0c7c16de)
Title: Re: Showing spcific user galleries on front page
Post by: Joachim Müller on June 20, 2006, 10:45:05 pm
1) Not related to your question, but you're running cpg1.4.5 - it's mandatory to upgrade to cpg1.4.8!
2) Category thumbnail is a missing feature for user galleries
3) Expandable sub-categories for user galleries is a missing feature
4) Only workaround: create custom content using anycontent or miniCMS
Title: Re: Showing spcific user galleries on front page
Post by: m0gb0y74 on June 21, 2006, 12:46:42 pm
Hi,

I knew it would have to be via anycontent.php, it's just that my knowledge of PHP isn't that great and so I was wondering if I could get any pointers on where in teh code to look for how you generate the display tables so I could cut'n'paste and then modify the code to do what I want to do (or even better someone posts the code so I can just cut'n'paste the working code in ;-)

James :-)
Title: Re: Showing specific user galleries on front page
Post by: Paver on June 21, 2006, 03:22:08 pm
Here's some quick code for anycontent.php that will list specified user galleries:
Code: [Select]
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');

starttable("100%", "Featured Friends Galleries");

?>
<tr><td class="tableb" >
<?php 
$friend1_albums list_cat_albums(10001); 
$friend2_albums list_cat_albums(10002);
echo $friend1_albums;
echo $friend2_albums;
?>

</td></tr>
<?php
endtable
();

?>

As you can see, just put in the user ID for each user to grab the albums, then echo them out.

Of course, you probably want the albums to be all together, not in separate tables . . .
And maybe you even want to pick only certain albums from each user . . .
Title: Re: Showing spcific user galleries on front page
Post by: m0gb0y74 on June 22, 2006, 10:01:16 am
Thanks for that. It does what I currently want to do.

James :-)
Title: Re: Showing spcific user galleries on front page
Post by: Sami on June 22, 2006, 10:11:02 am
you see there is a powerful Paver ;)