Changeset 496 for trunk/modules/user_guide
- Timestamp:
- 09/04/2007 01:43:13 PM (15 months ago)
- Location:
- trunk/modules/user_guide/views/user_guide/en/helpers
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/user_guide/views/user_guide/en/helpers/file.php
r447 r496 1 Article status [ Stub] requires [Writing] Describe file helper class and usage1 Article status [First Draft] requires [Editing] Add parameter descriptions 2 2 # File Helper 3 This is a stub (please write me) 3 Provides methods for splitting and joining FILES. 4 5 ### Split a file into segments. 6 The **file::split()** method accepts multiple parameters. Only the input **filename** is required. 7 Returns the number of file segments created. 8 <code> 9 $segments = file::split($filename, $output_directory = FALSE, $piece_size = 10); 10 </code> 11 12 ### Join segments of a split file. 13 The **file::join()** method accepts multiple parameters. Only the input segment **filename** is required. 14 Returns the number of file segments joined. 15 <code> 16 $segments = file::split($filename, $output_file = FALSE); 17 </code> -
trunk/modules/user_guide/views/user_guide/en/helpers/html.php
r447 r496 1 Article status [ Stub] requires [Writing] Describe html helper class and usage1 Article status [First Draft] requires [Editing] Complete and Describe parameters 2 2 # HTML Helper 3 This is a stub (please write me) 3 Provides methods for html generation. 4 5 ### Convert special characters to HTML entities 6 The **html::specialchars()** method accepts multiple parameters. Only the input **string** is required. 7 Converts special characters to HTML entities using a UFT-8 character set. 8 9 <code> 10 $encoded_string = html::specialchars($string, $double_encode = TRUE); 11 </code> 12 13 ### Generate an HTML anchor link 14 The **html::anchor()** method accepts multiple parameters. Only the url segment(s) are required. 15 16 A standard HTML anchor link is generated. If you want to generate a link that is internal to your website, 17 pass only the url segments to the function, and the anchor is automatically constructed from the site url 18 defined in <file>config</file> 19 20 <code> 21 echo html::anchor('pub/articles/7', 'Articles', array('title' => 'Fuel price increase!')); 22 </code> 23 24 Generates <code><a href="http://example.com/index.php/pub/articles/7" title="Fuel price increase!">Articles</a></code> 25 26 <?php /* $Id$ */ ?> -
trunk/modules/user_guide/views/user_guide/en/helpers/text.php
r454 r496 1 Article status [ Stub] requires [Writing] Describe text helper class and usage1 Article status [First Draft] requires [Editing] Describe parameters 2 2 # Text Helper 3 This is a stub (please write me) 3 Provides methods for working with TEXT. 4 5 ### Word Limiter 6 The **text::limit_words()** method accepts multiple parameters. Only the input **string** is required. 7 The default end character is the ellipsis. 8 <pre> 9 <code> 10 $long_description = 'The rain in Spain falls mainly in the plain'; 11 $limit = 4; 12 $end_char = '&nbsp;'; 13 14 $short_description = html::limit_words($long_description, $limit, $end_char); 15 </code> 16 </pre> 17 Generates: <pre>The rain in Spain </pre> 18 19 20 ### Character Limiter 21 The **text::limit_chars()** method accepts multiple parameters. Only the input **string** is required. 22 The default end character is the ellipsis. 23 <pre> 24 <code> 25 $long_description = 'The rain in Spain falls mainly in the plain'; 26 $limit = 4; 27 $end_char = '&nbsp;'; 28 $preserve_words = FALSE; 29 30 $short_description = html::limit_chars($long_description, $limit, $end_char, $preserve_words); 31 </code> 32 </pre> 33 Generates: <pre>The r </pre> -
trunk/modules/user_guide/views/user_guide/en/helpers/url.php
r447 r496 1 Article status [ Stub] requires [Writing] Describe url helper class and usage1 Article status [First Draft] requires [Editing] Complete and Describe parameters 2 2 # URL Helper 3 This is a stub (please write me) 3 Provides methods for working with Uniform Resource Locators 4 5 ### Base URL 6 The **url::base()** method accepts one **optional** parameter. 7 Returns the *base_url* defined in <file>config</file> 8 9 <code>echo url::base();</code> 10 11 ### Site URL 12 The **url::site()** method accepts one **mandatory** parameter. 13 Returns a url, based on the *base_url*, *index_page*, *url_suffix* defined in <file>config</file> and the url segments passed to the method. 14 15 <code>echo url::site($uri);</code> 16 17 ### Title 18 The **url::title()** method accepts multiple parameters. Only the input **title** string is mandatory. 19 Returns a properly formatted title, for use in a URI. 20 21 <pre> 22 <code> 23 $input_title = " _Eclectic title's entered by crazed users- ?> "; 24 25 echo url::title($input_title, $seperator = '_'); 26 </code> 27 </pre> 28 29 Generates: <pre>Eclectic_titles_entered_by_crazed_users-</pre> 30 31 ### Redirect 32 The **url::redirect()** method accepts multiple **optional** parameters. 33 Generates an HTTP Server Header (302), which will redirect the browser to a specified URL, *base_url* by default. 34 35 <code>url::redirect("www.whitehouse.gov");</code>
