Geeklog
[ class tree: Geeklog ] [ index: Geeklog ] [ all elements ]

Class: Scripts

Source Location: /system/classes/scripts.class.php

Class Overview


This class is used to set JavaScript, JavaScript Files, jQuery JavaScript Libraries and CSS files that need to be loaded either in the header of the footer.


Author(s):

  • Tom Homer

Methods



Class Details

[line 38]
This class is used to set JavaScript, JavaScript Files, jQuery JavaScript Libraries and CSS files that need to be loaded either in the header of the footer.



Tags:

author:  Tom Homer


[ Top ]


Class Methods


constructor __construct [line 67]

Scripts __construct( )

Constructor

This initializes the scriptsobject




Tags:

access:  public


[ Top ]

method getFooter [line 655]

string getFooter( )

Returns JavaScript footer code to be placed just before </body>



Tags:

access:  public


[ Top ]

method getHeader [line 499]

string getHeader( )

Returns header code (JavaScript and CSS) to include in the Head of the webpage



Tags:

access:  public


[ Top ]

method setCSS [line 480]

boolean setCSS( string $css)

Set CSS in header using style tag



Tags:

access:  public


Parameters:

string   $css   css to include in head

[ Top ]

method setCSSFile [line 425]

boolean setCSSFile( string $name, string $file, [boolean $constant = true], [array $attributes = array()], [int $priority = 100], [string $type = ''])

Set CSS file to load



Tags:

access:  public


Parameters:

string   $name   name of CSS file
string   $file   location of file relative to public_html directory. Include '/' at beginning
boolean   $constant   Future use. Set to true if file is planned to be loaded all the time (Caching/Compression)
array   $attributes   (optional) array of extra attributes
int   $priority   In what order the script should be loaded in
string   $type   Type of css file (current possible choices are theme or other)

[ Top ]

method setJavaScript [line 302]

boolean setJavaScript( string $script, [boolean $wrap = false], [boolean $footer = true])

Set JavaScript to load



Tags:

access:  public


Parameters:

string   $script   script to include in page
boolean   $wrap   set to true to place script tags around contents of $script
boolean   $footer   set to true to include script in footer, else script placed in header

[ Top ]

method setJavaScriptFile [line 330]

boolean setJavaScriptFile( string $name, string $file, [boolean $footer = true], [int $priority = 100])

Set JavaScript file to load



Tags:

access:  public


Parameters:

string   $name   name of JavaScript file
string   $file   location of file relative to public_html directory. Include '/' at beginning
boolean   $footer   set to true to include script in footer, else script placed in header
int   $priority   In what order the script should be loaded in

[ Top ]

method setJavaScriptLibrary [line 197]

boolean setJavaScriptLibrary( string $name, [boolean $footer = true])

Set JavaScript Libraries to load



Tags:

access:  public


Parameters:

string   $name   name of JavaScript library to flag for loading
boolean   $footer   set to true to include script in footer, else script placed in header

[ Top ]

method setLang [line 407]

boolean setLang( array $lang_array)

Set language variables used in JavaScript.



Tags:

access:  public


Parameters:

array   $lang_array   array of language variables

[ Top ]


Documentation generated on Sun, 02 Oct 2016 07:54:11 +0000 by phpDocumentor 1.4.3