Skip to Questions

Guide FAQ - Your LibGuides v1 Questions. Answered!

Q

What code or scripts can I add to my LibGuides, CampusGuides, or CommunityGuides sites?

I want to write some custom scripts to host on your servers, can I do that? Can I add Visual Basic? Or PHP?
Last Updated: Jan 24, 2012  |  1641 Views
Topics: How To...

Was this helpful? 3   3
A

Answer

We do not allow our customers to run custom PHP code on our servers because that opens up many different concerns related to privacy, data security, and server performance / stability. 

In addition, we only allow code that runs in the browser (i.e. HTML, JavaScript). So you cannot add Visual Basic code to your system. 

For PHP Scripting Code, here's what you can do:

  • Host the PHP code on your local server
  • In your Guide, add a 'Remote Scripts' box
    The 'Remote Scripts' box allows you to enter the URL of a remotely hosted script (PHP, JavaScript, etc...) to execute inside the box. Anything your script writes to stdout (standard out) will display inside this box.

    Your content will be wrapped inside a div in the content box so make sure you properly close your divs. If you leave any divs open, it could interfere with the display of the rest of the boxes on the page.

    You should not include <body>, <head>, and similar tags in your script as those are already included within the LibGuides/CampusGuides/CommunityGuides code - just output the content you want displayed inside the box.

    Use absolute paths for any images and links inside your script. In other words, use href=yourdomain/yourpage.html instead of href=yourpage.html (the same is true for src= attributes).
Answered by Talia RichardsBookmark and Share

Other Answers / Comments (0)

    Need Help?

    This site is shutting down by, if not before, March 31, 2018.

    LibGuides v1 servers are also shutting down at that time.

    See LibGuides v2 documentation instead.


    Support:

    Follow LibGuidesFAQ on Twitter Follow us on Twitter!