Placing PHP code in head

Having trouble installing serendipity?
Post Reply
MarioH
Regular
Posts: 238
Joined: Mon Jul 20, 2009 10:53 pm
Contact:

Re: Need help?

Post by MarioH »

Hi!
You can use the serendipity_event_page_nugget plugin. You can install it as often as you need and place code on different position of the page.
Regards
Mario
thh
Regular
Posts: 419
Joined: Thu Oct 26, 2006 2:38 pm
Location: Stuttgart, Germany
Contact:

Re: Need help?

Post by thh »

Please forget what I wrote. :-)
Kylie99 wrote: Tue Jun 19, 2018 5:33 amI need to place 1 line of php code on top of a page, and 2 lines script tags in <head>
You can add something to the <head> area with serendipity_event_head_nugget. To add something on top of a page, you'll need to edit the template.
Kylie99 wrote: Tue Jun 19, 2018 5:33 amwhere do I do this? can't find the files that contain the html or where it's generated :/
You'll find the templates in .../templates/NAME_OF_YOUR_THEME

Changes in these files will be overwritten with each update of the theme, so you should fork it (i.e. make your own theme by copying everything to a new directory, changing the theme name in the info.txt file and add your modifications).

There may be another way to do what you want to accomplish with adding that php code, but that depends on what you want to do . :-)
MarioH wrote: Tue Jun 19, 2018 10:58 pm You can use the serendipity_event_page_nugget plugin. You can install it as often as you need and place code on different position of the page.
That won't help with adding something to the <head> area of the HTML file, I think, and if that works for the php code will depend on what that code does ...
MarioH
Regular
Posts: 238
Joined: Mon Jul 20, 2009 10:53 pm
Contact:

Re: Need help?

Post by MarioH »

That won't help with adding something to the <head> area of the HTML file, I think, and if that works for the php code will depend on what that code does ...
Hm, I'm using the plugin exactly for that. There are several options to place the nugget on different positions of the html-code:

https://hommel-net.de/owncloud/index.ph ... FtWCbJ9HdM
thh
Regular
Posts: 419
Joined: Thu Oct 26, 2006 2:38 pm
Location: Stuttgart, Germany
Contact:

Re: Need help?

Post by thh »

MarioH wrote: Fri Jun 22, 2018 4:56 pm
That won't help with adding something to the <head> area of the HTML file, I think, and if that works for the php code will depend on what that code does ...
Hm, I'm using the plugin exactly for that. There are several options to place the nugget on different positions of the html-code:

https://hommel-net.de/owncloud/index.ph ... FtWCbJ9HdM
Wow. Didn't know that and didn't check the plugin name. - You're right!
Post Reply