[Solved]: Make My Gallery the Home Page [Solved]: Make My Gallery the Home Page
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[Solved]: Make My Gallery the Home Page

Started by vertlime, October 13, 2009, 10:01:10 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

vertlime

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?

Jeff Bailey

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

vertlime

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

*There is one Nude photograph.

Jeff Bailey

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.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

vertlime

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

Jeff Bailey

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

vertlime

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!

Joachim Müller

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.

Quote from: vertlime on October 14, 2009, 07:36:47 AM
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.

Quote from: vertlime on October 14, 2009, 08:05:08 AM
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

vertlime

Thank you Joachim. This answers my question

vertlime

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.

Joachim Müller

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.

vertlime

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.