Question about custom header? Question about custom header?
 

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

Question about custom header?

Started by fangweile, December 10, 2011, 01:38:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fangweile

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:
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.

QuoteThe 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.
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희

Αndré

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.

fangweile

Thanks a lot for your response.
The content of my header.php is
<?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.
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희

Αndré

The output of http://www.allkoreans.net/smftest/gallery/header.php is currently
<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
<?php
//Path to SSI
require("SSI.php");
ssi_menubar(); 
?>