Advanced search  

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

Pages: [1] 2   Go Down

Author Topic: How insert code PHP in foot - please help!  (Read 10675 times)

0 Members and 1 Guest are viewing this topic.

Mike_PL

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
How insert code PHP in foot - please help!
« on: July 26, 2006, 10:13:39 am »

How insert code php:

Code: [Select]
<?php

ini_set
("include_path",ini_get("include_path").":../:../../:../../../:../../../../"); 
include_once 
"linkuj_inc.php";
$separator=" | ";
echo 
implode($separator,$linki); 

?>

in footer?
Logged

Mike_PL

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: How insert code PHP in foot - please help!
« Reply #1 on: July 26, 2006, 01:07:55 pm »

 ???
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: How insert code PHP in foot - please help!
« Reply #2 on: July 26, 2006, 01:24:31 pm »

put it under footer.php and copy footer.php to root of your gallery and enable footer on
config=>Themes settings=>Path to custom footer include
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Mike_PL

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: How insert code PHP in foot - please help!
« Reply #3 on: July 26, 2006, 02:15:17 pm »

Path to custom footer include


I write: footer.php, but i don't see new footer?
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: How insert code PHP in foot - please help!
« Reply #4 on: July 26, 2006, 06:45:06 pm »

Write a plain echo statement in footer.php to test whether it comes or not...

Code: [Select]
<?php
  
echo "This is custom footer";
?>


If this comes fine then something wrong in your above code. I see that you are including some file in footer.php The path should be relative to the coppermine root folder. Else the include won't work.
Logged
Chief Geek at Ranium Systems

Mike_PL

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: How insert code PHP in foot - please help!
« Reply #5 on: July 26, 2006, 07:37:53 pm »

Not work. I don't see text "This is custom footer" in footer...

my gallery: http://www.galeria-gryzonie.info/
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: How insert code PHP in foot - please help!
« Reply #6 on: July 26, 2006, 07:39:59 pm »

- you already have some link on footer !
- if your issue didn't solved PM me your admin user I'll check it for you
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Mike_PL

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: How insert code PHP in foot - please help!
« Reply #7 on: July 26, 2006, 08:00:49 pm »

Ok. A code:

Code: [Select]
<?php
  
echo "This is custom footer";
?>

its fine. I see it in footer.

but when i'm paste in footer.php code:

Code: [Select]
<?php

ini_set
("include_path",ini_get("include_path").":../:../../:../../../:../../../../"); 
include_once 
"linkuj_inc.php";
echo 
implode(" ",$linki); 

?>

it's not fine. I don't see not in footer. This code is correct.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: How insert code PHP in foot - please help!
« Reply #8 on: July 26, 2006, 08:05:15 pm »

if the code that abbas give you works fine then you have error on your own code!
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Mike_PL

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: How insert code PHP in foot - please help!
« Reply #9 on: July 26, 2006, 08:18:57 pm »

But this code its correct ;(

Code: [Select]
<?php

ini_set
("include_path",ini_get("include_path").":../:../../:../../../:../../../../"); 
include_once 
"linkuj_inc.php";
echo 
implode(" ",$linki); 

?>

When i'm paste then in theme.php it's works fine....

;(
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How insert code PHP in foot - please help!
« Reply #10 on: July 26, 2006, 11:03:53 pm »

What's the first actual code line suppossed to do? It looks silly imo. What does linkuj_inc.php do? Why don't you include it directly?

After all,
if the code that abbas give you works fine then you have error on your own code!
is correct, there's nothing more to add.
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: How insert code PHP in foot - please help!
« Reply #11 on: July 27, 2006, 07:05:42 am »

I see that you are including some file in footer.php The path should be relative to the coppermine root folder. Else the include won't work.
Logged
Chief Geek at Ranium Systems

Mike_PL

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: How insert code PHP in foot - please help!
« Reply #12 on: July 27, 2006, 08:46:11 am »

Quote
What's the first actual code line suppossed to do?
I don't now...

Quote
What does linkuj_inc.php do?
It's Link Exchange. This code in theme.php like this:

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fimages1.fotosik.pl%2F118%2Ffc21dc9d4378d59e.gif&hash=574c2f8a429fbf0a8b22920e6f59b3bb697ea312)

but in header It does not look beautiful....
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: How insert code PHP in foot - please help!
« Reply #13 on: July 27, 2006, 09:05:12 am »

as abbas suggested:
do you have "linkuj_inc.php" under root of gallery?
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: How insert code PHP in foot - please help!
« Reply #14 on: July 27, 2006, 09:17:03 am »

The strange chars come from differences in encoding. Coppermine uses utf-8 (unicode) out of the box. The script you're trying to include probably is encoded in iso8859-something.
Quite frankly: you're lacking the needed skills to accomplish this - the answer
I don't now...
clearly shows this.
Logged

Mike_PL

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: How insert code PHP in foot - please help!
« Reply #15 on: July 27, 2006, 09:34:12 am »

Quote
do you have "linkuj_inc.php" under root of gallery?
Yes....

Case is simple. Code works in theme.php - ( http://www.galeria-gryzonie.info in header) but this code inserted in footer.php doesn't works. Encoding is unimportant.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: How insert code PHP in foot - please help!
« Reply #16 on: July 27, 2006, 03:06:20 pm »

if that code works with theme.php then your issue is wrong path on your code
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Mike_PL

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: How insert code PHP in foot - please help!
« Reply #17 on: July 27, 2006, 03:34:09 pm »

Where in path on code is wrong? As correct path should look?
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: How insert code PHP in foot - please help!
« Reply #18 on: July 27, 2006, 03:58:38 pm »

- sorry it's not the path because theme.php will execute under root path
- anyway your header links are comes before head and body tags you should add them after them
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Mike_PL

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: How insert code PHP in foot - please help!
« Reply #19 on: July 27, 2006, 04:07:02 pm »

My footer.php like this:

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html>

<?php

ini_set
("include_path",ini_get("include_path").":../:../../:../../../:../../../../"); 
include_once 
"linkuj_inc.php";
echo 
implode(" ",$linki); 

?>


<head>


</head>
<body>

but further dont works..

 :'( :'( :'(
Logged
Pages: [1] 2   Go Up
 

Page created in 0.024 seconds with 16 queries.