From 928c55cbc5f3f162c10077f46d75d0bc0b1cbe53 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Thu, 21 Aug 2008 12:46:58 +0000 Subject: further whitespace fixes --- user_guide/helpers/form_helper.html | 12 ++++---- user_guide/helpers/html_helper.html | 56 +++++++++++++++++------------------ user_guide/helpers/string_helper.html | 4 +-- 3 files changed, 36 insertions(+), 36 deletions(-) (limited to 'user_guide/helpers') diff --git a/user_guide/helpers/form_helper.html b/user_guide/helpers/form_helper.html index 83b97ab15..839f7251c 100644 --- a/user_guide/helpers/form_helper.html +++ b/user_guide/helpers/form_helper.html @@ -258,7 +258,7 @@ echo form_fieldset_close(); </fieldset>

Similar to other functions, you can submit an associative array in the second parameter if you prefer to set additional attributes.

$attributes = array('id' => 'address_info', 'class' => 'address_info');
- echo form_fieldset('Address Information', $attributes);
+ echo form_fieldset('Address Information', $attributes);
echo "<p>fieldset content here</p>\n";
echo form_fieldset_close();

@@ -269,7 +269,7 @@ echo form_fieldset_close();
</fieldset>

form_fieldset_close()

Produces a closing </fieldset> tag. The only advantage to using this function is it permits you to pass data to it - which will be added below the tag. For example:

+ which will be added below the tag. For example:

$string = "</div></div>";

echo fieldset_close($string);
@@ -321,7 +321,7 @@ fourth parameter:


<input type="submit" name="mysubmit" value="Submit Post!" />

Similar to other functions, you can submit an associative array in the first parameter if you prefer to set your own attributes. - The third parameter lets you add extra data to your form, like JavaScript.

+ The third parameter lets you add extra data to your form, like JavaScript.

form_label()

Lets you generate a <label>. Simple example:

echo form_label('What is your Name', 'username');
@@ -329,13 +329,13 @@ fourth parameter:

// Would produce:
<label for="username">What is your Name</label>
-

Similar to other functions, you can submit an associative array in the third parameter if you prefer to set additional attributes.

+

Similar to other functions, you can submit an associative array in the third parameter if you prefer to set additional attributes.

$attributes = array(
    'class' => 'mycustomclass',
    'style' => 'color: #000;',
);
- echo form_label('What is your Name', 'username', $attributes);
-
+ echo form_label('What is your Name', 'username', $attributes);
+
// Would produce:
<label for="username" class="mycustomclass" style="color: #000;">What is your Name</label>

form_reset()

diff --git a/user_guide/helpers/html_helper.html b/user_guide/helpers/html_helper.html index fcbcccdf0..62898403d 100644 --- a/user_guide/helpers/html_helper.html +++ b/user_guide/helpers/html_helper.html @@ -80,7 +80,7 @@ second the size of the heading. Example:

The above would produce: <h3>Welcome!</h3>

img()

Lets you create HTML <img /> tags. The first parameter contains the image source. There is data, the - second the size of the heading. Example:

+ second the size of the heading. Example:

echo img('images/picture.jpg');
// gives <img src="http://site.com/images/picture.jpg" />

There is an optional second parameter that is a TRUE/FALSE value that specifics if the src should have the page specified by $config['index_page'] added to the address it creates. Presumably, this would be if you were using a media controller.

@@ -88,17 +88,17 @@ second the size of the heading. Example:

// gives <img src="http://site.com/index.php/images/picture.jpg" />

Additionally, an associative array can be passed to the img() function for complete control over all attributes and values.

$image_properties = array(
-           'src' => 'images/picture.jpg',
-           'alt' => 'Me, demonstrating how to eat 4 slices of pizza at one time',
-           'class' => 'post_images',
-           'width' => '200',
-           'height' => '200',
-           'title' => 'That was quite a night',
-           'rel' => 'lightbox',
- );
-
- img($image_properties);
- // <img src="http://site.com/index.php/images/picture.jpg" alt="Me, demonstrating how to eat 4 slices of pizza at one time" class="post_images" width="200" height="200" title="That was quite a night" rel="lightbox" />

+           'src' => 'images/picture.jpg',
+           'alt' => 'Me, demonstrating how to eat 4 slices of pizza at one time',
+           'class' => 'post_images',
+           'width' => '200',
+           'height' => '200',
+           'title' => 'That was quite a night',
+           'rel' => 'lightbox',
+ );
+
+ img($image_properties);
+ // <img src="http://site.com/index.php/images/picture.jpg" alt="Me, demonstrating how to eat 4 slices of pizza at one time" class="post_images" width="200" height="200" title="That was quite a night" rel="lightbox" />

link_tag()

Lets you create HTML <link /> tags. This is useful for stylesheet links, as well as other links. The parameters are href, with optional rel, type, title, media and index_page. index_page is a TRUE/FALSE value that specifics if the href should have the page specified by $config['index_page'] added to the address it creates. echo link_tag('css/mystyles.css');
@@ -106,24 +106,24 @@ echo link_tag('css/mystyles.css');

Further examples:

- echo link_tag('favicon.ico', 'shortcut icon', 'image/ico');
- // <link href="http://site.com/favicon.ico" rel="shortcut icon" type="image/ico" /> -
-
- echo link('feed', 'alternate', 'application/rss+xml', 'My RSS Feed');
- // <link href="http://site.com/feed" rel="alternate" type="application/rss+xml" title="My RSS Feed" />
+ echo link_tag('favicon.ico', 'shortcut icon', 'image/ico');
+ // <link href="http://site.com/favicon.ico" rel="shortcut icon" type="image/ico" /> +
+
+ echo link('feed', 'alternate', 'application/rss+xml', 'My RSS Feed');
+ // <link href="http://site.com/feed" rel="alternate" type="application/rss+xml" title="My RSS Feed" />

Additionally, an associative array can be passed to the link() function for complete control over all attributes and values.

- $link = array(
-           'href' => 'css/printer.css',
-           'rel' => 'stylesheet',
-           'type' => 'text/css',
-           'media' => 'print'
- );
-
- echo link_tag($link);
- // <link href="http://site.com/css/printer.css" rel="stylesheet" type="text/css" media="print" />

- + $link = array(
+           'href' => 'css/printer.css',
+           'rel' => 'stylesheet',
+           'type' => 'text/css',
+           'media' => 'print'
+ );
+
+ echo link_tag($link);
+ // <link href="http://site.com/css/printer.css" rel="stylesheet" type="text/css" media="print" />

+

nbs()

Generates non-breaking spaces (&nbsp;) based on the number you submit. Example:

echo nbs(3); diff --git a/user_guide/helpers/string_helper.html b/user_guide/helpers/string_helper.html index 025a4329a..24a0a661e 100644 --- a/user_guide/helpers/string_helper.html +++ b/user_guide/helpers/string_helper.html @@ -122,8 +122,8 @@ echo repeater($string, 30); echo reduce_double_slashes($string); // results in "http://example.com/index.php"

trim_slashes()

Removes any leading/trailing slashes from a string. Example:
-
- $string = "/this/that/theother/";
+
+ $string = "/this/that/theother/";
echo trim_slashes($string); // results in this/that/theother

-- cgit v1.2.3-24-g4f1b