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: Problem for creating new token  (Read 4062 times)

0 Members and 1 Guest are viewing this topic.

Syberi@

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Problem for creating new token
« on: March 20, 2011, 09:19:41 pm »

hi,

I want to create new token. I search on this website and documentation and i don't find the solution.

So for creating new token, I have modified the theme files :
             1 / I have added into "template.html" file the token "{RIGHT_MENU}"
             2 / I have added to the "theme.php" file this following code

Code: [Select]
/******************************************************************************
** Section <<<right_menu>>> - START
******************************************************************************/
function right_menu()
{
    echo 'test';
   
}

/******************************************************************************
** Section <<<right_menu>>> - END
*******************************************************************************/

I think, this is something I haven't anderstand,  but I don't find this.

Thanks for your help.
Logged

Syberi@

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Problem for creating new token
« Reply #1 on: March 20, 2011, 09:32:53 pm »

I Forget to say, in my coppermine gallery I have the message {RIGHT_MENU}.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Problem for creating new token
« Reply #2 on: March 21, 2011, 10:13:00 am »

That's not the way how it works. Have a look at themes/sample/theme.php. Ideally you'd add your token to one of the existing templates and then replace it in the appropriate (already existing) function.
Logged

Syberi@

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Problem for creating new token
« Reply #3 on: March 21, 2011, 07:52:36 pm »

Sorry but i don't understand how it's work.

I have look the sample butis's same issue.

I try to put this code into existing function and it doesn't work :

Code: [Select]
<!-- BEGIN {RIGHT_MENU} -->
   TEST
<!-- END {RIGHT_MENU} -->

Can someone give me something to work ?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Problem for creating new token
« Reply #4 on: March 21, 2011, 09:27:20 pm »

Maybe you should start to explain what exactly you try to accomplish. Without that information nobody can give you more detailed advice than just looking at the code and search the board (yes, we already have some thread that deals with custom tokens).
Logged

Syberi@

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Problem for creating new token
« Reply #5 on: March 21, 2011, 09:45:35 pm »

Thanks for your answer Andre.

I want to integrate into my website coppermine.

For doing this, I create a personnal thème. This one is working fine but I want to put a column on the right side that contains my menu (not the coppermine menu but the menu of my website). In this column, I have a php code, so I want to integrate a token.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Problem for creating new token
« Reply #6 on: March 21, 2011, 09:48:04 pm »

Can you please attach your custom theme as-is as zip file? Thanks.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.