Welcome Guest, Not a member yet? Register   Sign In
  Ignited: The Screencast - Episode 1, Configuration
Posted by: El Forum - 08-19-2007, 01:12 AM - No Replies

[eluser]Michael Wales[/eluser]
I've posted the first episode of Ignited: The Screencast on my blog. Throughout the course of these screencasts we'll be developing a del.icio.us clone. This first episode simply covers the basics of configuring Code Igniter and sets the stage for the rest of our development.

I'm definitely open to suggestions and comments - let me know how I can make these screencasts better.

The next episode will have us setting up our first controller, database, connecting to that database, and our first view.


  Encoding URL's in JS
Posted by: El Forum - 08-19-2007, 12:49 AM - No Replies

[eluser]Unknown[/eluser]
I have form data I need to send to a PHP script via an XmlHttpRequest. I don't trust JS validation for a second, so I use encode() to urlencode field values, and let PHP deal with it later.

Problem is, CI for some reason decode's the url, and throws an error.

*I* should be the one to decode the url string, not CI. Any suggestions?


  Anyway to get value from checkbox with a link?
Posted by: El Forum - 08-18-2007, 09:44 PM - No Replies

[eluser]chobo[/eluser]
I know this sounds kind of dumb, but it seems like a logical thing to be able to do. Can you have a whole bunch of check boxes beside a list of items. A user can check those check boxes and then click a link and the link can "somehow" pass the checked box values to the page the link opens up.

Think of it like a link replacing a button...


  PHP5 soap capabilities in a library
Posted by: El Forum - 08-18-2007, 08:57 PM - No Replies

[eluser]tylderdurden[/eluser]
Hi there,

I'm trying to implement a generic library that will allow for use of PHP5's built in SoapClient capabilities, but I'm having trouble wrapping my head around it all.

What I want to accomplish

A library that I can load through $this->load->library('soapclient') while having the config stored in the right place in application/config.

This library will load up a WDSL file for web services that will let me use the methods are functions of the object.

What I've tried

I first tried it with the controller (just to see if it could work) with the following code:

Code:
<?php

    class Blog extends Controller{

        function index()
        {    
            $client = new SoapClient('WSDL_URI');

        $params = array(
                    'clientID' => 3444
                    );
            echo '<pre>';
            print_r($client->GetCountries($params));
            echo '</pre>';        
        
        }
    }
    
?&gt;

PHP just dies at this point with a "PHP has encountered an Access Violation at 010A9A8A". If I use var_dump($client->__getFunctions());, then it has no problems.

I gave up there and tried to create a library,

Code:
&lt;?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Soapclientci {
    
    function __construct()
    {
        $CI = & get_instance();
        $this->client = new SoapClient('WDSL_URI');
        $this->clientID = $CI->config->item('clientID');
    }

    function GetCountries()
    {
        $params = array(
                    'clientID' => 3444
                    );
        return $this->client->GetCountries($params);            
                    
        
    }
    
}

?&gt;

Sufficed to say, it didn't work either and I'm just totally lost and confused.

Any help in pointing me to the write place would be greatly appreciated.


  /userclass/usermethod/userid -> /username
Posted by: El Forum - 08-18-2007, 05:43 PM - No Replies

[eluser]jstrebel[/eluser]
Wondering how to accomplish this. I have read over the remap and routes stuff but I cant seem to wrap my head around it.


I have a controller runnning smooth in that when http://domain.com/userclass/usermethod/userid is called it does as intended and renders the user data based on userid.

I would like this same action to happen at http://domain.com/username

In the userclass am already querying the db based on userid to retrieve the username, so i gather then that I pass username to some sort of routing/remap function using reg_exp??


Please advise.


  Which AJAX to use?
Posted by: El Forum - 08-18-2007, 04:31 PM - No Replies

[eluser]Hamilogre[/eluser]
I've noticed on the wiki there are a few different solutions for ajax. AJAX for CodeIgniter, XAJAX, tinyajax. Which one should I use?


  Spanish Language for 1.5.4 done
Posted by: El Forum - 08-18-2007, 02:58 PM - No Replies

[eluser]Unknown[/eluser]
Hi all,

Since I just started working on codeigniter for a client project in Spanish I decided to update the 1.5.3 Spanish language file that juaxix made.

The 1.5.3 file could be used in 1.5.4, I fixed a couple of typos.
Any thanks should go to juaxix, who did all the work.

Here's the file: spanish_1.5.4.zip

Wouldn't it be great if there was a place to upload these files for central access? Like an add-on repository. Other OS projects (like Lussumo Vanilla) have that, and it's great for fostering collaboration on extending the framework.


  Model/Database question
Posted by: El Forum - 08-18-2007, 01:37 PM - No Replies

[eluser]Hamilogre[/eluser]
I'm trying to run an update in my model by passing $this to the $this->db->insert function. When I run it, it seems that it is trying to pass more than just my class variables to the insert statement. Here is the output:

Code:
An Error Was Encountered

Error Number: 1054

Unknown column '_parent_name' in 'field list'

INSERT INTO nsfma_doctor (_parent_name, doctor_first_name, doctor_middle_name, doctor_last_name, doctor_date_modified, _ci_ob_level, _ci_view_path, _ci_is_php5, _ci_is_instance, _ci_scaffolding, _ci_scaff_table) VALUES ('Doctor_model', 'kk', 'l', 'l', '07-08-18 12:34:24', 0, '/home/content/n/s/f/nsfma/html/system/application/views/', 0, 0, 0, 0)

Am I doing something wrong that is making it so that things outside of my class variables are being passed to the function?


  Maybe simple performace question (think)
Posted by: El Forum - 08-18-2007, 01:17 PM - No Replies

[eluser]PoWah[/eluser]
What is the best way (having in mind performance) to do such thing:

I have in DB a field with information representing pages hierarchy:

Code:
1
1.1
1.2
1.2.1
2
2.1
2.2
...
...
...
11
11.1
11.1.1
11.2
11.2.1
11.2.2
11.3
...
and so on...
.. and I need them to be sorted in exactly the same way as I wrote above. Maybe is there any way to do this with only SQL?
At this moment I know the only way (with PHP sorting):

I get all results from DB and then do my sorting:
Code:
$result_array = array();
foreach ($query->result() as $row)
{
    $how_many_dots = substr_count($row->hierarchy, "."); // find how many dots is in 'hierarchy' field data
    $result_array[$how_many_dots][] = $row;
}

ksort($result_array); // sort by array key

$keys = array_keys($result_array);

foreach ($keys as $key)
{
    $run_query = true;
    foreach ($result_array[$key] as $sorted_results)
    {
        $sorted_result_array[] = sorted_results;
    }
}


  .htaccess and URI routing to redirect everything to a single controller/function...
Posted by: El Forum - 08-18-2007, 01:16 PM - No Replies

[eluser]snaggy[/eluser]
I wrote a tiny little mini cms for myself which only consists in a controller where the only function that should be accessed is index

current URI:

http://localhost/CI/index.php/MyControll...x/&#xpa;ge level 1%/&#xpa;ge level 2%

this part is useless

index.php/MyController/index/

How can I remove it? I tried to remove at least index.php (user guide) but it doesn't work
if I write

http://localhost/CI/MyController/index/&#xpa;ge level 1%/&#xpa;ge level 2%

it gives me this error:

No input file specified.


Any help appreciated, as this seems pretty hard for me..


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

Username
  

Password
  





Latest Threads
Changing Session cookie -...
by InsiteFX
2 hours ago
Update from 4.6.0 to 4.6....
by Vespa
Yesterday, 01:17 AM
hot-reload side effects s...
by InsiteFX
05-17-2025, 10:11 PM
using app/Config/App.php ...
by sam547
05-16-2025, 03:04 PM
Setting baseURL in Regist...
by grimpirate
05-15-2025, 02:20 PM
CRUD Code Generator
by DeanE10
05-15-2025, 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
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

Forum Statistics
» Members: 146,759
» Latest member: Mysoretravelo
» Forum threads: 78,392
» Forum posts: 379,470

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB