Advanced search  

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

Pages: [1]   Go Down

Author Topic: show the link  (Read 7183 times)

0 Members and 1 Guest are viewing this topic.

hyacinth

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
show the link
« on: May 29, 2006, 12:43:07 pm »

I want to show the "My gallery"'s link (http://localhost/gallery/index.php?cat=10002) when we login. Just like when we login in hotmail, hotmail will show us our email address on the top.
How to do that????
« Last Edit: May 29, 2006, 04:52:20 pm by Stramm »
Logged

hyacinth

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: show the link
« Reply #1 on: May 29, 2006, 12:45:27 pm »

I know the answer may just add {HOME_TGT} in tempate, but I want the link to be showed after login.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: show the link
« Reply #2 on: May 29, 2006, 01:30:08 pm »

in the group manager allow 'Personal gallery'. Then the link will show up in the menu

hyacinth

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: show the link
« Reply #3 on: May 29, 2006, 01:46:37 pm »

I mean the address not the "link"..
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: show the link
« Reply #4 on: May 29, 2006, 01:52:55 pm »

I don't understand what you need. Please rephrase

hyacinth

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: show the link
« Reply #5 on: May 29, 2006, 02:31:49 pm »

There is a meun like below:
My gallery
User mode
Upload file
Logout [admin]

--------------------------------------------------------------
but I want the meun shows the address of "My gallery" like:

http://www.example.com/index.php?cat=10001
My gallery
User mode
Upload file
Logout [admin]
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: show the link
« Reply #6 on: May 29, 2006, 02:46:15 pm »

My gallery already links to index.php?cat=usercat
where usercat is the logged in users id+10000
if you want usercat not to be dynamic but a fixed value than you have to edit your theme.php

Copy over function theme_main_menu from themes/sample/theme.php to the theme.php you're using
now find
Code: [Select]
        '{MY_GAL_TGT}' => "index.php?cat=$my_gallery_id",and replace with
Code: [Select]
        '{MY_GAL_TGT}' => "index.php?cat=10001",
Now each logged in user will have a link to index.php?cat=10001 when he's logged in and clicks 'My gallery'
I hope that's what you were looking for

hyacinth

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: show the link
« Reply #7 on: May 29, 2006, 03:02:39 pm »

I think my poor english misleaded you.... :-[

Each member has his own id 10000+n

When a member logins, computer will load the information he needs like his own meun.
A registered member has a meun like:
My gallery
Upload file
Logout [asdf]
Album list
Last uploads
Last comments
Most viewed
Top rated
My Favorites
Search 


However, I want to add a tag, which is his address leads to his personal gallery, before My gallery. I hope the resultant meun will become:

http://www.example.com/index.php?cat=10005  (depends on his personal gallery address)
My gallery
Upload file
Logout [asdf]
Album list
Last uploads
Last comments
Most viewed
Top rated
My Favorites
Search 


I want the address (http://www.example.com/index.php?cat=1000+n) can be showed after login because the address alway be http://www.example.com/index.php?cat=10000 when we don't login.
« Last Edit: May 29, 2006, 03:10:33 pm by hyacinth »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: show the link
« Reply #8 on: May 29, 2006, 03:09:20 pm »

This is a Coppermine standard feature and that's exactly what 'My gallery' is about. Why do you want 2 links to exactly the same target.

for user no 5 'My gallery' would link to index.php?cat=10005  and you want to add a link with the target index.php?cat=10005 just next to it?? So two times the same link?

hyacinth

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: show the link
« Reply #9 on: May 29, 2006, 03:13:28 pm »

Yes, I want two links because I want users know the id easily.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: show the link
« Reply #10 on: May 29, 2006, 03:22:00 pm »

just replace 'My gallery' with the link then

do as I've written above but find
Code: [Select]
        '{MY_GAL_LNK}' => $lang_main_menu['my_gal_lnk'],and replace with
Code: [Select]
        '{MY_GAL_LNK}' => $lang_main_menu['my_gal_lnk']. ' Id=' .$my_gallery_id,


this will then show eg. 'My gallery Id=10001'
Should give you an idea on how to change the link to your needs

hyacinth

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: show the link
« Reply #11 on: May 29, 2006, 03:27:57 pm »

my theme.php is just like:

<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2005 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.3
  $Source: /cvsroot/coppermine/stable/themes/digital_red/theme.php,v $
  $Revision: 2.0 $
  $Author: DaMysterious $
  $Date: 2006-01-12 10:01:00 $
**********************************************/

define('THEME_IS_XHTML10_TRANSITIONAL',1);

// HTML template for main menu
$template_sys_menu = <<<EOT
                <span class="topmenu">

<!-- BEGIN my_gallery -->
                        <a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a><br /><br />
<!-- END my_gallery -->

<!-- BEGIN allow_memberlist -->
                        <a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a><br /><br />
<!-- END allow_memberlist -->

<!-- BEGIN my_profile -->
                        <a href="{MY_PROF_TGT}">{MY_PROF_LNK}</a><br /><br />
<!-- END my_profile -->

<!-- BEGIN faq -->
                        <a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a><br /><br />
<!-- END faq -->

<!-- BEGIN enter_admin_mode -->
                        <a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</a><br /><br />
<!-- END enter_admin_mode -->

<!-- BEGIN leave_admin_mode -->
                        <a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a><br /><br />
<!-- END leave_admin_mode -->

<!-- BEGIN upload_pic -->
                        <a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</a><br /><br />
<!-- END upload_pic -->

<!-- BEGIN register -->
                        <a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a><br /><br />
<!-- END register -->

<!-- BEGIN login -->
                        <a href="{LOGIN_TGT}" title="">{LOGIN_LNK}</a>
<!-- END login -->

<!-- BEGIN logout -->
                        <a href="{LOGOUT_TGT}" title="">{LOGOUT_LNK}</a><br />
<!-- END logout -->
</span>
EOT;

// HTML template for sub_menu
$template_sub_menu = <<<EOT

<!-- BEGIN custom_link -->
     <a href="{CUSTOM_LNK_TGT}" title="{CUSTOM_LNK_TITLE}">{CUSTOM_LNK_LNK}</a><br /><br />
<!-- END custom_link -->

<!-- BEGIN album_list -->
     <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a><br /><br />
<!-- END album_list -->
<a href="{LASTUP_TGT}">{LASTUP_LNK}</a><br /><br />
<a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a><br /><br />
<a href="{TOPN_TGT}">{TOPN_LNK}</a><br /><br />
<a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a><br /><br />
<a href="{FAV_TGT}">{FAV_LNK}</a><br /><br />
<a href="{SEARCH_TGT}">{SEARCH_LNK}</a>

EOT;


?>


Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: show the link
« Reply #12 on: May 29, 2006, 03:31:13 pm »

Copy over function theme_main_menu from themes/sample/theme.php to the theme.php you're using
now find ...

hyacinth

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: show the link
« Reply #13 on: May 29, 2006, 03:34:57 pm »

I can't find '{MY_GAL_LNK}' => $lang_main_menu['my_gal_lnk'],

?????
Logged

hyacinth

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: show the link
« Reply #14 on: May 29, 2006, 03:38:04 pm »

ok, now I found it after reading "doc"
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: show the link
« Reply #15 on: May 29, 2006, 03:50:35 pm »

problem solved?
Logged

hyacinth

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: show the link
« Reply #16 on: May 29, 2006, 04:45:34 pm »

solved thank you
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: show the link
« Reply #17 on: May 29, 2006, 09:41:21 pm »

The most useless mod I've ever seen - I've never met an end user who would find it usefull to see a URL printed on the screen next to a link that can be clicked on and does the same.
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 20 queries.