| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Whenever you search in PBworks, Dokkio Sidebar (from the makers of PBworks) will run the same search in your Drive, Dropbox, OneDrive, Gmail, and Slack. Now you can find what you're looking for wherever it lives. Try Dokkio Sidebar for free.

View
 

randomizer

Page history last edited by Laura Gibbs 3 years ago

 

Tech Tips: RotateContent Randomizer

 

You've seen the randomizers in the webpages at this site, plus the randomizers in the sidebar of the Announcements blog. I create those randomizers using a free online tool created by a student in this class many years ago (back in 2003!) which is online here: RotateContent.com. The way it works is that you create a simple HTML table with two columns: in the left column you put the word "random" in every cell, and in the right column, you put the items you want to randomize, one item per row. Then you convert that HTML table to a javascript, which you can then use at your blog. There's an extra step required to use the randomizer in a Google Site page; if you are interested in learning how to do that, let me know and I will write up a tech tip for that. Also, there is an extra step required if you are going to use images in your randomizer; if you are interested in that, I can write a tech tip for that as well.

 

For this tip, you will create a simple text randomizer. As an example, I made a randomizer to tell people their lucky day of the week. You can see that randomizer in this blog post: Lucky Day of the Week.

 

Here are the step by step instructions:

 

STEP ONE: Create and edit your HTML file in your webspace.

 

First, create a file by going to the Files area, clicking on the +File and giving your file a name; make sure you use html as the suffix. For example, I made a file named myrandomizer.html.

 

The click on the file and then select HTML Editor. You can accept the default file address when prompted.

 

Next, click on the Table icon in the editor. Enter the number of rows you want. (You can add more rows or delete rows as needed.)

 

When the table appears, enter the word random in the left-hand cell in each row. Then you can enter whatever you want in the right-hand cell. You can also create links if you want, but not images (I'll write up a separate tip on managing images). As you can see, I entered the lucky days of the week in my table, and you can enter whatever content you want to randomize.

 

When you're done, click save in the upper left-hand corner, and you can then close that browser tab. 

 

 

STEP TWO: Download file and convert to javascript with RotateContent.

 

Use the Download option to download the file from your OU webspace to your computer.

 

Then go to the RotateContent service; specifically this page: Convert Template

 

Select javascript and then click choose file, selecting your saved html file in the dialogue box. Then click convert template. When prompted, right-mouse click the link provided and choose "Save Link As". You can accept the default file name; this will be a .js javascript file on your computer.

 

STEP THREE: Upload javascript to your webspace.

 

Now, go to your OU webspace and click the upload button. Upload the .js javascript file that you just saved.

 

STEP FOUR: Publish javascript in your blog.

 

To publish the javascript in a blog post, you will need to use this snippet, filling in your WEBSPACE and also filling in the FILENAME that you just uploaded.

 

<script type="text/javascript"> var display = " " </script><script type="text/javascript" src="https://WEBSPACE/FILENAME.js"></script>

 

For example, here's what it looks like for my www.lauragibbs.net space, and a file named myrandomizer:

 

<script type="text/javascript"> var display = " " </script><script type="text/javascript" src="https://lauragibbs.net/myrandomizer.js"></script>

 

That is what you will paste into a blog post to see if it works. So, go to your blog, create a new post, and make sure you switch from the Composer view to the HTML view. Then, paste in the snippet and publish the post; the script will not work when you are editing the post, but it should work when you publish the post. For example, here's my post, with the script pasted in down at the bottom of the post: Lucky Day of the Week.

 

If you run into trouble, just let me know. The first time you create and publish a javascript might be a little intimidating, but it's like anything else online: it will get familiar with practice. I've been creating and publishing these javascripts so long that it's as easy to me as inserting an image into a post. So, let me know if you get stuck, and I'll be glad to help.

 

Finishing Up: If your script is functioning in your blog post, you are good to go! Use the phrase "Tech Tip: Randomizer" as your blog post title and "Tech Tip" as the label; then you can do the Declaration. 

 

 

Comments (0)

You don't have permission to comment on this page.