Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Board Wrappers Full?; Host large scripts externally instead
Topic Started: Mar 31 2004, 10:58 AM (36,628 Views)
Deleted User
Deleted User

If you want to add more code to your forum than the 20,000 character limit of the board wrappers would normally allow, you may use the following method to host scripts externally and link to them instead.

Understand that every bit of code you add can slow down your forum or otherwise interfere with it's performance.


• These instructions assume that you're copying the code from a website or a post in a forum.
(If the code is in the form of a .js file, skip steps 1 & 2.)




Step 1

Copy and paste the code into notepad and then remove the script tags at the beginning and end, if there are any. (<script> or <script type="text/javascript"> etc. and </script>)

Step 2

Save it as a .js file.
When you go to save it, select "Save as" and not just "Save", and you'll see a dropdown box labeled "Save as type".
You'll need to choose "All files" in that box instead of .txt and then put in a name for the file in the box above, making sure to add .js to the end of it. (Example: script.js)

Note: Due to security precautions, you may have trouble uploading JS files to boards. If this is the case, just save it as a plain text file (.txt) and try it.

Step 3

Upload it either to your forum in a post or to a website and then copy its url. How you do that will depend on what site you upload it to. If you do it in a post on your forum (which I recommend, for the same reasons mentioned in this post of mine about uploading images), just go to your File Manager >> Attachments (View Uploads) and right-click the filename and copy the url from there.

Step 4

Put the following code in your board wrappers wherever the script is supposed to go, and replace the red part with the url of your uploaded .js file*:
Quote:
 
<script type="text/javascript" src="url of the script"></script>

*Your .js file will appear in the File Manager as a .js file, but the url will end in .ibf - This is normal.

Now you can keep adding codes until your forum locks up and you have to pay Brandon to fix it. :w00t:
Quote Post Goto Top
 
Brandon
Member Avatar


So, you might ask why we do not increase the limit so you do not have to do this. External scripts get cached by a browser and that means that dialup and even broadband users will find your forum loads faster.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Troubleshooting and Problem Solving · Next Topic »
Add Reply