Classes | |
| class | Pluf_Template |
Functions | |
| Pluf_Template_unsafe ($string) | |
| Pluf_Template_htmlspecialchars ($string) | |
| Pluf_Template_dateFormat ($date, $format='%b%e,%Y') | |
| Pluf_Template_timeFormat ($time, $format='Y-m-d H:i:s') | |
| Pluf_Template_safeEcho ($mixed, $echo=true) | |
| Pluf_Template_nl2br ($mixed) | |
| Pluf_Template_varExport ($mixed) | |
| Pluf_Template_dateAgo ($date, $f='withal') | |
| Pluf_Template_timeAgo ($date, $f="withal") | |
| Pluf_Template_safeEmail ($email) | |
| Pluf_Template_dateAgo | ( | $ | date, | |
| $ | f = 'withal' | |||
| ) |
Display the date in a "6 days, 23 hours ago" style.
| Pluf_Template_dateFormat | ( | $ | date, | |
| $ | format = '%b %e, |
|||
| %Y' | ||||
| ) |
Modifier plugin: Convert the date from GMT to local and format it.
This is used as all the datetime are stored in GMT in the database.
| string | $date input date string considered GMT | |
| string | $format strftime format for output ('b e, Y') |
| Pluf_Template_htmlspecialchars | ( | $ | string | ) |
Special htmlspecialchars that can handle the objects.
| string | String proceeded by htmlspecialchars |
| Pluf_Template_nl2br | ( | $ | mixed | ) |
New line to
returning a safe string.
| mixed | Input |
| Pluf_Template_safeEcho | ( | $ | mixed, | |
| $ | echo = true | |||
| ) |
Special echo function that checks if the string to output is safe or not, if not it is escaped.
| mixed | Input |
| Pluf_Template_safeEmail | ( | $ | ) |
Hex encode an email excluding the "mailto:".
| Pluf_Template_timeAgo | ( | $ | date, | |
| $ | f = "withal" | |||
| ) |
Display the time in a "6 days, 23 hours ago" style.
| Pluf_Template_timeFormat | ( | $ | time, | |
| $ | format = 'Y-m-d H:i:s' | |||
| ) |
Modifier plugin: Format a unix time.
Warning: date format is directly to be used, not consideration of GMT or local time.
| int | $time input date string considered GMT | |
| string | $format strftime format for output ('Y-m-d H:i:s') |
| Pluf_Template_unsafe | ( | $ | string | ) |
Set a string to be safe for display.
| string | String to be safe for display. |
| Pluf_Template_varExport | ( | $ | mixed | ) |
Var export returning a safe string.
| mixed | Input |