Advanced search  

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]

Pages: [1]   Go Down

Author Topic: placeholders does not get resolved in custom_header/footer  (Read 3582 times)

0 Members and 1 Guest are viewing this topic.

atmorell

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
placeholders does not get resolved in custom_header/footer
« on: September 09, 2007, 02:19:30 pm »

Hello,

I have created a custom header with mane and banner content. When I view the page all the placeholders does not get resolved (in header.html) Do I need to call a special function or something? Coppermine output the placeholders without parsing them {LOGIN_FORM}

Best regards.
Asbjørn Morell.

theme:
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<title>{TITLE}</title>
{META}
<link rel="stylesheet" href="themes/domain/style.css" type="text/css" />
<script src="coverflow/AC_RunActiveContent.js" type="text/javascript"></script>

</head>

<body >

{ADMIN_MENU}

{CUSTOM_HEADER}
{GALLERY}
{CUSTOM_FOOTER}


</html>

custom_header:
 <table id="wrapper" align="center" width="1024px" border="0" cellspacing="20">
    <tr>
      <td valign="top" style="border: 1px solid #666666;background-color:#FFFFFF;">

<div id="header">
<div id="login">{LOGIN_FORM}</div>
<ul>{SYS_MENU}</ul>
{SUB_MENU}
</div>



{LANGUAGE_SELECT_FLAGS}
{THEME_SELECT_LIST}
{LANGUAGE_SELECT_LIST}


<h1>Nyeste billeder</h1>
<p>dobbelt klik p&aring; et billede for at se alle detaljer</p>

<div class="flash">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="900" height="350" id="coverflow" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="coverflow/coverflow.swf" /><param name="quality" value="medium" /><param name="bgcolor" value="#ffffff" /><embed src="coverflow.swf" quality="high" bgcolor="#ffffff" width="900" height="500" name="coverflow" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
<script type="text/javascript" src="coverflow/ieupdate.js"></script>

</div>

<iframe height="0" frameborder="0" width="100%" id="displayimage" name="displayimage"></iframe>

[Edit by Sami]:
put html in to code block
« Last Edit: September 09, 2007, 08:13:25 pm by GauGau »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: placeholders does not get resolved in custom_header/footer
« Reply #1 on: September 09, 2007, 02:22:15 pm »

A link to your gallery would help a lot
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: placeholders does not get resolved in custom_header/footer
« Reply #2 on: September 09, 2007, 03:10:39 pm »

The placeholder token simply can't be resolved in the custom header script. It's an outside script - how should coppermine's replacement mechanisms have an impact on them?
Logged

atmorell

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: placeholders does not get resolved in custom_header/footer
« Reply #3 on: September 09, 2007, 03:12:32 pm »

Hello,

http://coppermine.kunstvaerker.dk/
Sorry forgot about the code block. If you dobbeltclick and image you can see my problem. The whole page get's wrapped twice and I only need the content for my iFrame.

Best regards.
Asbjørn Morell
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: placeholders does not get resolved in custom_header/footer
« Reply #4 on: September 09, 2007, 03:18:55 pm »

Did you read my reply? You can not add the placeholder tokens into your cutom_header include. The scope of what you can do in your custom_header include is limited - just wanting that something works as you hope that it does will not make it work. In fact, the custom header include is just another script file that needs to do standalone things. What you can do and what you can't is being described in http://documentation.coppermine-gallery.net/php-content.htm#php-content_header_footer
Logged

atmorell

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: placeholders does not get resolved in custom_header/footer
« Reply #5 on: September 09, 2007, 03:44:11 pm »

GauGau,

Okay.  Thanks anyway.
Have a nice day Sir.

Best regards.
Asbjørn Morell.
Logged

atmorell

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: placeholders does not get resolved in custom_header/footer
« Reply #6 on: September 09, 2007, 07:35:30 pm »

Hello,
 
I found a solution:

1.
edit /include/functions.inc.php

Code: [Select]
function load_template()
line 668: add:
Code: [Select]

if($_GET['op'] == 'iframe') {
$template_file = "templatenowrap.html";
}

2.
copied template.html to templatenowrap.html

3.
removed menu etc from the templatenowrap.html

So when I open my page with domain.com?op=iframe the template.html get's swiched with the reduced version.

Hope this helps anyone with a similar problem. ;)

Best regards.
Asbjørn Morell.
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.