Welcome Guest, Not a member yet? Register   Sign In
  Hooks and Hook points
Posted by: El Forum - 09-03-2007, 04:36 AM - No Replies

[eluser]cdmn[/eluser]
Hi.

ive did some research with hooks and hook points and of course ive some questions.
Maybe someone will be nice enough to answer them :-)

My hook does nothing special, just:

Code:
$CI =& get_instance();
var_dump($CI);

So.

Hook with pre_system point:
Code:
Fatal error: Call to undefined function: get_instance() in ...
Hook with pre_controller point:
var_dump returns NULL.

Other hook points returns an object, which you can work with.
So my question would be, what resourses i can use, at pre_system and pre_controller points? Of course ill need to load some libraries, should i use CI core functions like load_class? Looking for some explanation and advice :-)


  Using Ajax for CI with forms
Posted by: El Forum - 09-03-2007, 04:12 AM - No Replies

[eluser]ufasoli[/eluser]
Hello again,
I have been asking a lot of questions lately, and you have been really helpful guys, so here is another one...

Here is the situation, I have an inscription form that is 4 pages and I've decided to do all the validation through Ajax and even though I have done this before manually ( This is my first time using a framework) I'm having trouble understanding how Ajax for code Igniter works...

What I want to do is when the user clicks on the next button to submit the entire form through Ajax do my validation on a function in my controller named page_1 and if there are errors update a div in my view with an error message using as well an effect to make it look more "sexy" ( I hope I've been clear on what I would like to achieve). Here is my code


this is my controller function

Code:
function page_1()
{
        
        
    ..... some validation    
            
           if (!$error) // if some error occurred during validation
            {
                $this->ajax->visual_effect('BlindUp','testAjax');      
                $this->ajax->replace_html('testAjax', 'test');
            }
        
        //$this->validation->set_rules($rules);
            echo "test";


this is my view
Code:
echo $this->ajax->form_remote_tag( array('url'=>'page_1') ) ;

once the view has been parsed here is what I get :


Code:
<form method="post" onsubmit="new Ajax.Request('page_1',{evalScripts:true,     parameters:Form.serialize(this)}); >

The thing is that I'm able to recover the post data that I transmit through Ajax, but I can't do the update thing on the Dom Element

Thanks in advance

Ulises


  Return Error from Validate
Posted by: El Forum - 09-03-2007, 04:03 AM - No Replies

[eluser]iniweb[/eluser]
Code:

Code:
function News_Add()
        {
                $data = array(
                        'error'  => $this->validation->error_string
                );

                $content = $this->parser->parse('Backoffice/News_Add.tpl', $data);

                $data = array(
                        'content'  => $content,
                        'sysblock'  => SysBlock::Index()
                );

                $this->parser->parse('Backoffice/main.tpl', $data);
        }

        function News_Add_Check()
        {
                $this->load->model('NewsModel');

                $rules['author'] = "trim|required";

                $this->validation->set_rules($rules);

                if ($this->validation->run() == FALSE) {
                        redirect('/index.php?c=Backoffice&m=News_Add', 'refresh');
                } else {
                        $this->NewsModel->Insert_News();

                        redirect('/index.php?c=Backoffice&m=News_List', 'refresh');
                }
        }

Now error returned on function News_add_check, but need return error on function News_Add(). How?


  Some Suggestion > Please contribute with my ideas >>>
Posted by: El Forum - 09-03-2007, 03:26 AM - No Replies

[eluser]Unknown[/eluser]
Hello ALL
I am really happy to get some quick reply on my "How to build dynamic tree view". i think this is the POWER of the CodeIgniter Community. :-)
Anyway, while i study about CodeIgniter there some questions arise. Also some suggestion:

1. Obviously CodeIgniter based on MVC architecture. there is also "Helpers" & "libraries" . but if there will be another "section" like "components", where basic used components (tree view, grid, list view) are available. what do u all think ???

2. I study the "Blog creation" tutorial. That was COOL. but my request to CodeIgniter "guru" to provide a little bigger tutorial for freshers like ME. ;-)

3. Lastly, is there any Reporting tool like crystal report that i can use with CodeIgniter?

Best Regards to you ALL
chishty


  How to use TRUE/FALSE values in an Active Record statement?
Posted by: El Forum - 09-03-2007, 02:53 AM - No Replies

[eluser]xcristi[/eluser]
Hi guys,

So, I have one postgresql table with a boolean type field (mn_active).
And I have a need for a statement who take care of that field, something as:

Code:
$q = $CI->db->getwhere('menu', array('mn_menu' => 2, 'mn_active' => true));

The error looks like:

Code:
ERROR: operator does not exist: boolean = integer HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.

SELECT * FROM menu WHERE mn_menu = 1 AND mn_active = 1

So, how can I use boolean values (true / false) instead of integers ?
Thanks.


  Make a document.
Posted by: El Forum - 09-03-2007, 02:21 AM - No Replies

[eluser]Unknown[/eluser]
Hi, all

I want to make a document for my little item. And I like the style of the user guide of CI. Can you tell me which tool the user guide of CI was made by?


  ecommerce: zend framework, magento and CI
Posted by: El Forum - 09-03-2007, 02:06 AM - No Replies

[eluser]deck1[/eluser]
Hi all,

I am very new in CI community, and i have to say that i love it, both the people and the CI code.

At this time i am involved in some ecommerce proyects, and i am using a heavily modified oscommerce version. You can imagine, the code is a nightmare.

I am planning to change, and here comes the dilemma.

I love CI, i was planning to write a solution that fit my needs, using CI and sometimes using classes and resources from another Open Source solutions. This may take long time, but i have entirely control over code, keeping it as lightweight as possible.

But, in the past August, Magento comes into scene. Magento is an MVC open source ecommerce solution, written over Zend Framework. I have downloaded magento, it looks great, but has a dense structure.

I don't know what to do Sad If i use magento, in a few years it's possible that magento becomes the new oscommerce, with its pros and cons. But at this time i will have a base to work with.

Another possibility is use CI, i will develop it from (semi)scratch, and use some magento and ZF classes, but I don't know if this will be easy enough.

I know that lots of you are involved in oscommerce, what do you think about magento? what do you think is the best way (ZF+Magento vs CI)?

I hope this post will reopen an ecommerce talk, thanks for your time, and sorry for my bad english!


  How can i build a dynamic tree view using CodeIgniter ???
Posted by: El Forum - 09-03-2007, 12:10 AM - No Replies

[eluser]Unknown[/eluser]
Hello
I am a freshers in CodeIgniter. Currently i am trying to build a Accounting software which will be WEB based. In this purpose i need some kind of "tree view" like in visual Basic. I dont find any help. Moreover, I think in next version of CodeIgniter PLEASE add some "component" like tree view, list view etc , so our programmers work can be minimal....
Regrads
chishty


  error to get the image file informatino with getimagesize() PHP function...
Posted by: El Forum - 09-02-2007, 11:53 PM - No Replies

[eluser]OneCorea[/eluser]
Hi,
To get the image file info, which has already uploaded by the browser, using the PHP original getimagesize() functions..

I've got errors as follows...

Code:
getimagesize(): URL file-access is disabled in the server configuration

getimagesize(http://www.abctest.or.kr/board/upfile/forum/1187255975/case1.jpg):
failed to open stream: no suitable wrapper could be found


Of course, the permisssion of uploaded directory was set recursively 777 for the nobody user to access it.
So I can see the image file by the URL, and outside CI can get the image file info using the getimagesize() function...
But, within CI, there's error like above...

what's wrong???...dear gurus!!


  Clickable table rows using Jquery
Posted by: El Forum - 09-02-2007, 05:18 PM - No Replies

[eluser]danfloun[/eluser]
Anyone know if there is a function of jquery to allow clickable rows?

Thanks


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

Username
  

Password
  





Latest Threads
Any user guid or video o...
by msnisha
8 hours ago
MVC vs MVCS vs CodeIgnite...
by massimiliano1.mancini
Today, 10:15 AM
Why PHP is still worth le...
by php_rocs
Today, 05:13 AM
Is hiring a digital marke...
by Markhenry123
Today, 02:45 AM
my controller fails to fi...
by PaulC
Today, 01:40 AM
My Library cannot see ses...
by InsiteFX
Yesterday, 08:48 PM
update the framework to t...
by captain-sensible
Yesterday, 12:14 PM
CodeIgniter Shield 1.0.0 ...
by Ayatorvi
Yesterday, 06:06 AM
Update to 4.6.1
by serialkiller
05-07-2025, 11:58 AM
Can't create new database...
by paulbalandan
05-07-2025, 08:49 AM

Forum Statistics
» Members: 145,000
» Latest member: allintv
» Forum threads: 78,382
» Forum posts: 379,420

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB