forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: synx on November 05, 2005, 04:31:49 pm
-
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 ??? ???
-
Do it as a normal custom header - check the documentation.
-
Do it as a normal custom header - check the documentation.
Thanks , But i see the Documentation and Manual But :-[
Can you help me please :-\\
-
http://coppermine.sourceforge.net/faq.php#customHeader
-
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 ?
???
-
Change echo to return
-
Change echo to return
Wow , God Save You Man
Thanks A Lot , Work like a charm
-
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
-
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>';
-
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 ::)
-
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]