Problem for creating new token Problem for creating new token
 

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

Problem for creating new token

Started by Syberi@, March 20, 2011, 09:19:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Syberi@

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.

Syberi@

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

Αndré

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.

Syberi@

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 ?

Αndré

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

Syberi@

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.

Αndré

Can you please attach your custom theme as-is as zip file? Thanks.