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: Question about custom header?  (Read 5241 times)

0 Members and 1 Guest are viewing this topic.

fangweile

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 103
  • Saranghaeyo ^_^
    • All Koreans - Home of Korean Actors and Actresses
Question about custom header?
« on: December 10, 2011, 01:38:19 pm »

Coppermine version: 1.5.16  bridged with
SMF Version: SMF 2.0.1

I am planning to upgrade my coppermine to the latest version 1.5.16 so i created a test site to see if everything goes well. However when I tried to create a custom header (header.php) to include the menus of my smf forum, an error occured:
Code: [Select]
Fatal error: require_once() [function.require]: Failed opening required '/QueryString.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/allkorea/public_html/smftest/SSI.php on line 62
The code I was used in header.php is perfectly working in my previous version of my coppermine gallery. I wonder if the quoted below is the reason why I can't include the header in the latest version.

Quote
The custom include files are an answer to the FAQ "How can I include Coppermine into an existing web site?": although the primary answer to the question is "You can't include Coppermine into another page by using the PHP commands include or require at all.". This looks like a contradiction in terms, but you need to see the idea behind this: everybody who has been using includes agrees that they can be an easy method to efficiently maintain a site without having to edit many files to accomplish only a minor change on all or many pages. You just need to figure this out differently: include your overall site's navigation into coppermine instead of trying to integrate coppermine into an existing site (because you can't do that for technical reasons).

Any help will greatly appreciated, thanks in advance.
Logged
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Question about custom header?
« Reply #1 on: December 12, 2011, 02:58:34 pm »

It seems that you try to include an SMF file. From the error message I conclude that the following file is missing: http://www.allkoreans.net/smftest/QueryString.php

It may have many other reasons, impossible to say without a link to your gallery, the corresponding SMF board and the content of your header.php file.
Logged

fangweile

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 103
  • Saranghaeyo ^_^
    • All Koreans - Home of Korean Actors and Actresses
Re: Question about custom header?
« Reply #2 on: December 13, 2011, 04:33:24 am »

Thanks a lot for your response.
The content of my header.php is
Code: [Select]
<?php
//Path to SSI
require("../SSI.php");
ssi_menubar(); 
?>
QueryString.php is located in this folder
/home/allkorea/public_html/smftest/Sources/Querystring.php
while
header.php is located in this folder
/home/allkorea/public_html/smftest/gallery/header.php

When you view my header directly it with show my smf menus.
Logged
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Question about custom header?
« Reply #3 on: December 13, 2011, 09:28:02 am »

The output of http://www.allkoreans.net/smftest/gallery/header.php is currently
Code: [Select]
<div id="main_menu">
<ul class="dropmenu" id="menu_nav">
<li id="button_home">
<a class="active firstlevel" href="http://www.allkoreans.net/smftest/index.php">
<span class="last firstlevel">Home</span>
</a>
</li>
<li id="button_forum">

<a class="firstlevel" href="http://www.allkoreans.net/smftest/index.php?action=forum">
<span class="firstlevel">Forum</span>
</a>
</li>
<li id="button_help">
<a class="firstlevel" href="http://www.allkoreans.net/smftest/index.php?action=help">
<span class="firstlevel">Help</span>
</a>

<ul>
<li>
<a href="http://www.allkoreans.net/smftest/index.php?action=tpmod;sa=help">
<span>TinyPortal</span>
</a>
</li>
</ul>
</li>

<li id="button_search">
<a class="firstlevel" href="http://www.allkoreans.net/smftest/index.php?action=search">
<span class="firstlevel">Search</span>
</a>
</li>
<li id="button_calendar">
<a class="firstlevel" href="http://www.allkoreans.net/smftest/index.php?action=calendar">
<span class="firstlevel">Calendar</span>

</a>
</li>
<li id="button_media">
<a class="firstlevel" href="http://www.allkoreans.net/smftest/index.php?action=media">
<span class="firstlevel">Media</span>
</a>
</li>
<li id="button_login">

<a class="firstlevel" href="http://www.allkoreans.net/smftest/index.php?action=login">
<span class="firstlevel">Login</span>
</a>
</li>
<li id="button_register">
<a class="firstlevel" href="http://www.allkoreans.net/smftest/index.php?action=register">
<span class="last firstlevel">Register</span>
</a>

</li>
</ul>
</div>

Instead of messing around with path issues I suggest to directly copy that code to your header.php file. If you don't want to do that it may work to copy the header.php file one level up and change its content to
Code: [Select]
<?php
//Path to SSI
require("SSI.php");
ssi_menubar(); 
?>
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.