Procedural File: ui.lib.php
Source Location: /lib/ui.lib.php
Page Details:
UI Function Library
This contains functions that are generic, and display information things like a confirmation box, etc and so forth
access_denied [line 99]
access_denied throws an error if they try to do something that they aren't allowed to
ajax_include [line 912]
void ajax_include(
$include)
|
|
ajax_include This does an ob_start, getcontents, clean on the specified require, only works if you don't need to pass data in
Parameters
flip_class [line 57]
void flip_class(
[ $array = 0])
|
|
flip_class takes an array of 2 class names and flips them back and forth and then echo's out [0]
Parameters
get_location [line 338]
get_location This function gets the information about said persons currently location this is used for A) Sidebar highlighting & submenu showing and B) Titlebar information it returns an array of information about what they are currently doing Possible array elements ['title'] Text name for the page ['page'] actual page name ['section'] name of the section we are in, admin, browse etc (submenu control)
get_user_icon [line 705]
void get_user_icon(
$name, [ $title = ''], [ $id = ''])
|
|
get_user_icon this function takes a name and a returns either a text representation or an <img /> tag
Parameters
good_email [line 449]
good_email Don't get me started... I'm sure the indenting is still wrong on this it shouldn't be named this, it should be documented, yea this needs some serious MOJO work
Parameters
img_resize [line 223]
void img_resize(
$image, $size, $type, $album_id)
|
|
img_resize this automaticly resizes the image for thumbnail viewing only works on gif/jpg/png this function also checks to make sure php-gd is enabled
Parameters
|
$image |
|
|
$size |
|
|
$type |
|
|
$album_id |
|
ngettext [line 89]
ngettext checks for ngettext and defines it if it doesn't exist
Parameters
return_referer [line 114]
return_referer returns the script part of the referer address passed by the web browser this is not %100 accurate. Also because this is not passed by us we need to clean it up, take the filename then check for a /admin/ and dump the rest
show_album_select [line 483]
void show_album_select(
[ $name = 'album'], [ $album_id = 0], [ $allow_add = 0], [ $song_id = 0])
|
|
show_album_select This displays a select of every album that we've got in Ampache, (it can be hella long) it's used by the Edit page, it takes a $name and a $album_id
Parameters
|
$name |
|
|
$album_id |
|
|
$allow_add |
|
|
$song_id |
|
show_alphabet_list [line 139]
void show_alphabet_list(
)
|
|
show_alphabet_list shows the A-Z,0-9 lists for albums and artist page It takes a selected and an action
show_artist_select [line 522]
void show_artist_select(
[ $name = 'artist'], [ $artist_id = 0], [ $allow_add = 0], [ $song_id = 0])
|
|
show_artist_select This is the same as the album select except it's *gasp* for artists how inventive!
Parameters
|
$name |
|
|
$artist_id |
|
|
$allow_add |
|
|
$song_id |
|
show_box_bottom [line 694]
show_box_bottom This function requires the bottom part of the box it does not take any arguments
show_box_top [line 683]
void show_box_top(
[ $title = ''], [ $class = ''])
|
|
show_box_top This function requires the top part of the box it takes title as an optional argument
Parameters
show_catalog_select [line 603]
void show_catalog_select(
[ $name = 'catalog'], [ $catalog_id = 0], [ $style = ''])
|
|
show_catalog_select Yet another one of these buggers. this shows a drop down of all of your catalogs
Parameters
show_confirmation [line 38]
void show_confirmation(
$title, $text, $next_url, [ $cancel = 0], [ $form_name = 'confirmation'])
|
|
show_confirmation shows a confirmation of an action $next_url Where to go next $title The Title of the message $text The details of the message $cancel T/F show a cancel button that uses return_referrer()
Parameters
|
$title |
|
|
$text |
|
|
$next_url |
|
|
$cancel |
|
|
$form_name |
|
show_footer [line 208]
show_footer shows the footer of the page
show_genre [line 319]
void show_genre(
$genre_id)
|
|
show_genre this shows a single genre item which is basicly just a link to the albums/artists/songs of said genre
Parameters
show_genres [line 309]
void show_genres(
$genres, $view)
|
|
show_genres this shows the 'many' genre form, it takes an array of genre objects and the view object
Parameters
show_genre_select [line 561]
void show_genre_select(
[ $name = 'genre'], [ $genre_id = 1], [ $size = ''], [ $allow_add = 0], [ $song_id = 0])
|
|
show_genre_select It's amazing we have three of these funtions now, this one shows a select of genres and take s name and a selected genre... Woot!
Parameters
|
$name |
|
|
$genre_id |
|
|
$size |
|
|
$allow_add |
|
|
$song_id |
|
show_header [line 198]
show_header This shows the header.inc.php, it may do something more in the future
show_playlist_select [line 657]
void show_playlist_select(
$name, [ $selected = ''], [ $style = ''])
|
|
show_playlist_select This one is for users! shows a select/option statement so you can pick a user to blame
Parameters
show_preference_box [line 437]
void show_preference_box(
$preferences)
|
|
show_preference_box This shows the preference box for the preferences pages it takes a chunck of the crazy preference array and then displays it out it does not contain the <form> </form> tags
Parameters
show_user_select [line 629]
void show_user_select(
$name, [ $selected = ''], [ $style = ''])
|
|
show_user_select This one is for users! shows a select/option statement so you can pick a user to blame
Parameters
toggle_visible [line 927]
void toggle_visible(
$element)
|
|
toggle_visible this is identicla to the javascript command that it actually calls
Parameters
truncate_with_ellipsis [line 166]
void truncate_with_ellipsis(
$text, [ $max = ''])
|
|
truncate_with_ellipsis Correct Spelling function that truncates text to a specific lenght and appends three dots, or an ellipsis to the end
Tags:
Parameters
xml_from_array [line 772]
void xml_from_array(
$array, [ $callback = 0], [ $type = ''])
|
|
xml_from_array This takes a one dimensional array and creates a XML document form it for use primarly by the ajax mojo
Parameters
xml_get_footer [line 887]
void xml_get_footer(
$type)
|
|
xml_get_footer This takes the type and returns the correct xml footer
Parameters
xml_get_header [line 849]
void xml_get_header(
$type)
|
|
xml_get_header This takes the type and returns the correct xml header
Parameters
_ [line 78]
_ checks to see if the alias _ is defined if it isn't it defines it as a simple return
Parameters
|