Solved

Have you ever used CodeIgniter in conjunction with KoolPHPSuite ?

Posted on 2013-06-07
6
836 Views
Last Modified: 2013-06-07
Hi Experts!

Have you ever used CodeIgniter in conjunction with KoolPHPSuite ?

Some unexpected behaviors comes, example bellow:
img001
Maybe due some intrinsic CodeIgniter constructor treatment...

Do you know what could solve this?

<?php
    
      $KoolControlsFolder = "/../../../KoolPHPSuite/KoolControls"; //Relative path to "KoolPHPSuite/KoolControls" folder
    
    $koolajax->scriptFolder = $KoolControlsFolder . "/KoolAjax";
    
    require $KoolControlsFolder . "/KoolCalendar/koolcalendar.php";
    require $KoolControlsFolder . "/KoolForm/koolform.php";
    require $KoolControlsFolder . "/KoolAjax/koolajax.php";
    require $KoolControlsFolder . "/KoolComboBox/koolcombobox.php";   

    $myform_manager = new KoolForm("myform");
    $myform_manager->scriptFolder = $KoolControlsFolder . "/KoolForm";
    $myform_manager->DecorationEnabled = true;
    $myform_manager->styleFolder = "sunset";

    $myform_manager->Validate = true; //Validate form before post
    $myform_manager->RenderWithExistingMarkup = true; //Use existing page layout
    $myform_manager->StatePersistent = false; //Don't keep state persistent after postback.
    $myform_manager->Init();

    $datepicker = $myform_manager->AddControl(new KoolDatePicker("datepicker"));//Create calendar object
    $datepicker->scriptFolder = $KoolControlsFolder . "/KoolCalendar"; //Set scriptFolder
    $datepicker->styleFolder = "default";
    $datepicker->DateFormat = "d/m/Y";
    $datepicker->Date = date("dmY");

    $datepicker1 = $myform_manager->AddControl(new KoolDatePicker("datepicker1")); //Create calendar object
    $datepicker1->scriptFolder = $KoolControlsFolder . "/KoolCalendar"; //Set scriptFolder
    $datepicker1->styleFolder = "default";
    $datepicker1->DateFormat = "d/m/Y";
    $datepicker1->Date = date("dmY");

    $datepicker->Init();
    $datepicker1->Init();

    $con = mysql_connect(db_host, db_user, db_word);
    mysql_select_db(db_name, $con);

  
?>

<form id="form2" method="post"  action="Teste_Kool_Pesq_Lanc_01.php" method="POST">
    <br />
    <br />
    Data Inicial:
<?php
    echo $datepicker->Render();
?>
    <br/>
    <br/>
Data Final:
<?php
    echo $datepicker1->Render();
?>
		
<?php
    if ($datepicker->Value != null)
    {
        echo "<b>Data Inicial:</b> " . $datepicker->Value;
    }
    if ($datepicker1->Value != null)
    {
        echo "<b>Data Final:</b> " . $datepicker1->Value;
    }

?>
<br />
<br />

Open in new window


Thanks in advance!
0
Comment
Question by:Eduardo Fuerte
  • 4
  • 2
6 Comments
 
LVL 31

Expert Comment

by:Marco Gasi
ID: 39229217
Is the code you posted the controller code? It doesn't seem to be... See here a first suggestion about how to use KoolPhp with CI: http://ellislab.com/forums/viewthread/198459/
0
 
LVL 31

Expert Comment

by:Marco Gasi
ID: 39229239
You find the same code in the KoolPhp forum here: http://forum.koolphp.net/viewtopic.php?t=687&highlight=codeigniter
Another example here: http://forum.koolphp.net/viewtopic.php?t=2483&highlight=codeigniter

Hope this helps

Cheers
0
 

Author Comment

by:Eduardo Fuerte
ID: 39229342
MarqusG

Thanks for the reply!
I was a little afraid about compatibilities.
Do you have any personal experience in using this in conjunction? if possible could you share it?
0
ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

 
LVL 31

Accepted Solution

by:
Marco Gasi earned 500 total points
ID: 39229401
I have no direct experience about, but if KoolPhp forum says it is possible, I don't see why you have to fear for compatibility problems. You can see the first piece of code has been defined helpful by the user asked for a help (http://forum.koolphp.net/viewtopic.php?t=687&highlight=codeigniter)

What I can explain is that you have to put in the controller the code which sets up the KoolPhp component and then call simply render function in the view page.

Cheers
0
 

Author Closing Comment

by:Eduardo Fuerte
ID: 39230595
Thank you for the assistance.
I'm finding the way, unfortunatelly KoolPHPSuite does not give to much examples....
0
 
LVL 31

Expert Comment

by:Marco Gasi
ID: 39230619
Thanks for points and good luck with your project.

Cheers
Marco
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question