Design:Scripts

From Yuku Help

Jump to: navigation, search

« back to Design overview

What is the script library?

The script library is a collection of special tags that you can use in your skins that we replace with actual code. The tags are our way of allowing you to use javascript hacks and other customizations not ordinarily allowed in skins, in a very simple way. We will update and add new scripts over time as requests are made or users submit their own creations for us to approve and add to the library available to everyone.

Where do I put the tags?

Script tags go in your skins, in the custom header or custom footer. You don't need to do anything for them to work, just paste the code and we do the rest. On each of the FAQ pages there are instructions and examples for that script. Each of the code examples has a label, for example you will often see code that looks like this

Image:code_example.jpg

There are a few different labels you will see on examples. These are

Label Location
Custom Header Put the code in the Custom Header box on the edit or wysiwyg page
Custom Footer Put the code in the Custom Footer Box on the edit or wysiwyg page
Custom Header / Footer Put the code in either the Custom Header or Footer box on the edit or wysiwyg page depending where you want the output to show at the top or bottom of the page
Custom CSS Put the code in the Advanced CSS or Extra CSS box on the edit or wysiwyg page

Why isn't my code working?

There are a few reasons the tags may stop working. Things to check are

  • Is the tag still listed in the faq list? You can only use tags that are available in that list. From time to time we may remove tags if they are causing problems or if we need to update or change the tag.
  • Check that you spelt the tag correctly - tags are always lower case and only ever contain the letters A-Z or numbers 1-9. <NoRightClick> won't work because it should be <norightclick>
  • Check that you aren't missing the closing tag if there is one, for example, <tag>...</tag>
  • Check you have the quotes right. If a tag has options, they are always of the format option="value" where the value is surrounded by quotation marks. If you want to use quotes inside value then you need to put a backslash in front of the quote or use an apostrophe, for example, option="This is 'the' correct way" or option="This is \"how\" to quote"
  • Check the contents of the block are correctly formatted. Some tags like menus need the links and text to be in a very specific way to work. Try copying the examples from the FAQ page and working off that as a base for your own code.

If you've checked all of the above and it's still not working, then you can post at skins & css for help from other users.

Navigation