Welcome Guest, Not a member yet? Register   Sign In
  Rich Text Field
Posted by: El Forum - 10-18-2007, 07:32 AM - No Replies

[eluser]vevmesteren[/eluser]
Hey friends. I am looking to integrate a text area with the same functionality as the on I am typing into right now. I do not really need a full fledged rich text editor like fckedit, though it would be a nice to have, but I cannot make it work yet (following the wiki instructions). But setting that aside, I would want a text editor like this one and generally used in forums. But I have troubles finding one to start from, I guess what I would need is what is the term for Textarea like this one...

Guess I will take a look at the source of this page while I wait for someone to point me in the right direction. Thanks

V


  Repopulate TextArea
Posted by: El Forum - 10-18-2007, 06:06 AM - No Replies

[eluser]RobbieL[/eluser]
I'm having a bit of trouble with textareas in my forms not repopulating. The $field for them is there in my controller. All text inputs in the form work fine, just not textareas.

Here the code in my view;

Code:
<textarea name="description" "value="<?=$this->validation->description;?>"></textarea><?=$this->validation->description_error; ?>

Looked through the CI's userguide on Validation, and can't spot anything about textareas. Anyone got anyideas on what's going on?


  Truble, building RSS
Posted by: El Forum - 10-18-2007, 03:34 AM - No Replies

[eluser]iniweb[/eluser]
This is my code:

Code:
class Rss extends Controller {

    function Rss()
    {
        parent::Controller();

        $this->load->helper('date');
    }

    function Index()
    {
        $query = $this->db->query("SELECT * FROM ci_news WHERE status = '1' ORDER BY id DESC LIMIT 10");

        $content = '';

        foreach($query->result() as $row)
        {
            $row->date = human_to_unix($row->date);
            $row->date = standard_date('DATE_RSS', $row->date);
            $row->link = "<a href=\"http://yaba.ru/News/$row->id/\">http://yaba.ru/News/$row->id/</a>";

            $data = array(
                           'author'      => $row->author,
                           'title'       => $row->title,
                           'link'        => $row->link,
                           'images'      => $row->images,
                           'date'        => $row->date,
                           'short_story' => $row->short_story
                     );

            $content .= $this->parser->parse('Rss_Elements.tpl', $data);
        }

        $data = array(
                       'content'    => $content,
                 );

        $this->load->library('parser');
        $this->parser->parse('Rss.tpl', $data);
    }
}

if Rss.tpl have this content:

Code:
&lt;?xml version="1.0" encoding="windows-1251"?&gt;
&lt;rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"&gt;
<channel>
&lt;title&gt;Yaba News&lt;/title&gt;
&lt;link&gt;http://yaba.ru&lt;/link&gt;
<language>ru</language>
<description>Yaba News</description>
<generator>Yaba News</generator>

{content}

</channel></rss>

Show this error:

Quote:Parse error: parse error, unexpected T_STRING in x:\home\igniter.by\www\system\application\views\Rss.tpl on line 1

How to correct?


  Calling a function after controller method
Posted by: El Forum - 10-18-2007, 02:45 AM - No Replies

[eluser]Unknown[/eluser]
Hello Igniters,

i've been using CI for some time and to be honest i really like it. Now i use it as a base on all my application.

There has been something that i've been strugling with for a while. I want to call a method which is defined in my controller class ( extended base controller ) after every execution of a controller method. Thats because i make a lot of simple sites and i want to minimize the size of the code in there.

I know there are hooks. Using it you can execute a class method on post_controller point. You should enter there Class and method name which is not exactly what i want.. I want to be able to execute a member function of the current controller.

A possible solution might be to make a class which gets instance so it gets access to the current CI resources and execute this "destructor" but it doesnt seem quite right.

I will appreciate any suggestions!

Thanks for your time Smile
Hristo


  Error message when using mail()
Posted by: El Forum - 10-18-2007, 02:33 AM - No Replies

[eluser]Robb__[/eluser]
I got a strange message after moving my site to a different server, it sounds bad. Did I choose the wrong host?

Quote:A PHP Error was encountered

Severity: Warning

Message: mail() [function.mail]: mail() - double newline in headers, possible injection, mail dropped

Filename: libraries/Email.php

Line Number: 1232
Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.

User-Agent: Code Igniter
Date: Thu, 18 Oct 2007 10:30:42 +0200
From: "Test"
Return-Path:
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: Code Igniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="B_ALT_471719b231824"
This is a multi-part message in MIME format.
Your email application may not support this format.

--B_ALT_471719b231824
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit


  Some Framework Benchmarks
Posted by: El Forum - 10-18-2007, 02:14 AM - No Replies

[eluser]Unknown[/eluser]
Published by Paul M. Jones (main developer of phpSolar) at php|works 2007.
Blog entry http://paul-m-jones.com/blog/?p=258
Original slides: http://paul-m-jones.com/benchmarking-2007.pdf
The interesting pages are 24 and 27.

In short - request per second

Code:
CI 1.5.4         220.83
Cake:              98.38
Solar              142.82
Zend  1.01        96.54

and the winner is ........?

U.W.


  Help(codeigniter+xajax5)
Posted by: El Forum - 10-18-2007, 01:06 AM - No Replies

[eluser]mistress_shiira[/eluser]
good day guys!
im still learning codeigniter and xajax so forgive me if i dont know the basics.
basically,i have read on xajax and codeigniter individually.what i want to do next is to be able to do programs using them both.
Now,my main problem is how to set up codeigniter(the latest release) and xajax(still the latest release)so i can use them concurrently.
Please provide examples from start to finish.Thanks a lot.


  Question on Native Session class and flashdata
Posted by: El Forum - 10-17-2007, 09:42 PM - No Replies

[eluser]charlieD[/eluser]
Is anyone here familiar with the NativeSession class?

Just wondering why, when you load flashdata, it returns the 'old' item rather than the newly set one? I can't think of a reason why this would be the case; in the situation I'm using it now it certainly makes sense to use the new data.


  I hope it can help you! It is about the index.php.
Posted by: El Forum - 10-17-2007, 09:07 PM - No Replies

[eluser]fanxiaotao[/eluser]
I hope it can help you!

Somebody ask the question:"How can i drop the 'index.php' from the rul".

I will give you my experience.

Show my path of the CodeIgniter:"D:/phpDemo/Root/CodeIgniter/".

Modify the httpd.comf file of Apache Server.

Add code like this : Alias /phpDemo/ "D:/phpDemo/Root/CodeIgniter/index.php/" .

Now the old url:"http://localhost:8000/CodeIgniter/index.php/blog" had changed to :"http://localhost:8000/phpDemo/blog/".

I hope that my experience could help you.

I am a beginning student for the CodeIgniter.

My english is not very well.I hope you can know my saying.


  Newbie: how to acces array values?
Posted by: El Forum - 10-17-2007, 06:20 PM - No Replies

[eluser]victor76[/eluser]
Hi,

I've got this Model function:

Code:
function get_last_ten_entries()
    {
        $query = $this->db->get('entries', 10);
        return $query->result();
                
    }

...and this Controller function:
Code:
&lt;?php
class Blog_controller extends Controller {

    function blog()
    {
        $this->load->model('Blogmodel','',TRUE);

        $data['query'] = $this->Blogmodel->get_last_ten_entries();

        $this->load->view('blogview', $data);
    }
}
?&gt;

In my View, I've used a simple print_r($data) to see if I would get anything from my DB.
This is wat it spits out:

Code:
Array
(
    [view] => blogview
    [vars] => Array
        (
            [query] => Array
                (
                    [0] => stdClass Object
                        (
                            [id] => 1
                            [title] => 1st entry
                            [content] => blabla
                            [date] => 2007-10-18
                        )

                    [1] => stdClass Object
                        (
                            [id] => 2
                            [title] => 2nd entry
                            [content] => blabla
                            [date] => 2007-10-26
                        )

                )

        )

    [return] =>
)

...and now for my newbie question Smile
How can I acces these array values in my View?

I would like to display a simple <li>&lt;?php echo $data[0]['content']; ?&gt;</li>

But somehow this is not working...
Can anyone point me in some direction? Thnx!


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
Setting baseURL in Regist...
by grimpirate
Yesterday, 02:20 PM
hot-reload side effects s...
by grimpirate
Yesterday, 12:35 PM
CRUD Code Generator
by DeanE10
Yesterday, 05:31 AM
CodeIgniter.com - Report ...
by Harry Lyre
05-14-2025, 04:26 AM
Missing closing bracket w...
by abf
05-13-2025, 07:27 PM
Update from 4.6.0 to 4.6....
by FlavioSuar
05-13-2025, 04:17 AM
Sessions old files are de...
by InsiteFX
05-12-2025, 10:30 PM
Ajax post failing with Ty...
by PaulC
05-12-2025, 12:23 AM
intermittent smtp failure...
by InsiteFX
05-11-2025, 11:30 PM
MVC vs MVCS vs CodeIgnite...
by FlavioSuar
05-10-2025, 10:33 AM

Forum Statistics
» Members: 146,313
» Latest member: Trilliumhealth
» Forum threads: 78,390
» Forum posts: 379,457

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB