Including a Javascript File from Admin

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
jevchance
Registered User
Posts: 1
Joined: Tue Jul 22, 2008 8:59 pm

Including a Javascript File from Admin

Post by jevchance »

Greetings.

I am using PHPBB 2.0.21 in a hosted environment. I do not have developer access to the application.

I would however like to include a javascript include on every page of the board. The code looks something like this:
<script src="http://www.xyz.com/xyz.js"></script>

Is there anyway to include this on every page from the administration tool?
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53379
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Including a Javascript File from Admin

Post by Brf »

If you cannot access your files, you are out of luck.
User avatar
ric323
Former Team Member
Posts: 22910
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: Including a Javascript File from Admin

Post by ric323 »

What do you mean a "hosted environment"? Are you on a "free forum host", meaning you did not install phpBB yourself?
If so, then as brf said, you cannot make any changes.
If this was a "one-click install", but you can see your board files via FTP, then you can make changes.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Including a Javascript File from Admin

Post by Lumpy Burgertushie »

and if you do have the access, simply add your javascript to the <head> section of the overall_header.tpl file for whatever style you are using.

that will make the script run on every page.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
compt 134
Registered User
Posts: 10
Joined: Thu Jul 24, 2008 6:52 am

Re: Including a Javascript File from Admin

Post by compt 134 »

jevchance wrote:Greetings.

I am using PHPBB 2.0.21 in a hosted environment. I do not have developer access to the application.

I would however like to include a javascript include on every page of the board. The code looks something like this:
<script src="http://www.xyz.com/xyz.js"></script>

Is there anyway to include this on every page from the administration tool?
Is it really possible? I mean is it safe to do have access like that?
User avatar
ric323
Former Team Member
Posts: 22910
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: Including a Javascript File from Admin

Post by ric323 »

compt 134 wrote:
jevchance wrote:Greetings.

I am using PHPBB 2.0.21 in a hosted environment. I do not have developer access to the application.

I would however like to include a javascript include on every page of the board. The code looks something like this:
<script src="http://www.xyz.com/xyz.js"></script>

Is there anyway to include this on every page from the administration tool?
Is it really possible? I mean is it safe to do have access like that?
What do you mean? It is NORMAL for the forum adminstrator to have full FTP access to all the phpBB files.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions
Locked

Return to “2.0.x Support Forum”