coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: Syberi@ on March 20, 2011, 09:19:41 PM

Title: Problem for creating new token
Post by: Syberi@ 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

/******************************************************************************
** 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.
Title: Re: Problem for creating new token
Post by: Syberi@ on March 20, 2011, 09:32:53 PM
I Forget to say, in my coppermine gallery I have the message {RIGHT_MENU}.
Title: Re: Problem for creating new token
Post by: Αndré 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.
Title: Re: Problem for creating new token
Post by: Syberi@ 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 :

<!-- BEGIN {RIGHT_MENU} -->
   TEST
<!-- END {RIGHT_MENU} -->


Can someone give me something to work ?
Title: Re: Problem for creating new token
Post by: Αndré 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).
Title: Re: Problem for creating new token
Post by: Syberi@ 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.
Title: Re: Problem for creating new token
Post by: Αndré on March 21, 2011, 09:48:04 PM
Can you please attach your custom theme as-is as zip file? Thanks.