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: i Want a php code on each page  (Read 6621 times)

0 Members and 1 Guest are viewing this topic.

hemanshurpatel

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Free online gallery just for you
i Want a php code on each page
« on: January 24, 2008, 02:29:45 pm »

Hello friends
i am using coppermine for my gallery
i want a php code to appear on each page of my website
I add that code on anycontent.php but it appears on homepage only
can anyone tell me how can i make it to appear on all pages.

I have try to add that code on template.html but that didnt work, i dont know where in theme.php i can add that code so i add that code in anycontent.php page
but it doesnt appear in each page.

Please can anyone help me in that.


Regards,

Hemanshu Patel
« Last Edit: January 26, 2008, 03:10:45 am by Joachim Müller »
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: i Want a php code on each page
« Reply #1 on: January 24, 2008, 02:55:30 pm »

and whot do this php code ?
you can propably use the custom header or custom footer to do this
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

hemanshurpatel

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Free online gallery just for you
Re: i Want a php code on each page
« Reply #2 on: January 25, 2008, 04:45:51 am »

I am very sorry for posting two times, but i was unsure of the location i should put my request.

Thank for your response, i have created a custom footer and add its link in themes setting tab
but still it doesnt appear
please can anyone tell me next what should i do to appear that footer page in my website everywhere??

Regards,
Hemanshu
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: i Want a php code on each page
« Reply #3 on: January 25, 2008, 08:12:08 am »

Post
  • A link to your gallery
  • A deep link to the include file
  • the content of the "custom header" field in coppermine's config
  • The PHP code that you're trying to add (as Frantz suggested)
Logged

hemanshurpatel

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Free online gallery just for you
Re: i Want a php code on each page
« Reply #4 on: January 25, 2008, 08:29:52 am »

    * A link to your gallery
        http://onlineforu.info
    * A deep link to the include file
         http://onlineforu.info/footer.php
    * the content of the "custom header" field in coppermine's config
 Path to custom header include                   _______________________           
Path to custom footer include                      http://onlineforu.info/footer.php

    * The PHP code that you're trying to add (as Frantz suggested)

<table>
<tr>
<td><div align="center">Powered by <a href="http://www.Onlineforu.info">http://www.Onlineforu.info</a>| Copyright @ 2008</div> </td>
</tr>
</table>


Right now i am giving this code only, but i am planning to add some more links here.

you can check here copyright is @ 2008 while on my website it still it at @ 2007, which is something i have added in my template.html
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: i Want a php code on each page
« Reply #5 on: January 25, 2008, 09:06:18 am »

Path to custom footer include                      http://onlineforu.info/footer.php
That's where you made the mistake - you're suppossed to porivde a relative path, not a URL. Therefor, this field should contain "footer.php" (without the quotes).

    * The PHP code that you're trying to add (as Frantz suggested)

Code: [Select]
<table>
<tr>
<td><div align="center">Powered by <a href="http://www.Onlineforu.info">http://www.Onlineforu.info</a>| Copyright @ 2008</div> </td>
</tr>
</table>
That's no PHP code, but just plain HTML. There's no need to use the custom footer feature for that. Just add that code to themes/yourtheme/template.html instead
Logged

hemanshurpatel

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Free online gallery just for you
Re: i Want a php code on each page
« Reply #6 on: January 25, 2008, 09:12:08 am »

thanks for the reply about relative path
i will try the one

i know this is html code only, and upto now i am using that template.html for adding this
but from now on i will add some php code on that so i need to solve this problem


thanks for the response,
let me check weather it works or not.

Regards,
hemanshu
Logged

hemanshurpatel

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Free online gallery just for you
Re: i Want a php code on each page
« Reply #7 on: January 25, 2008, 09:16:08 am »

now
Path to custom footer include                      footer.php

still it doesnt work
i am still getting previous footer (template.html) only
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: i Want a php code on each page
« Reply #8 on: January 25, 2008, 09:22:22 am »

The copyright disclaimer shows twice (at the very top of the page as well as at the bottom), although it exists only once in your template.html (http://onlineforu.info/themes/dfire/template.html), so imo the include works as expected. You may have used the custom header field instead of the custom footer field. So in my opinion, things work exactly as expected on your page.
Logged

hemanshurpatel

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Free online gallery just for you
Re: i Want a php code on each page
« Reply #9 on: January 25, 2008, 09:57:32 am »

i am sorry
but i cant see it 2 times
i am seeing it 1 time only
and i am sure i have add that in custom footer tab only

right now it should show that copyright notice 2 times but it shows once only
and that is from that template.html, not from footer.php
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: i Want a php code on each page
« Reply #10 on: January 25, 2008, 10:16:16 am »

You appear to have edited something: when I re-visited your page, the first disclaimer is no longer visible.
Attach a screenshot of your config page, with the "Themes settings" section expanded.
Logged

hemanshurpatel

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Free online gallery just for you
Re: i Want a php code on each page
« Reply #11 on: January 25, 2008, 11:09:39 am »

hey
it was there
it was there on top left of mine page
but i have added that as footer

see in the attached image

Let me try it with placing the same thing in header portion as well, and check what happen, i will send u its screenshot as well
Logged

hemanshurpatel

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Free online gallery just for you
Re: i Want a php code on each page
« Reply #12 on: January 25, 2008, 11:14:23 am »

here with the same setting with header and footer
menad footer.php in both location, custom header and footer

check the image

the header thing is working fine but the foother thing is not working fine.
what could be the  reason
i think could be a problem in template, what say?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: i Want a php code on each page
« Reply #13 on: January 25, 2008, 05:17:44 pm »

The reason that it shows at the top of the screen (see attached screenshot) is that the theme you use (dfire) uses div containers to position the elements on the screen. Change the properties of the div container that contains your disclaimer (CSS skills needed), or change your theme's template file and move the placeholder token {CUSTOM_FOOTER} to a place that makes sense, e.g. directly after the {GALLERY}-token.
Logged

hemanshurpatel

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Free online gallery just for you
Re: i Want a php code on each page
« Reply #14 on: January 26, 2008, 12:00:39 am »

Thanks buddy
problem solved
i put custom footer at proper place in my template file and it worked.
Logged
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 19 queries.