SMF and Coppermine personal gallery

Started by Shadowc, April 15, 2004, 10:21:57 PM

Previous topic - Next topic

Aravot

From Coppermine FAQ

How can I prevent unregistered user from viewing the gallery?

edit
displayimage.php, index.php, search.php and thumbnails.php

search for

require('include/init.inc.php');

and add after it

if (USER_ID){

} else {
{
   $redirect = $redirect . "login.php";
   header("Location: $redirect");

   exit();
        }
}

NoRad

or you can do that, but this will block everybody not logged in from viewing anything in the gallery. I have albums on my gallery that I want everybody to be able to view, and then some that i want only registered members to be able to view.

Aravot

That's what I was looking for the gallery is available only to registered users.

megacelt

#43
I have been trying to place an icon on both the profile summary and profile info on posts for a personal gallery that links to that member's coppermine album.  The code for the summary profile is working (in the profile.template.php file).  The code for the  posts (Display.template.php) takes the user to an anonymous folder.

Profile.template.php

   // Now print the second column where the members avatar/text is shown.
   echo '
      <td class="windowbg" valign="top" align="center" width="150">
         ', $context['member']['avatar']['image'], '<br /><br />
         <a href="/coppermine/index.php?cat=', $context['member']['id'] + 10000, '"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/gallery.gif" alt="Personal Gallery" border="0" /></a><br /><br />
         ', $context['member']['blurb'], '
      </td>
   </tr>';

Display.template.php

            // Add for personal gallery

                echo '
                ', '<a href="/coppermine/index.php?cat=', $context['member']['id'] + 10000, '"><img src="' . $settings['images_url'] . '/' .                   $context['user']['language'] . '/gallery.gif" alt="Personal Gallery" border="0" /></a><br /><br />';           


Any suggestions?

Also, ideally both would be conditional displays, that is, showing only if the person actually has a coppermine album.

Thanks


megacelt

Got the link issue resolved, however would still request assistance on how to make both links icon to display only if they have pictures in an album.

Aravot

Quote from: megacelt on March 27, 2005, 04:42:55 AM
Got the link issue resolved, however would still request assistance on how to make both links icon to display only if they have pictures in an album.

Me too

NoRad

I think it's good to leave it there if they don't because it can encourage the user to go to the gallery and upload some photos.

Mr.T

Quote from: Radianation on October 07, 2004, 12:25:11 AM
So how can I check to see if the gallery exists before displaying the link?
Did anybody solve this?

/MR.T

mahdi

VERY GOOD FOR ME , THANKS

I USE IT NOW

Barth

Hello...
I like this options... but can it be like when u register in forum automaticly be registred at Gallery...
Because... when i click on my Personal Gallery at profile, i see other Gallery.. who saw registred in Gallery  befor than i register on my forum...

NoRad

I asked about this before and the coppermine people were unable to help answer this question.

Kindred

Barth,

I'm not sure exactly what you are asking...

However, if you have the smf integration activated, then ALL SMF users become Coppermine users.  With the bridge, coppermine uses the SMF user table.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

NoRad

I believe the specific question is:

When a user registers or logs in for the first time after this patch is applied coppermine will automatically create a DEFAULT album for that user. This eliminates a tedious step of forcing users to create an album using the weird coppermine album interface.

So I create a new account and coppermine creates an album under radianation -> my gallery

Angie on Dialysis

Quote from: megacelt on March 27, 2005, 02:24:09 AM
I have been trying to place an icon on both the profile summary and profile info on posts for a personal gallery that links to that member's coppermine album.  The code for the summary profile is working (in the profile.template.php file).  The code for the  posts (Display.template.php) takes the user to an anonymous folder.

Profile.template.php

   // Now print the second column where the members avatar/text is shown.
   echo '
      <td class="windowbg" valign="top" align="center" width="150">
         ', $context['member']['avatar']['image'], '<br /><br />
         <a href="/coppermine/index.php?cat=', $context['member']['id'] + 10000, '"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/gallery.gif" alt="Personal Gallery" border="0" /></a><br /><br />
         ', $context['member']['blurb'], '
      </td>
   </tr>';

Display.template.php

            // Add for personal gallery

                echo '
                ', '<a href="/coppermine/index.php?cat=', $context['member']['id'] + 10000, '"><img src="' . $settings['images_url'] . '/' .                   $context['user']['language'] . '/gallery.gif" alt="Personal Gallery" border="0" /></a><br /><br />';           


Any suggestions?

Also, ideally both would be conditional displays, that is, showing only if the person actually has a coppermine album.

Thanks


I would like to know this as well as adding an icon too since I saw another SMF forums have the icon to gallery in their profile right in posts at this link. I want that for my own forums at this link.

Opps sorry did NOT realize how OLD this thread was ... came across by a search ... is there an updated thread on this now??

Kindred

in display.template.php,  $context['member']['id'] should be  $message['member']['id']
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Angie on Dialysis

Quote from: Kindred on May 22, 2008, 08:32:21 PM
in display.template.php,  $context['member']['id'] should be  $message['member']['id']
Thanks! I will tell Sandman who does all the work on my forums ;)

avf

Quote from: megacelt on March 27, 2005, 02:24:09 AM
I have been trying to place an icon on both the profile summary and profile info on posts for a personal gallery that links to that member's coppermine album.  The code for the summary profile is working (in the profile.template.php file).  The code for the  posts (Display.template.php) takes the user to an anonymous folder.

Profile.template.php

   // Now print the second column where the members avatar/text is shown.
   echo '
      <td class="windowbg" valign="top" align="center" width="150">
         ', $context['member']['avatar']['image'], '<br /><br />
         <a href="/coppermine/index.php?cat=', $context['member']['id'] + 10000, '"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/gallery.gif" alt="Personal Gallery" border="0" /></a><br /><br />
         ', $context['member']['blurb'], '
      </td>
   </tr>';

Display.template.php

            // Add for personal gallery

                echo '
                ', '<a href="/coppermine/index.php?cat=', $context['member']['id'] + 10000, '"><img src="' . $settings['images_url'] . '/' .                   $context['user']['language'] . '/gallery.gif" alt="Personal Gallery" border="0" /></a><br /><br />';           


Any suggestions?

Also, ideally both would be conditional displays, that is, showing only if the person actually has a coppermine album.

Thanks

Thanks I added this to my forum and it works !

Kindred

avf,

it won't work correctly with that code...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: