 A Javascript library designed to simplify client-side scripting of HTML.

Slides:



Advertisements
Similar presentations
JQuery MessageBoard. Lets use jQuery and AJAX in combination with a database to update and retrieve information without refreshing the page. Here we will.
Advertisements

WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
M2 – Explain the tools and techniques used in the creation of an interactive website. By Arturas Vitkovskij.
Objective Understand web-based digital media production methods, software, and hardware. Course Weight : 10%
Understand Web Page Development Software Development Fundamentals LESSON 4.1.
Server-Side vs. Client-Side Scripting Languages
1 Computing for Todays Lecture 22 Yumei Huo Fall 2006.
Web Page Behavior IS 373—Web Standards Todd Will.
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
Russell Taylor Lecturer in Computing & Business Studies.
Chapter 1 Getting Started With Dreamweaver. Explore the Dreamweaver Workspace The Dreamweaver workspace is where you can find all the tools to create.
UWWD In our quest to eliminate bad websites, we present…. HALLELUJAH!!
4.01B Authoring Languages and Web Authoring Software 4.01 Examine webpage development and design.
COMPUTER TERMS PART 1. COOKIE A cookie is a small amount of data generated by a website and saved by your web browser. Its purpose is to remember information.
Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Web Design Basic Concepts.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Web Content Management Systems. Lecture Contents Web Content Management Systems Non-technical users manage content Workflow management system Different.
Computer Concepts 2014 Chapter 7 The Web and .
Web Sites for amateur radio. So You want to make a Web Site? There are several things you need to know about web sites before you start to think about.
What is Web Design?  Web design is the creation of a Web page using hypertext or hypermedia to be viewed on the World Wide Web.
Computer Science : Information Systems Design and Development Unit Web Sites - National 4 / 5 St Andrew’s High School-Revised January 2013 Slide 1 St Andrew’s.
WordPress Web. WordPress Blogging system with full content management Personal publishing system Built on PHP scripting language and MySQL relational.
Web Design Scripting and the Web. Books on Scripting.
DIY Web Development Hand Code Your Own Page (For Free!) by Bryan Brown, Indiana University Bloomington SLIS.
Simple Pages for Omeka Lauren Dzura LIS
© Cheltenham Computer Training 2001 Macromedia Dreamweaver 4 - Slide No 1 Macromedia Dreamweaver 4 Advanced Level Course.
INTRODUCTION TO FRONTPAGE. TOPICS TO BE DISCUSSED……….  Introduction Introduction  Features Features  Starting Front Page Starting Front Page  Components.
CSS Sprites. What are sprites? In the early days of video games, memory for graphics was very low. So to make things load quickly and make graphics look.
1 Chapter 2 & Chapter 4 §Browsers. 2 Terms §Software §Program §Application.
.  Entertain  Inform  Educate  Blogs  Sell  Date  Gamble  Religion.
Unit 1 – Web Concepts Instructor: Brent Presley. ASSIGNMENT Read Chapter 1 Complete lab 1 – Installing Portable Apps.
WEB DESIGN USING DREAMWEAVER. The World Wide Web –A Web site is a group of related files organized around a common topic –A Web page is a single file.
10 Adding Interactivity to a Web Site Section 10.1 Define scripting Summarize interactivity design guidelines Identify scripting languages Compare common.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and check boxes using HTML Add a pull-down.
HTML Hyper Text Markup Language A simple introduction.
15.1 Fundamentals of HTML.
Creating Webpage Using HTML
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
Introduction to web development and HTML MGMT 230 LAB.
Forms and Server Side Includes. What are Forms? Forms are used to get user input We’ve all used them before. For example, ever had to sign up for courses.
Week 1 – Beginners Content McAfee & Big Fish Games CoderDojo.
LEARNING HTML PowerPoint #1 Cyrus Saadat, Webmaster.
Intro to PHP IST2101. Review: HTML & Tags 2IST210.
Chapter 1 Getting Started With Dreamweaver. Exploring the Dreamweaver Workspace The Dreamweaver workspace is where you can find all the tools to create.
HTML HyperText Markup Language. Text Files An array of bytes stored on disk Each element of the array is a text character A text editor is a user program.
4.01B Authoring Languages and Web Authoring Software 4.01 Examine webpage development and design.
Dawn Pedersen. What is JavaScript? JavaScript is the basis for both jQuery and Spry applications JavaScript is referred to as a client-side scripting.
Spiderman ©Marvel Comics Creating Web Pages (part 1)
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 2: Introduction to IS2803 Rob Gleasure
+ Publishing Your First Post USING WORDPRESS. + A CMS (content management system) is an application that allows you to publish, edit, modify, organize,
Learning Aim C.  In this section we will look at some simple client-side scripts, browser compatibility, exporting and compressing and suitable file.
Understanding Web-Based Digital Media Production Methods, Software, and Hardware Objective
Learning Aim C.  Creating web pages involves many considerations.  In this section we will look at the different software tools you can use and how.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
IN THIS LESSON WE WILL REVIEW THE STRUCTURE OF THE INTERNET AND HOW BROWSERS ASSEMBLE WEBSITES BASED ON INSTRUCTIONS THEY RECEIVE FROM SERVERS. Internet.
Introduction. Internet Worldwide collection of computers and computer networks that link people to businesses, governmental agencies, educational institutions,
Here are some things you can do while you wait 1.Open your omeka.net site in your browser (e.g. 2.Open.
Project: Web Designer. Phase 1: The World Wide Web.
Basics Components of Web Design & Development Basics, Components, Design and Development.
JavaScript Invented 1995 Steve, Tony & Sharon. A Scripting Language (A scripting language is a lightweight programming language that supports the writing.
Client-side processing 26 Client-side processing 26.
XP Creating Web Pages with Microsoft Office
G046 – Lecture 2A Recognising Web-Technologies Mr C Johnston ICT Teacher
Section 10.1 Define scripting
Section 10.1 YOU WILL LEARN TO… Define scripting
Objective Understand web-based digital media production methods, software, and hardware. Course Weight : 10%
Presentation transcript:

 A Javascript library designed to simplify client-side scripting of HTML

Javascript is a programming language commonly used to run scripts on web browsers. Examples of stuff that Javascript does: Animation of webpage elements, such as drop-down menus that expand or fade in and out, objects that move when you click on them, etc. Interactive content, for example games, and playing audio and video Not to be confused with Java, which is another programming language that works differently (which isn’t confusing at all!)

 A Javascript library designed to simplify client-side scripting of HTML A javascript library is a collection of pre-written Javascript functions, or ‘tools’ that take the grunt work out of writing Javascript and extends its compatibility and features. My half-baked analogy: Using jQuery (javascript library) is kind of like using a cake mix to make a cake, instead of making it from scratch

 A Javascript library designed to simplify client-side scripting of HTML This means the script is doing stuff in your user’s web browser (front-end), as opposed to server-side, which is where the script is doing stuff with data in your web server (back-end). (we will be working with both today!)

 A Javascript library designed to simplify client-side scripting of HTML Using ‘scripts’ of code (like sets of instructions) written in a programming language that get interpreted and executed by another program (such as your web browser) to make something happen

 A Javascript library designed to simplify client-side scripting of HTML (I hope you’ve heard of this before) It is the language used to create web pages Stands for HyperText Markup Language Written as a series of elements that are enclosed in tags example: This is my header Ultimately, everything that appears on your web page is made from just HTML. Other languages like Javascript, CSS and PHP just create or transform the HTML.

 A Javascript library designed to simplify client-side scripting of HTML In other words….  A collection of functions written in the Javascript language that make it easy to write scripts that tell the user’s web browser how to transform your website’s HTML Or in other words….  You can use this library to easily create awesome interactive stuff for your website!

 jQuery is free and open source  It’s currently the most popular Javascript library in use on the web  Because of this, lots of people have already created lots of cool stuff  And lots of it’s available to use off the shelf, complete with instructions on how to ‘plug it in’ on your website, some of it for free!

 Image galleries and sliders

 Image zoom/magnifier tools

 Pop-up notes

 Interactive timelines

 Graph and chart generators

 jqueryrain.com is a great resource for finding free or low-cost jQuery plugins jqueryrain.com

 Wouldn’t it be awesome to use this stuff on your Digital Humanities Omeka site?  Is such a thing even possible?

Omeka is a little different from a simple website, and in order to make these jQuery plugins work with your content in Omeka, we will have to some things a bit differently…

 The back-end of a very simple webpage can consist of just a few lines of HTML code and a few data files (such as images) located on a web server. All the data files can be linked to directly in the HTML files.  This means the HTML code to display this content never has to change. The code and content are both ‘static’  For example, if you only have one logo image, and only need to display in one spot, this is the HTML code you would use:  But your Omeka site has lots of content to show in lots of different places, and this content is getting changed and added to pretty often. It would be impossible for HTML code written like this to keep up!  Your HTML code needs to be created or altered automatically as things change. This means it’s ‘dynamic’

 Omeka is more than just a website to share your digital collection (client-side). Because it has to manage all this changing content, it also creates and runs a database of all your data and associated metadata (server-side)  This makes Omeka a Content Management System. A CMS is a computer application that allows you to organize, edit, maintain and publish content from a central interface.  The programming language used to run Omeka on the server-side is called PHP. Instead of using HTML files, Omeka uses PHP scripts to pull in the content from the database and build HTML code on request

 You will need to be able to access and edit your omeka theme files on your website’s server (without this, you can’t do anything!)  You also need to be able to ‘look under the hood’ to see what HTML is being generated and what your browser is doing using the ‘Inspect Element’ feature. To do this, go to your site in a web browser, right click on the page and choose ‘inspect element’ from the drop-down menu.  And of course, we need to find a jQuery plugin we like and download the files (usually these will consist of some javascript files, a CSS file for styling, and possibly some icons)

 Before you start making any changes to your theme, it’s a very good idea to save a copy of the entire thing and back it up somewhere, even offline.  If you have the means:  You might also want to track the changes you make to your files using a Git repository.  If you have access to a development server, it’s a good idea to mirror your Omeka site there and test the theme changes on that site before going ‘live’

 The instructions for the plugin should tell you what version of jQuery it needs. Usually any later version will work fine.  Omeka version 2.0 automatically links to at least jQuery version 1.9.1, Version 2.1 links to jQuery So you don’t need to add the link to jQuery  You can check which version of jQuery your Omeka site is running by opening up ‘Inspect Element’ on your browser, and looking in the of the html for the page.

Omeka files are organized in folders in the following way on your server:  Omeka › www  data  admin  application  files  install  plugins  themes

 You need to add the plugin files into the appropriate places in your Omeka theme  Omeka theme files are organized in the following way: › Your Theme  common  css  images  items  Javascripts  Move your jQuery plugin files into the appropriate folders in your theme. CSS file(s) needs to go in the CSS folder, Javascript file(s) needs to go in the javascripts folder, any image icons need to go in the images folder

 Now you need to ‘tell’ your theme that these new files are there, and that it needs to get them loaded up for web browsers to use. You do this by editing header.php in the ‘common’ folder.  Open header.php and find the stylesheets and javascripts sections, which should look something like this:

 Add your CSS file(s) queue_css_file('pluginstyle'); Immediately above echo head_css();  Add your js file(s) queue_js_file('plugin'); Immediately above echo head_js();

 Next, we need to add the jQuery function for your plugin to the footer.php file. This script actually tells the plugin to run, and has to be read by your browser after all of the other necessary files.  The best way to do this is in Omeka is to save this in its own javascript file and link to it in footer.php  Open a new file in notepad or any basic text editor program. Copy/paste the function provided by the jQuery plugin’s instructions. Follow the plugin’s instructions to edit this script with the various plugin options provided. Save the file something like ‘pluginscript.js’ and then copy this file into your theme’s javascripts folder.

 Both Omeka code and jQuery use the symbol $ to do different things, and this can cause your plugin to not work.  To get around this, simply change all the $ in your plugin script to ‘jQuery’  Example: $('.zoom-file').click(function(){ $('.zoomContainer').remove(); }); Becomes: jQuery('.zoom-file').click(function(){ jQuery('.zoomContainer').remove(); });

 Now open footer.php  Between the and add: <script type="text/javascript“ src=" yourtheme/javascripts/pluginscript.js">

 Now that you’ve added the plugin files to your theme and set them up to load, you’ve got to install the HTML markup for the plugin where you want it to appear in your site.  This could be on your home page (index.php) a custom page you’ve added with the SimplePages Omeka plugin, or on your items show page (items/show.php)  Open the appropriate file, and find the section of the file that corresponds to the area of the page where you want your plugin to be. Use the ‘inspect element’ tool on your browser and compare with the php file for that page to find the spot.

 Follow the jQuery plugin instructions for how the HTML markup needs to be arranged

Example: " alt=" " data-description=" " />

 This depends on what Omeka content you want to pull in, and how it needs to be linked in your plugin.  You can pull in files and information from any of Omeka’s metadata fields using these Omeka PHP functions.  omeka.readthedocs.org is the place to find out how to write these functions omeka.readthedocs.org

 If you need to add image URLs:  If you need to add the text from a particular metadata field:

 If you need your plugin to repeat this process for multiple records (like multiple files in an image slider), you need to surround this markup with a ‘foreach’ statement and ‘loop’ through all the records you want to get

 Let’s take a look at the same plugin markup with the PHP added in:

 After you’ve completed these steps, you need to make sure all your changed files are saved, refresh your webpage and test it out.  Chances are it will not be displaying right, or working at all.  You’ve got a lot of troubleshooting ahead!

 Did you type everything correctly? › Check your files and make sure all the brackets and statements are ‘closed.’ If something is really wrong, the webpage will show an error and tell you the line number of your file

 jQuery Conflicts › There might be more conflicts with $ in your js files. Try changing the $ for ‘jQuery’ in your other plugin files › Check the ‘Script’ section of your inspect element tool to see if your scripts are loading properly

 Fix your CSS › You might have to add some style such as dimensions and positioning of the plugin’s HTML containers. Use ‘Inspect Element’ to find out where things are going wrong › Example : .rg-image{ position: relative; text-align:center; }}

 codeacademy.com codeacademy.com  omeka.org/forums omeka.org/forums  stackoverflow.com stackoverflow.com  Desperate Googling  Contact me!

 Contact me: › Adrienne Serra › Technical Archivist › Special Collections, Virginia Tech › › Our Omeka site: › Virginia Tech Special Collections Online Virginia Tech Special Collections Online