Functions
Text Handeling
hys_moreless_
/*-------------------------------------------------------------
Name: hys_moreless
Purpose: chops string into two sections at pos. wraps
in HTML for read more/less.. links
Receive: $content
Return: $Text
-------------------------------------------------------------*/
hys_validate_email
/*-------------------------------------------------------------
Name: hys_validate_email
Purpose: send true/false for email addys
Receive: $email, ie: email@domain.com
Return: true/false
-------------------------------------------------------------*/
nostyle
/*-------------------------------------------------------------
Name: nostyle
Purpose: chops at designated int
Receive: $Text, $int (cut off at), $cut_off_string (ie "...")
Return: $Text
-------------------------------------------------------------*/
chckchckbox
/*-------------------------------------------------------------
Name: chckchckbox
Purpose: returns CHECKED statment for input tag if = 1
Receive: $value
Return: - none -
-------------------------------------------------------------*/
hys_output_filter
/*-------------------------------------------------------------
Name: hys_output_filter
Purpose: filter text content for heyyou
Receive: $content
Return: $content
-------------------------------------------------------------*/
hys_chopstring
/*-------------------------------------------------------------
Name: hys_chopstring
Purpose: shorten a string by removing the middle section,
leave x characters on either side
Receive: $string, double the length to leave on each side
Return: $string, shortened,
-------------------------------------------------------------*/
hys_url_friendly
/*-------------------------------------------------------------
Name: hys_url_friendly
Purpose: removes all non alphanumeric characters from string
replaced spaces with underscores
Receive: $string (string), $length limit
Return: $result, alphanumeric string
-------------------------------------------------------------*/
heyyou output
hys_lines
/*-------------------------------------------------------------
Name: hys_lines
Purpose: call lines
Receive: $prmry_or_scndry (1= prim, 2= secnd)
Return: $hys['settings']['line'.$prmry_or_scndry]
-------------------------------------------------------------*/
hys_photo_gallery
/*-------------------------------------------------------------
Name: hys_photo_gallery
Purpose: Gallery attachment builder for PAGE posts
Receive: id of gallery parent
Return: string of attachments
-------------------------------------------------------------*/
hys_output
/*-------------------------------------------------------------
Name: hys_output
Purpose: Output of config and data onto page
Receive: $heyyou_posts (array, ie: from get_heyyou), $parent
Return: structured & formatted string of heyyou posts
-------------------------------------------------------------*/
hys_attach_attachments
/*-------------------------------------------------------------
Name: hys_attach_attachments
Purpose: Gallery attachment builder for HEYYOU posts
Receive: id of gallery parent
Return: array(string of attach gallerized, lightbox links
for hidden gallery, & first link to hidden gallery
lightbox)
-------------------------------------------------------------*/
hys_start
/*-------------------------------------------------------------
Name: hys_start
Purpose: adds under construction banner if on and function
Receive: - none -
Return: - none -
-------------------------------------------------------------*/
hys_secondary_blurb
/*-------------------------------------------------------------
Name: hys_secondary_blurb
Purpose: return post_content of secondary blurb for post
Receive: optional id
Return: string
-------------------------------------------------------------*/
get_heyyou
/*-------------------------------------------------------------
Name: get_heyyou
Purpose: return heyyou posts in array for id
Receive: page_id: id of page: defaults current page id
category: if instead of entire array, only 1 cat
Return: $return, array of cats id with array of heyyou
post ids
-------------------------------------------------------------*/
Content
hys_twitter_feed
/*-------------------------------------------------------------
Name: hys_twitter_feed
Purpose: return list of twitter posts from RSS feed
Receive: id (int), twiter id
count (int), number of posts to show
regresh_rate, seconds to check for updates to feed
doesn't get block from too many requests
Return: string with tweets
-------------------------------------------------------------*/
Useful Functions
hys_listmedia
/*-------------------------------------------------------------
Name: hys_listmedia
Purpose: lists all contents of the media library and divids
into categories if exsist
Receive: preselect file (int ID),
# of characters to show for filename
Return: a string of < options > for between < select >'s
-------------------------------------------------------------*/
object_2_array
/*-------------------------------------------------------------
Name: object_2_array
Purpose: turn object into an array
Receive: object
Return: array
-------------------------------------------------------------*/
hys_status
/*-------------------------------------------------------------
Name: hys_status
Purpose: return boolen weather heyyou is enabled for a page
THIS FUNCTION IS NOT TESTED //TODO: test function
Receive: page ID (int)
Return: boolean
-------------------------------------------------------------*/
hys_random
/*-------------------------------------------------------------
Name: hys_random
Purpose: random string
Receive: length of string
Return: $string
-------------------------------------------------------------*/
hys_urlfriendly
/*-------------------------------------------------------------
Name: hys_url_friendly
Purpose: removes all non alphanumeric characters from string
replaced spaces with underscores
Receive: $string (string), $length limit
Return: $result, alphanumeric string
-------------------------------------------------------------*/
chckselect
/*-------------------------------------------------------------
Name: chckchckbox
Purpose: returns CHECKED statment for input tag if = 1
Receive: $value
Return: - none -
-------------------------------------------------------------*/
hys_mobile_link
/*-------------------------------------------------------------
Name: mobile_link_f
Purpose: adds view full/mobile based on curent mobile status
Receive: $phrase (array(full size, mobile size))
Return: boolen
-------------------------------------------------------------*/
hys_space
/*-------------------------------------------------------------
Name: hys_space
Purpose: echo/returnwith some height
Receive: $size = 10,$echo = 1
Return: - none -
-------------------------------------------------------------*/
hys_grant
/*-------------------------------------------------------------
Name: hys_grant
Purpose: allow indiviuals with correct URL access to view site
(used for previewing under-dev sites)
Receive: $splashURL
Return: - none -
-------------------------------------------------------------*/
hys_return_url
/*-------------------------------------------------------------
Name: hys_return_url
Purpose: returns full URL
Receive: - none -
Return: string of current URL as seen in address bar
-------------------------------------------------------------*/
Return
hys_current_user_role
/*-------------------------------------------------------------
Name: hys_current_user_role
Purpose: finds and returns role
Receive: - none -
Return: stringe
-------------------------------------------------------------*/
hys_return_id
/*-------------------------------------------------------------
Name: hys_return_id
Purpose: finds and returns ID
Receive: - none -
Return: int()$id
-------------------------------------------------------------*/
hys_return_meta
/*-------------------------------------------------------------
Name: hys_return_meta
Purpose: Get meta data for a hys post.
Receive: ID (int)
Return: array of meta values
-------------------------------------------------------------*/
Admin Functions
hys_post_form
/*-------------------------------------------------------------
Name: hys_post_form
Purpose: Create the form for a hys post for new or editing
Receive: (int) ID
Return: html form
-------------------------------------------------------------*/