Skip to content

Commit 89f6f1a

Browse files
committed
Fix some user guide style
1 parent 5ebf9d1 commit 89f6f1a

File tree

6 files changed

+72
-48
lines changed

6 files changed

+72
-48
lines changed

user_guide_src/source/general/helpers.rst

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ Helper Functions
33
################
44

55
Helpers, as the name suggests, help you with tasks. Each helper file is
6-
simply a collection of functions in a particular category. There are URL
7-
Helpers, that assist in creating links, there are Form Helpers that help
8-
you create form elements, Text Helpers perform various text formatting
9-
routines, Cookie Helpers set and read cookies, File Helpers help you
6+
simply a collection of functions in a particular category. There are **URL
7+
Helpers**, that assist in creating links, there are Form Helpers that help
8+
you create form elements, **Text Helpers** perform various text formatting
9+
routines, **Cookie Helpers** set and read cookies, File Helpers help you
1010
deal with files, etc.
1111

1212
Unlike most other systems in CodeIgniter, Helpers are not written in an
@@ -19,9 +19,9 @@ using a Helper is to load it. Once loaded, it becomes globally available
1919
in your :doc:`controller <../general/controllers>` and
2020
:doc:`views <../general/views>`.
2121

22-
Helpers are typically stored in your system/helpers, or
23-
application/helpers directory. CodeIgniter will look first in your
24-
application/helpers directory. If the directory does not exist or the
22+
Helpers are typically stored in your **system/helpers**, or
23+
**application/helpers directory**. CodeIgniter will look first in your
24+
**application/helpers directory**. If the directory does not exist or the
2525
specified helper is not located there CI will instead look in your
2626
global system/helpers folder.
2727

@@ -32,11 +32,11 @@ Loading a helper file is quite simple using the following function::
3232

3333
$this->load->helper('name');
3434

35-
Where name is the file name of the helper, without the .php file
35+
Where **name** is the file name of the helper, without the .php file
3636
extension or the "helper" part.
3737

38-
For example, to load the URL Helper file, which is named
39-
url_helper.php, you would do this::
38+
For example, to load the **URL Helper** file, which is named
39+
**url_helper.php**, you would do this::
4040

4141
$this->load->helper('url');
4242

@@ -63,9 +63,8 @@ Auto-loading Helpers
6363

6464
If you find that you need a particular helper globally throughout your
6565
application, you can tell CodeIgniter to auto-load it during system
66-
initialization. This is done by opening the
67-
application/config/autoload.php file and adding the helper to the
68-
autoload array.
66+
initialization. This is done by opening the **application/config/autoload.php**
67+
file and adding the helper to the autoload array.
6968

7069
Using a Helper
7170
==============
@@ -84,8 +83,8 @@ URI to the controller/function you wish to link to.
8483
"Extending" Helpers
8584
===================
8685

87-
To "extend" Helpers, create a file in your application/helpers/ folder
88-
with an identical name to the existing Helper, but prefixed with MY\_
86+
To "extend" Helpers, create a file in your **application/helpers/** folder
87+
with an identical name to the existing Helper, but prefixed with **MY\_**
8988
(this item is configurable. See below.).
9089

9190
If all you need to do is add some functionality to an existing helper -
@@ -98,8 +97,8 @@ sense. Under the hood, this gives you the ability to add to the
9897
functions a Helper provides, or to modify how the native Helper
9998
functions operate.
10099

101-
For example, to extend the native Array Helper you'll create a file
102-
named application/helpers/MY_array_helper.php, and add or override
100+
For example, to extend the native **Array Helper** you'll create a file
101+
named **application/helpers/MY_array_helper.php**, and add or override
103102
functions::
104103

105104
// any_in_array() is not in the Array Helper, so it defines a new function
@@ -130,11 +129,11 @@ Setting Your Own Prefix
130129

131130
The filename prefix for "extending" Helpers is the same used to extend
132131
libraries and Core classes. To set your own prefix, open your
133-
application/config/config.php file and look for this item::
132+
**application/config/config.php** file and look for this item::
134133

135134
$config['subclass_prefix'] = 'MY_';
136135

137-
Please note that all native CodeIgniter libraries are prefixed with CI\_
136+
Please note that all native CodeIgniter libraries are prefixed with **CI\_**
138137
so DO NOT use that as your prefix.
139138

140139
Now What?
Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,39 @@
1+
##################
2+
General
3+
##################
4+
5+
6+
- :doc:`CodeIgniter URLs <urls>`
7+
- :doc:`Controllers <controllers>`
8+
- :doc:`Reserved Names <reserved_names>`
9+
- :doc:`Views <views>`
10+
- :doc:`Models <models>`
11+
- :doc:`Helpers <helpers>`
12+
- :doc:`Using CodeIgniter Libraries <libraries>`
13+
- :doc:`Creating Your Own Libraries <creating_libraries>`
14+
- :doc:`Using CodeIgniter Drivers <drivers>`
15+
- :doc:`Creating Your Own Drivers <creating_drivers>`
16+
- :doc:`Creating Core Classes <core_classes>`
17+
- :doc:`Creating Ancillary Classes <ancillary_classes>`
18+
- :doc:`Hooks - Extending the Core <hooks>`
19+
- :doc:`Auto-loading Resources <autoloader>`
20+
- :doc:`Common Function <common_functions>`
21+
- :doc:`URI Routing <routing>`
22+
- :doc:`Error Handling <errors>`
23+
- :doc:`Caching <caching>`
24+
- :doc:`Profiling Your Application <profiling>`
25+
- :doc:`Running via the CLI <cli>`
26+
- :doc:`Managing Applications <managing_apps>`
27+
- :doc:`Handling Multiple Environments <environments>`
28+
- :doc:`Alternative PHP Syntax <alternative_php>`
29+
- :doc:`Security <security>`
30+
- :doc:`PHP Style Guide <styleguide>`
31+
- :doc:`Server Requirements <requirements>`
32+
- :doc:`Credits <credits>`
33+
134
.. toctree::
235
:glob:
3-
:hidden:
436
:titlesonly:
37+
:hidden:
538

639
*

user_guide_src/source/general/models.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ model class might look like::
6565
Anatomy of a Model
6666
==================
6767

68-
Model classes are stored in your application/models/ folder. They can be
68+
Model classes are stored in your **application/models/ folder**. They can be
6969
nested within sub-folders if you want this type of organization.
7070

7171
The basic prototype for a model class is this::
@@ -78,7 +78,7 @@ The basic prototype for a model class is this::
7878
}
7979
}
8080

81-
Where Model_name is the name of your class. Class names **must** have
81+
Where **Model_name** is the name of your class. Class names **must** have
8282
the first letter capitalized with the rest of the name lowercase. Make
8383
sure your class extends the base Model class.
8484

@@ -148,7 +148,7 @@ Auto-loading Models
148148
If you find that you need a particular model globally throughout your
149149
application, you can tell CodeIgniter to auto-load it during system
150150
initialization. This is done by opening the
151-
application/config/autoload.php file and adding the model to the
151+
**application/config/autoload.php** file and adding the model to the
152152
autoload array.
153153

154154
Connecting to your Database

user_guide_src/source/general/security.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ error reporting by setting the internal error_reporting flag to a value
3535
of 0. This disables native PHP errors from being rendered as output,
3636
which may potentially contain sensitive information.
3737

38-
Setting CodeIgniter's ENVIRONMENT constant in index.php to a value of
39-
'production' will turn off these errors. In development mode, it is
38+
Setting CodeIgniter's **ENVIRONMENT** constant in index.php to a value of
39+
**\'production\'** will turn off these errors. In development mode, it is
4040
recommended that a value of 'development' is used. More information
4141
about differentiating between environments can be found on the :doc:`Handling
4242
Environments <environments>` page.

user_guide_src/source/libraries/calendar.rst

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -86,28 +86,21 @@ The above code would start the calendar on saturday, use the "long"
8686
month heading, and the "short" day names. More information regarding
8787
preferences below.
8888

89-
+-----------------------+-----------+-----------------------------------------------+-------------------------------------------------------------------+
90-
| Preference | Default | Options | Description |
91-
+=======================+===========+===============================================+===================================================================+
92-
| **template** | None | None | A string containing your calendar template. |
93-
| | | | See the template section below. |
94-
+-----------------------+-----------+-----------------------------------------------+-------------------------------------------------------------------+
95-
| **local_time** | time() | None | A Unix timestamp corresponding to the current time. |
96-
+-----------------------+-----------+-----------------------------------------------+-------------------------------------------------------------------+
97-
| **start_day** | sunday | Any week day (sunday, monday, tuesday, etc.) | Sets the day of the week the calendar should start on. |
98-
+-----------------------+-----------+-----------------------------------------------+-------------------------------------------------------------------+
99-
| **month_type** | long | long, short | Determines what version of the month name to use in the header. |
100-
| | | | long = January, short = Jan. |
101-
+-----------------------+-----------+-----------------------------------------------+-------------------------------------------------------------------+
102-
| **day_type** | abr | long, short, abr | Determines what version of the weekday names to use in |
103-
| | | | the column headers. |
104-
| | | | long = Sunday, short = Sun, abr = Su. |
105-
+-----------------------+-----------+-----------------------------------------------+-------------------------------------------------------------------+
106-
| **show_next_prev** | FALSE | TRUE/FALSE (boolean) | Determines whether to display links allowing you to toggle |
107-
| | | | to next/previous months. See information on this feature below. |
108-
+-----------------------+-----------+-----------------------------------------------+-------------------------------------------------------------------+
109-
| **next_prev_url** | None | A URL | Sets the basepath used in the next/previous calendar links. |
110-
+-----------------------+-----------+-----------------------------------------------+-------------------------------------------------------------------+
89+
====================== =========== =============================================== ===================================================================
90+
Preference Default Options Description
91+
====================== =========== =============================================== ===================================================================
92+
**template** None None A string containing your calendar template.
93+
See the template section below.
94+
**local_time** time() None A Unix timestamp corresponding to the current time.
95+
**start_day** sunday Any week day (sunday, monday, tuesday, etc.) Sets the day of the week the calendar should start on.
96+
**month_type** long long, short Determines what version of the month name to use in the header.
97+
long = January, short = Jan.
98+
**day_type** abr long, short, abr Determines what version of the weekday names to use in
99+
the column headers. long = Sunday, short = Sun, abr = Su.
100+
**show_next_prev** FALSE TRUE/FALSE (boolean) Determines whether to display links allowing you to toggle
101+
to next/previous months. See information on this feature below.
102+
**next_prev_url** None A URL Sets the basepath used in the next/previous calendar links.
103+
====================== =========== =============================================== ===================================================================
111104

112105

113106
Showing Next/Previous Month Links

user_guide_src/source/libraries/form_validation.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,6 @@ Rule Reference
823823
The following is a list of all the native rules that are available to
824824
use:
825825

826-
.. table::
827826
======================= ========== ============================================================================================= =======================
828827
Rule Parameter Description Example
829828
======================= ========== ============================================================================================= =======================

0 commit comments

Comments
 (0)