i Want a php code on each page i Want a php code on each page
 

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

i Want a php code on each page

Started by hemanshurpatel, January 24, 2008, 02:29:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hemanshurpatel

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

François Keller

and whot do this php code ?
you can propably use the custom header or custom footer to do this
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

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

Joachim Müller

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)

hemanshurpatel

    * 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

Joachim Müller

Quote from: hemanshurpatel on January 25, 2008, 08:29:52 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).

Quote from: hemanshurpatel on January 25, 2008, 08:29:52 AM
    * 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>
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

hemanshurpatel

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

hemanshurpatel

now
Path to custom footer include                      footer.php

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

Joachim Müller

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.

hemanshurpatel

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

Joachim Müller

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.

hemanshurpatel

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

hemanshurpatel

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?

Joachim Müller

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.

hemanshurpatel

Thanks buddy
problem solved
i put custom footer at proper place in my template file and it worked.