Print

Walkthrough - Including a link to a file

The method described here allows you to create a link to a file stored in the File Manager. The most likely use for this is to allow a resource like a Presentation or a PDF document referenced in a post to open in a new browser window. Because this is simply URL reference, it can also be used to:

If your browser recognises the type of resource you've linked to, then the file will be opened in the corresponding application (e.g. a DOC file will open in Microsoft Word), otherwise the user will be given the option of saving the file.

Uploading the file

If the resource you are linking to already exists in the File Manager (or in some other web accessible location) you can skip this section and jump straight to "Creating a post with a linked file". If not, you may want to read the instructions on how to use the File Manager before going any further!

Log in to the File Manager. If you wish, you can create your own personal folder to hold your file.

It's best to make sure that the file and folder names do not include any spaces, as this makes it harder to create links later. So, if needed, remove spaces or replace them with '-' or '_' characters, then upload the file into your chosen folder.

Creating a post using an image

When doing things like this, it's usually best to have two browser windows (or tabs) open on the forum: One for creating your new post, the other to locate the item you want to reference (i.e. the file in the File Manager).

Start by creating your new post (for illustration, we're using the Sand Box forum for this) and type in any text that you want to appear before your link.

Now, there are two ways of adding the link, and it depends on how you want it to appear in your post:

If you're happy for the full URL to shown as the link, then all you need to do is simply type in the URL, as shown:

 

Which will be rendered like this:

 

However, you may feel you would rather have a certain word or phrase as the link and not show the actual URL. This is only slightly more difficult. First, type in your text. Now highlight the phrase you want to use as your link:

 

Next, click on the "URL" button the add the "tags" at either side of your selected words:

 

This is the only tricky part: Right now, the tags don't point to anything. You now need to edit the first tag to include the URL of the resource (notice that there's a help string displayed above the editing window to remind you of the correct format to use). You need to insert an '=' followed by the URL of the file:

 

The result will be rendered as:

 

That is all there is to it. But if you're more ambitious...

More advanced - Using an image as a link

You don't need to restrict yourself to using text as the link in your posts. You can combine the linking method above with an embedded image - this is useful if you want have a thumbnail image in your post act as a link to the full sized image.

Let's assume you have two image files: "fullsize.png" and "thumbnail.png", and you have already uploaded both of these to the "images" folder in the File Manager.

In your post, create the image reference to your thumbnail image:

[img]http://files.sjtag.org/images/guides/thumbnail.png[/img]

Now, select that whole string and click on the URL button to place the URL tags outside the img tags:

[url][img]http://files.sjtag.org/images/guides/thumbnail.png[/img][/url]

Edit the first URL tag to point to the larger image and you're done:

[url=http://files.sjtag.org/images/guides/fullsize.png][img]http://files.sjtag.org/images/guides/thumbnail.png[/img][/url]

It can look a bit complicated, but as long as you get the tags in the right order you should be fine - just remember to check things in the Preview before submitting your post. When someone clicks on your thumbnail image the full size one will open in a new window!