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

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]

void access_denied( )

access_denied

throws an error if they try to do something that they aren't allowed to




[ Top ]



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

   $include  
[ Top ]



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

   $array  
[ Top ]



get_location [line 338]

void get_location( )

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)




[ Top ]



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

   $name  
   $title  
   $id  
[ Top ]



good_email [line 449]

void good_email( $email)

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

   $email  
[ Top ]



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  
[ Top ]



ngettext [line 89]

void ngettext( $string)

ngettext

checks for ngettext and defines it if it doesn't exist




Parameters

   $string  
[ Top ]



return_referer [line 114]

void return_referer( )

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




[ Top ]



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  
[ Top ]



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




[ Top ]



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  
[ Top ]



show_box_bottom [line 694]

void show_box_bottom( )

show_box_bottom

This function requires the bottom part of the box it does not take any arguments




[ Top ]



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

   $title  
   $class  
[ Top ]



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

   $name  
   $catalog_id  
   $style  
[ Top ]



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  
[ Top ]



show_footer [line 208]

void show_footer( )

show_footer

shows the footer of the page




[ Top ]



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

   $genre_id  
[ Top ]



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

   $genres  
   $view  
[ Top ]



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  
[ Top ]



show_header [line 198]

void show_header( )

show_header

This shows the header.inc.php, it may do something more in the future




[ Top ]



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

   $name  
   $selected  
   $style  
[ Top ]



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

   $preferences  
[ Top ]



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

   $name  
   $selected  
   $style  
[ Top ]



toggle_visible [line 927]

void toggle_visible( $element)

toggle_visible

this is identicla to the javascript command that it actually calls




Parameters

   $element  
[ Top ]



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:

author:  Nedko Arnaudov


Parameters

   $text  
   $max  
[ Top ]



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

   $array  
   $callback  
   $type  
[ Top ]



xml_get_footer [line 887]

void xml_get_footer( $type)

xml_get_footer

This takes the type and returns the correct xml footer




Parameters

   $type  
[ Top ]



xml_get_header [line 849]

void xml_get_header( $type)

xml_get_header

This takes the type and returns the correct xml header




Parameters

   $type  
[ Top ]



_ [line 78]

void _( $string)

_

checks to see if the alias _ is defined if it isn't it defines it as a simple return




Parameters

   $string  
[ Top ]



Documentation generated on Thu, 12 Feb 2009 08:00:11 +0900 by phpDocumentor 1.4.2