Plugin info

Total downloads: 2,502
Active installs: 10
Total reviews: 0
Average rating: 0
Support threads opened: 0
Support threads resolved: 0 (0%)
Available in: 1 language(s)
Contributors: 1
Last updated: 6/21/2009 (6037 days ago)
Added to WordPress: 6/21/2009 (16 years old)
Minimum WordPress version: 2.5
Tested up to WordPress version: 2.8
Minimum PHP version: f

Maintenance & Compatibility

Maintenance score

Possibly abandoned • Last updated 6037 days ago

20/100

Is External Files abandoned?

Possibly abandoned (last update 6037 days ago).

Compatibility

Requires WordPress: 2.5
Tested up to: 2.8
Requires PHP: f

Developers

Languages

Similar & Alternatives

Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.

Header and Footer Scripts
Rating 4.6/5 (56 reviews)Active installs 200,000
Head & Footer Code
Rating 5.0/5 (52 reviews)Active installs 100,000
CSS & JavaScript Toolbox
Rating 4.7/5 (85 reviews)Active installs 10,000
Cache External Scripts
Rating 5.0/5 (25 reviews)Active installs 1,000
Speed Up – JavaScript To Footer
Rating 4.3/5 (6 reviews)Active installs 1,000

Description

External files provides a shortcode [external] which can be used to insert the contents of a file or url into the current post or page. The plugin will automatically format the text based on the extension (for files) or mime type (for urls), using Alex Gorbatchevs’ Syntax Highlighter javascript.

The shortcode can accept three optional parameters:

  • format can be used to specify a highlighting format, rather than letting the plugin decide which format to use
  • start specifies a line number to output from, so sections of a file/url can be shown
  • end specifies the line to stop at

See the installation page for usage examples.

The available formats are:

  • AS3
  • Bash
  • Cpp
  • CSharp
  • Css
  • Delphi
  • Diff
  • Groovy
  • Java
  • JavaFX
  • JScript
  • Perl
  • Php
  • Plain
  • PowerShell
  • Python
  • Ruby
  • Scala
  • Sql
  • Vb
  • Xml

Future features

Following is a list of ideas and features to add:

  • BASE_PATH and BASE_URL options that can be used in the shortcode to avoid typing the same long path/url each time
  • a list of available formats with the checkboxes to enable/disable each individually, thus avoiding having to load all of them
  • an option for changing the theme of the syntax highlighter

Installation

  1. Install the plugin and activate
  2. In a post or page, type [external]/path/to/your/script.txt[/external]

Examples:

[external]/path/to/file.php[/external]
[external]http://my.website.com/about.html[/external]
[external start=10 end=20]/very/long/script.js[/external]
[external format=xml]/not/really/a-php-document.php[/external]

Frequently Asked Questions

My code isn’t being highlighted

This might mean that the theme you are using doesn’t call wp_footer before the closing body tag. The javascript that applies the highlighter is attached to the wp_footer action – either try another theme (the default wordpress theme will work) or add the theme by typing the following inside the closing body tag:

<?php wp_footer(); ?>

My code should be formatted as *x, but is showing up as plain*

If you are specifying a format, are you using one from the available formats list (see the Description page)? If you are not specifying a format, does the file have a correct extension for the file type or is the web page returning with the correct Content-Type header?

I’m still stuck

Get in touch, I’ll see what I can do!

Review feed

No reviews available

Screenshots

No screenshots available

Changelog

0.1

2009-06-21
* First version! Works for me, comments appreciated.