show the link show the link
 

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

show the link

Started by hyacinth, May 29, 2006, 12:43:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hyacinth

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????

hyacinth

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

Stramm

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

hyacinth

I mean the address not the "link"..

Stramm

I don't understand what you need. Please rephrase

hyacinth

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]

Stramm

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
        '{MY_GAL_TGT}' => "index.php?cat=$my_gallery_id",
and replace with
        '{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

#7
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.

Stramm

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

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

Stramm

just replace 'My gallery' with the link then

do as I've written above but find
        '{MY_GAL_LNK}' => $lang_main_menu['my_gal_lnk'],
and replace with
        '{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

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;


?>



Stramm

Quote from: Stramm on May 29, 2006, 02:46:15 PM
Copy over function theme_main_menu from themes/sample/theme.php to the theme.php you're using
now find ...

hyacinth

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

?????

hyacinth

ok, now I found it after reading "doc"

Tranz


hyacinth


Joachim Müller

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.