Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: [Solved]: Make My Gallery the Home Page  (Read 5859 times)

0 Members and 1 Guest are viewing this topic.

vertlime

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
[Solved]: Make My Gallery the Home Page
« on: October 13, 2009, 10:01:10 pm »

Kind of new to stuff
I'd like the Home link to take users to their gallery. I mean click HOME see only your own stuff if you're logged in.
It would also be great if I users could send link to their Gallery. I've spent a couple of days (on and off) looking but, I couldn't find the answer anywhere though it probably exists. So where is the link?
« Last Edit: October 14, 2009, 05:53:14 pm by Joachim Müller »
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Make My Gallery the Home Page
« Reply #1 on: October 13, 2009, 10:54:43 pm »

Please follow the board rules and read all documentation before posting. post a link and you'll get your answer.  ;)
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

vertlime

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Make My Gallery the Home Page
« Reply #2 on: October 14, 2009, 06:59:19 am »

Sorry, I didn't think a link is relevant but here it is:
http://www.songweavers.org/pictures.php

*There is one Nude photograph.
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Make My Gallery the Home Page
« Reply #3 on: October 14, 2009, 07:21:38 am »

It doesn't matter if its relevant to the question, It is a rule you agreed to when signing up. If you read the docs you would have seen this, the answer to your question.  ;) enjoy.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

vertlime

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Make My Gallery the Home Page
« Reply #4 on: October 14, 2009, 07:36:47 am »

I already did this; that is not my question.
I want the user to see ONLY his gallery when clicking "HOME"
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Make My Gallery the Home Page
« Reply #5 on: October 14, 2009, 07:39:34 am »

Sorry I didn't understand completely. Create a non-admin test account so I can see exactly what you mean.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

vertlime

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Make My Gallery the Home Page
« Reply #6 on: October 14, 2009, 08:05:08 am »

OK
user: Loki
Password: password
http://www.songweavers.org/pictures.php

When you login as Loki you see no pictures (because there are no pictures) - that is GOOD!
If you click on the Home icon you see Random Files & Latest Addition of other users - NOT GOOD!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Make My Gallery the Home Page
« Reply #7 on: October 14, 2009, 08:14:09 am »

Actual link to your gallery is http://www.songweavers.org/coppermine/index.php. The rest is a silly and entirely useless frame construct around the gallery. Frames and iframes suck. Throw that nonsense away. Instead, add the navigation at the top to your custom theme and you'll be good.

I want the user to see ONLY his gallery when clicking "HOME"
That would not be the expected behaviour of the home button. That's not how it works in other galleries. If you need that (I don't think you should actually try that, as it will be misleading for your users, although you only have two of them who actually have galleries of their own), you'll have to change the code that composes the link. This can be accomplished comparatively easily, as the link to the personal gallery of the user with user ID 1 is http://www.songweavers.org/coppermine/index.php?cat=10001, for the user with user ID 2 it is http://www.songweavers.org/coppermine/index.php?cat=10002 and so on, so in other words you just check if a user is logged in, and if yes add the user ID to 10000. The result get's added as a parameter to the link.

If you click on the Home icon you see Random Files & Latest Addition of other users - NOT GOOD!
Let's disable the random and latest then by editing the content of the mainpage config setting if that's all that bothers you
Logged

vertlime

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Make My Gallery the Home Page
« Reply #8 on: October 14, 2009, 04:31:06 pm »

Thank you Joachim. This answers my question
Logged

vertlime

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: [Solved]: Make My Gallery the Home Page
« Reply #9 on: October 14, 2009, 08:15:47 pm »

Actually, it is not as easy as I thought. Can you please direct me to the "code that composes the link?"

About the 2 users, it is because I am just building the site; when it is done I will migrate another site into here with about 1500 users.
I think having input from that many people will confuse some of my members and they may not even use coppermine at all.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: [Solved]: Make My Gallery the Home Page
« Reply #10 on: October 14, 2009, 09:37:30 pm »

Once again: what you're up to do is really, really completely silly. Your home link will do exactly the same that the "My Gallery" link will do. This being said: attached is your new custom theme that does what you want to be done.
But again I can only warn you to do something that silly. Additionally, I really suggest to look into the silly iframe construct: the output is completely invalid, with several body tags in it. You should maybe learn the basics first.
Logged

vertlime

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: [Solved]: Make My Gallery the Home Page
« Reply #11 on: October 15, 2009, 06:48:57 am »

First:
 I thank you very much for the theme - it does just what I want. There was one error in it:
line 314 in theme.php
        $custom_home_target = "index.php?cat=$my_gallery_id";
was generating this url: (when clicking the home image)
        http://www.songweavers.org/coppermine/indexphpindex.php?cat=10001
I changed so:
        $custom_home_target = "?cat=$my_gallery_id";
and it works fine now. (I hope it will not mess up something else.)

Secondly:
Ii is true that I do not know enough about coding but I know when to listen to an expert and I have removed the frames.

Again,
Thank you very very much.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 20 queries.