Exemplo n.º 1
0
{% block content %}

    {# You put our content in here #}
    
{% endblock %}'));
?>
</pre> 

                Let's say you have a text field in your section called title. <br/><br/>

                To output this in home.html all you would do is write <br/><br/>

                <pre><?php 
echo trim(my_html_escape('
{{entry.title}}
'));
?>
</pre> 
  		      <br/>And this will dump the content of that field into the home template. Pretty nifty!
              But if this all seems like too much manual work, relax, all you have to do is click the 
              boiler plate generator link when you are inside your template and the ignitedCMS engine will
              manually create the file and subdirectory if necessary. <br/><br/>

              It really doesn't get any easier than this!

  		        </div>
  		    </section>
  		</div>
  		
  </div>
Exemplo n.º 2
0
                Windows users, using xamp should be good to go. <br/><br/>

                <strong>Mac Users</strong> <br/><br/>
                Mac users on MAMP need to do one extra step. Simply open the config.php file under: <br/><br/>
                <pre><?php 
echo trim(my_html_escape('
application > config > config.php
'));
?>
</pre> <br/>   And edit the base_url line to read: <br/><br/>
<pre><?php 
echo trim(my_html_escape('
$config[\'base_url\'] = \'http://localhost:8888/ignitedcms-pro/\';
'));
?>
</pre> <br/>  Then just follow the steps as usual <br/><br/>
              <strong>Linux Users</strong> <br/><br/>
              First you need to give the full folder 777 permissions. This can be done by going into the terminal and typing: <br/><br/>
              <pre><?php 
echo trim(my_html_escape('
chmod 777 -R ignitedcms-pro
'));
?>
</pre> <br/> Then continue the install as normal. (Obviously on a production environment you will want to make sure the folder isn't given full 777 permissions. But we'll leave that to you.)
  		        </div>
  		    </section>
  		</div>
  		
  </div>
</div>
<div class="gap"></div>
Exemplo n.º 3
0
echo trim(my_html_escape('
{{session_id}}
'));
?>
</pre>  Returns the session id useful when you want to use sessions for example, in an online shop.<br/><br/>

<pre><?php 
echo trim(my_html_escape('
{{site_name}}
'));
?>
 </pre> Returns the site name.<br/><br/>

<pre><?php 
echo trim(my_html_escape('
{{menu}}
'));
?>
 </pre> Echos the menu as an unordered list.


      

                    

                    

  		        </div>
  		    </section>
  		</div>
  		
Exemplo n.º 4
0
  		</div>
  		<div class="col-sm-8">
  		    
  		    <section class="panel">
  		        
  		        <div class="panel-body" style="padding:30px; font-size:15px; line-height:24px;">
  		        	<h3 class="purplet">What is IgnitedCMS?</h3>
  		        	IgnitedCMS is a content management system (CMS) that’s blends the power of codeigniter to create a dynamic content management system. The beauty is in its simplicity. It can be used as a stand alone website managment tool such as Wordpress, or it can be highly customized to create your own powerful backends. <br/><br/>
  		        	It's fast, it's got a small footprint, it's powerful and it's free to use - in short - we love it and we know you will too. <br/><br/>
  		        	<pre><?php 
echo trim(my_html_escape('

<?php  
	for ($i=0; $i < 100; $i++) 
	{ 
		echo("IgnitedCMS is not for artisans, 
		it\'s for real coders who like 
		getting shit done!");
	}
?>

'));
?>
  		        		

  		        	</pre>

  		        </div>
  		    </section>
  		</div>
  		
  </div>
Exemplo n.º 5
0
                <pre><?php 
echo trim(my_html_escape('
application > views > custom
'));
?>
</pre> 
                and possibly the custom controller directory which is under: <br/><br>
                <pre><?php 
echo trim(my_html_escape('
application > controllers > custom
'));
?>
</pre>  
          <br/>This is where you might write your own custom controllers to communicate with a new table in the database.
          
  		        	<br/><br/>
                The place where all your uploads are stored is contained within the folder: <br/><br/>
                <pre><?php 
echo trim(my_html_escape('
assets > uploads
'));
?>
</pre>  <br/>You shouln't need to touch any other files, as the ignitedCMS engine does everything else :D

  		        </div>
  		    </section>
  		</div>
  		
  </div>
</div>
<div class="gap"></div>
Exemplo n.º 6
0
                  <br/><strong>Number</strong> <br/> 
                  <pre><?php 
echo trim(my_html_escape('
{{entry.fieldHandle}}
'));
?>
</pre> 
                  <br/><strong>File Upload (E.g images)</strong> <br/> 
                  <pre><?php 
echo trim(my_html_escape('
{% for a in assets.fieldHandle %}
   {{a.url}}
{% endfor %}
'));
?>
</pre> 
                  <br/><strong>Drop Downs</strong> <br/> 
                  <pre><?php 
echo trim(my_html_escape('
{{entry.fieldHandle}}
'));
?>
</pre> 

  		        </div>
  		    </section>
  		</div>
  		
  </div>
</div>
<div class="gap"></div>
Exemplo n.º 7
0
 function my_field_show($fieldid, $entryid, $errors)
 {
     //use ci active record
     $CI =& get_instance();
     $CI->db->select('*');
     $CI->db->from('fields');
     $CI->db->where('id', $fieldid);
     $CI->db->limit(1);
     $query = $CI->db->get();
     $name = "";
     foreach ($query->result() as $row) {
         if ($row->type == "plain-text") {
             $content = my_html_escape(my_field_content($entryid, $row->name));
             echo "\n          <div class='form-group'>\n              <label>{$row->name}</label>\n              <div class='igs-small'>{$row->instructions}</div>\n              <input name='{$row->name}' \n              type='text'  \n              class='form-control' \n              placeholder='Type here' \n              data-toggle='tooltip' \n              data-placement='top' \n              title='' \n              value='{$content}'>\n          </div>";
             echo "<div class='errors'>{$errors}</div>";
         }
         if ($row->type == "number") {
             $content = my_field_content($entryid, $row->name);
             echo "\n          <div class='form-group'>\n              <label>{$row->name}</label>\n              <div class='igs-small'>{$row->instructions}</div>\n              <input name='{$row->name}' \n              type='text'  \n              class='form-control' \n              placeholder='Type here' \n              data-toggle='tooltip' \n              data-placement='top' \n              title='' value='{$content}'>\n          </div>";
             echo "<div class='errors'>{$errors}</div>";
         }
         if ($row->type == "drop-down") {
             $content = my_field_content($entryid, $row->name);
             $arr = explode(",", $row->opts);
             echo "\n             <div class='form-group'>\n                  <label>{$row->name}</label>\n                  <div class='igs-small'>{$row->instructions}</div>\n                     <select name='{$row->name}' class='form-control m-b'>";
             foreach ($arr as $key) {
                 if ($key === $content) {
                     echo "<option value='{$key}' selected>{$key}</option>";
                 } else {
                     echo "<option value='{$key}'>{$key}</option>";
                 }
             }
             echo " \n                  </select>\n              </div>";
             echo "<div class='errors'>{$errors}</div>";
         }
         if ($row->type == "check-box") {
             //get the actual content
             $t2 = my_checkbox($row->name, $entryid);
             $arr = explode(",", $row->opts);
             echo "\n             <div class='form-group'>\n                <label>{$row->name}</label>\n                <div class='igs-small'>{$row->instructions}</div>\n                  <input type='text' \n                    name='chk-{$row->name}' \n                    id='' value='' \n                    style='display:none;'/>";
             foreach ($arr as $key) {
                 if (my_is_in($key, $t2)) {
                     echo "\n                         <label>\n                          <input type='checkbox' name='chk-{$row->name}[]' value='{$key}' checked> \n                        </label> {$key}<br/>";
                 } else {
                     echo "\n                         <label>\n                          <input type='checkbox' name='chk-{$row->name}[]' value='{$key}' > \n                        </label> {$key}<br/>";
                 }
             }
             echo "</div>";
         }
         if ($row->type == "multi-line") {
             $content = my_field_content($entryid, $row->name);
             echo "\n          <div class='form-group'>\n              <label>{$row->name}</label>\n              <div class='igs-small'>{$row->instructions}</div>\n               \n                   <textarea name='{$row->name}'   class='form-control' rows='5'  placeholder='Type here' data-toggle='tooltip' data-placement='top'>{$content}</textarea>\n\n          </div>";
             echo "<div class='errors'>{$errors}</div>";
         }
         if ($row->type == "rich-text") {
             $content = my_field_content($entryid, $row->name);
             echo "\n            <input type='text' \n              name='{$row->name}' \n              id='{$row->name}' \n              value='' \n              style='display:none;' />\n            <div class='form-group'>\n                <label>{$row->name}</label>   \n                  <a href='#' class='t-edit' uid='{$row->name}'>Edit</a>\n                  <div class='igs-small'>{$row->instructions}</div>\n                  <div id='tmp-{$row->name}' \n                    class='rich' \n                    uid='{$row->name}'>\n                    {$content}\n                  </div>\n            </div>";
             echo "<div class='errors'>{$errors}</div>";
         }
         if ($row->type == "color") {
             $content = my_field_content($entryid, $row->name);
             echo "\n          <div class='form-group'>\n             <label>{$row->name}</label>\n             <div class='igs-small'>{$row->instructions}</div>\n             <input class='color' \n              name='{$row->name}' \n              type='text' \n              data-required='true'  \n              class='form-control' \n              placeholder='#' \n              data-toggle='tooltip' \n              data-placement='top' \n              title='' \n              value='{$content}'>\n          </div>";
             echo "<div class='errors'>{$errors}</div>";
         }
         if ($row->type == "date") {
             $content = my_field_content($entryid, $row->name);
             echo "\n          <div class='form-group'>\n\n          <label>{$row->name}</label>\n          <div class='igs-small'>{$row->instructions}</div>\n              <input name='{$row->name}'  \n              class='input-sm input-s datepicker-input form-control' \n              size='16' \n              type='text' \n              value='{$content}' \n              data-toggle='tooltip' \n              data-placement='right' \n              title='' \n              data-date-format='yyyy-mm-dd' \n              name='name' \n              data-original-title=''  \n              readonly>\n          </div>";
             echo "<div class='errors'>{$errors}</div>";
         }
         if ($row->type == "file-upload") {
             //testing
             $content = my_field_content($entryid, $row->name);
             $ee = my_get_img_url($content);
             echo "\n          <div class='clear'></div>\n          <div class='form-group'>\n            <label>{$row->name}</label>\n                  <div class='igs-small'>{$row->instructions}</div>\n                 ";
             foreach ($ee as $key) {
                 $url = $key['url'];
                 $id = $key['id'];
                 $link = site_url("admin/entries/remove_asset/{$id}");
                 echo "<img class='img-responsive pull-left' \n                      src='{$url}' alt='image'  \n                      style='border-radius:10px; margin-left:10px;' />\n                        <a href='{$link}'>\n                          <div class='btn btn-sm \n                            btn-danger btn-rounded \n                            pull-left remo' \n                            style='margin-left:10px;' uid='{$id}'>\n                            <i class='fa fa-minus'></i>\n                          </div>\n                        </a>";
             }
             echo "<div  class='btn btn-purplet btn-s-xs add-asset'  \n                      uid='{$row->name}' style='margin-left:10px; margin-top:0px;'>\n                      <strong>Add asset</strong>\n                        <i class='fa fa-plus pull-left'></i>\n                      </div>    \n                  </div> \n                  <div class='clearfix'></div>\n              <div class='errors'>{$errors}</div>";
         }
         if ($row->type == "switch") {
             $content = my_field_content($entryid, $row->name);
             $checked = "";
             if ($content == '1') {
                 $checked = "checked";
             }
             echo "\n          <div class='form-group'>\n          <label>{$row->name}</label>\n                  <div class='igs-small'>{$row->instructions}</div>\n            <label class='switch'>\n              <input type='hidden' value='0' name='{$row->name}'>\n              <input type='checkbox' value='1' name='{$row->name}' {$checked}>\n              <span></span>\n            </label>\n          </div>";
             echo "<div class='errors'>{$errors}</div>";
         }
     }
 }
Exemplo n.º 8
0
echo trim(my_html_escape('
{{entry.fieldHandle}}
'));
?>
</pre>   <br/>You would do: <br/>
<pre><?php 
echo trim(my_html_escape('
{{globalName.fieldHandle}}
'));
?>
</pre>   
<br/> To access global assets simply do
<pre><?php 
echo trim(my_html_escape('
{ % for a in globalName.fieldHandle %}
  {{a.url}}
{ % endfor %}
'));
?>
</pre>   


<br/> The beauty about globals is that they can be accessed on any page in your template.



  		        </div>
  		    </section>
  		</div>
  		
  </div>