Md. Golam Rabbany

Just work with honesty, Success will come on your door

Category Archives: Message Board

How to add your Class at CodeIgniter


Step#1: create your own class
<?
class class_name {

function function_name()
{
echo “I am There”;
}

}
?>

Now save this file on your libraries (system->libraries) and file name is must according to your class name like class_name.php

 

Step#2: create a controller like this…
<?php

class own_controller extends Controller {

function own_controller()

{

parent::Controller();

}

function show_text()

{
$this->load->library(class_name);
echo $this-> class_name -> function_name();
}

}
?>

Now save the controller at your controller folder.

OUT PUT will be “I am There”

 

Advertisements

Nice Content Editor


NicEdit is a Javascript/AJAX inline content editor to allow easy editing of web site content on the fly in the browser. It integrates into any site in seconds to make any element/div editable or convert standard textareas to rich text editing. You can try it right now by clicking on and editing this text using the controls at the top of the page!

NicEdit Form Submission
Post by Golam Robbany No extra configuration is normally needed to use NicEdit in place of textareas on forms. If users can type HTML in a current textarea it only takes one line of code to turn it into a rich text editor in your application!

Code:
<script type=“text/javascript”>
bkLib.onDomLoaded(function() {
new nicEditor({fullPanel : true}).panelInstance(‘comments’);
});
</script>

<strong>Enter your Name and Comments using the
NicEditor below</strong><br /><br />
<form method=“post” action=“examples3.php”>
Name : <input type=“text” name=“name” />
<textarea id=“comments” name=“comments” style=“width: 450px; height: 100px;”></textarea>
<input type=“submit” value=“Submit” />
</form>