Can i create {MY_DATA} in Theme.php ? Can i create {MY_DATA} in Theme.php ?
 

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]

Main Menu

Can i create {MY_DATA} in Theme.php ?

Started by synx, November 05, 2005, 04:31:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

synx

Hello Guys

How can i create a {MY_DATA} Just like {ADMIN_MENU}
And Put it in my template.html and print some data ?

I Want to do this ?

'{WELCOME_CPG}' => wel_cpg()

and put this data to {WELCOME_CPG}

function wel_cpg()
{
if (USER_ID) {
   echo <<<EOT
   Welcome Guest To CPG Gallery
EOT;
} else {
   echo <<<EOT
   Dear CPG Member
EOT;
}
}


But How Can i do this ???  ???

Nibbler

Do it as a normal custom header - check the documentation.

synx

Quote from: Nibbler on November 05, 2005, 04:55:22 PM
Do it as a normal custom header - check the documentation.

Thanks , But i see the Documentation and Manual But  :-[
Can you help me please  :-\\


synx

Quote from: Nibbler on November 05, 2005, 05:12:27 PM
http://coppermine.sourceforge.net/faq.php#customHeader

Thanks Man , But i have a problem - Here is my try

.....
        '{ADMIN_MENU}' => theme_admin_mode_menu(),
'{WELCOME_PCG}' => wel_pcg(),
        );
    echo template_eval($template_header, $template_vars);
}
function wel_pcg()
{
if (USER_ID) {
echo <<<EOT
Welcome
EOT;
} else {
echo <<<EOT
Welcome 2323
EOT;
}
}


I put {WELCOME_PCG} in a <td> in my header
but when i run it the message i Out of Theme in the top right of my page

I Have move it to other tables BUT even when i remove {WELCOME_PCG} from my html
my message will print out of theme ?

???

Nibbler


synx


synx

And Another Question

How Can i print User Name And llink it to the Loged User profile page

if (USER_ID) {
return Welcome ".$user['user_id'] . date(" M j, Y");
} else {


I Try this but , not work
thanks

Nibbler

You can use USER_ID and USER_NAME, so a link to the profile page would be like this:


return 'Welcome <a href="profile.php?uid=' . USER_ID . '">' . USER_NAME . '</a>';

synx

Thanks MAN  :o

And The final question
I want to put somethings just in My Index.php , i mean just show at index.php
I try this but i got error

if ($cat == 0) {
return <<<EOT
<table width="100%" border="0" cellpadding="0" cellspacing="0">
......


Can you help me with this one , it's the final  ::)

Joachim Müller

#10
We have a "one question per thread" policy, you agreed to respect it when signing up. Afaik you have already been told that...

[edit]
synx has already created another thread that deals with the issue in his last posting: http://forum.coppermine-gallery.net/index.php?topic=23421.0
Thanks for creating double work for supporters. Learn to play be the rules!
[/edit]