PHP And Javascript Libraries

0

No comments posted yet

Comments

Slide 1

JavaScript Libraries JavaScript Makes Things Sexy

Slide 2

Overview Objective Learn the basics of adding JavaScript and CSS in ProdigyView. Requirements Understanding of the DEFINES Estimated Time 10 Minutes

Slide 3

Follow Along With Code Example Download a copy of the example code at www.prodigyview.com/source. Install the system in an environment you feel comfortable testing in. Proceed to examples/system/Libraries_Javascript.php

Slide 4

Separation of Libraries ProdigyView natively support 5 different file types that can be added to PVLibraries. 1 of them is CSS, and the others are variations of JavaScript and JavaScript Frameworks.

Slide 5

Queuing Libraries Add JavaScript files Add JQuery Files Add Prototype Files Add Mootools Files Add CSS Files

Slide 6

Queued Scripts Queuing a script does not actually add the script into the code, but creates a reference to that script. It is up to the developer to tell where that script exist. An easy way of placing the scripts is using the defines discussed in an earlier tutorial.

Slide 7

Adding Open Script Unlike the other files that pertain to a certain type, open script is any type of content(JavaScript, meta tags, properties, etc). How you add your content to open script is exactly how it will be outputted later. 1. Explicitly write the full script 2. Add the script to the open script queue

Slide 8

Javascript Libraries The first library we are going to pull is the regular JavaScript files added. Technically any kind of JavaScript file can be queued and pulled, but any files queued to the JavaScript queue should be stored in the same location as the PV_JAVASCRIPT define. 1. Pull the queue and return an array 2. Use the PV_JAVASCRIPT to set the location of your script

Slide 9

JQuery Libraries Similar to how we retrieved the JavaScript libraries, we can also get the queued JQuery files. The JQuery define, PV_JQUERY, should be used in this instance as the location where the file exist.

Slide 10

Prototype Libraries Our next files to retrieve are the libraries specific to prototype. Prototype libraries used the PV_PROTOTYPE define for the location where the script exist.

Slide 11

Mootools Libraries Our last natively supported JavaScript library files is mootools. The mootools files should correspond with the PV_MOOTOOLS define.

Slide 12

CSS Files The css files that were originally added to PVLibraries can be retrieved at anytime as well. The PV_CSS defines sets their location.

Slide 13

Retrieving Open Script Open scripting, being that it is any information that you want to pass the header, does not have a set location nor needs to be iterated through. It simply comes back as a string of text that needs to be printed out.

Slide 14

Output If you ran the example as a script, your output should look like below.

Slide 15

Heads Up! The real importance of learning how to queue libraries is because these libraries are tightly integrated with the template manager in ProdigyView. In the tutorials on the templating system, you will learn how to pull these libraries directly into your html and have them be formatted.

Slide 16

API Reference For a better understanding of the libraries, visit the api by clicking on the link below. PVLibraries www.prodigyview.com More Tutorials For more tutorials, please visit: http://www.prodigyview.com/tutorials

Summary: Learn how added an retrieve JavaScript libraries and CSS from PVLibraries in Prodigyview..

Tags: javascript jquery mootools php prodigyview prototype

URL: