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

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

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 3 Guests 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]