Welcome Guest, Not a member yet? Register   Sign In
  help needed if you please!!
Posted by: El Forum - 08-31-2008, 03:46 PM - Replies (10)

[eluser]eddie21leeds[/eluser]
hello to all... i am edward from leeds. im pretty new to web applications and when i saw the framework and tutorials on the site i thought i'd give it a go. i got through both tutorials no problem and got the blog working on my local machine but when i came to upload it to my hosting it would not let me acess the scaffolding feature (as a user from the frnt end). i have tried uploading it all in a zip and the unzipping and i have tried FTPing it all with dreamweaver, i have done both with all permissions on and still i get the message in my browser - Directory access is forbidden. does anybody know what i am doing wrong? thankyou in advance.
eddie!


  General questopn on php classes
Posted by: El Forum - 08-31-2008, 03:19 PM - No Replies

[eluser]Unknown[/eluser]
I have a couple of classes that I would like to use but originally I didnt write. Its well designed but Its an extremely long file with display functionality thats usefull but should for me really be optional and functions I do need.

Its fairly easy to strip out the display stuff into a seperate class that extends the first, but the problem remains the remaining code is still long and challenging for debugging.

I was hoping to simply split the class into sections by function ie dml, ddl etc and include theses files back into the class.

However it appears php wont allow. Do any of you more experienced OO php developers have any advice on how to 'kludge' err simulate this until I do have the time to refactor the code into smaller utility classes.

Thank you


  View file extension php; can it be html?
Posted by: El Forum - 08-31-2008, 02:43 PM - Replies (5)

[eluser]JP_Notts[/eluser]
Is there a way that I can use html for the file extension to view files?
I ask because it would be nice to be able to use my normal html editors (dreamweaver, expressions, html-kit etc) to develop the view files. As you may know many php ide's such as NuSphere's PhpED IDE can display & develop php & html code within the same editor, dreamweaver can be set up to recognise most coding syntax's within it's ide.

Some purists may just say use a text editor, but it would be nice to develop view files along side css etc within html/php ide's

Any suggestions / help appreciated.


I should declare that I'm new to CodeIgnighter so my apologies if my query is a little basic.

Regards.

Jonathan Parker


  Creating an API
Posted by: El Forum - 08-31-2008, 02:11 PM - Replies (6)

[eluser]dmorin[/eluser]
I'm starting to add an API to my CI site and I wanted to ask the community if they have any advice. So specific things I'm wondering:

Does anyone have a hack to get CI to ignore the querystring part of the url and just route based on the url before the "?"? I would like to be able to pass parameters through the querystring but in my experience it completely screws up the routing. This is one place I would love to see CI improve. (contrary to CI belief, $_GET is not the root of all evil ;-) )

Other apis I've seen have used a fake filetype syntax to indicate the type of output they would like to receive (ex: user.json versus user.xml). I'm assuming this is possible through routing, but if anyone has anything specific, please share!

Any other best practices or things you like/dislike about other APIs? Thanks in advance!


  typo in docs?
Posted by: El Forum - 08-31-2008, 01:33 PM - No Replies

[eluser]mick_sp[/eluser]
Hi

I'm trying to use the html-helper img() function.
In the documentation it says:

Quote:Lets you create HTML <img /> tags. The first parameter contains the image source. There is data, the second the size of the heading. Example:....

I'm not sure what is meant with the blue bits, or is it a typo?
( can you tell english is not my native language ;-) )

BTW: i can't get it to work, is this function maybe broken in CI 1.5.2?
Code:
$image_properties = array(
          'src' => base_url().'resources/beeld/blank.gif',
          'alt' => 'bericht_plaatje',
          'width' => '20',
          'height' => '20',
          'title' => 'plaatje bij bericht'
                );
//    echo img(base_url().'resources/beeld/blank.gif');
as soon as i let the echo statement in there, the code breaks without an error message (i use E_ALL)

grtz
Michael


  Incrementing a counter in the database
Posted by: El Forum - 08-31-2008, 01:28 PM - Replies (17)

[eluser]CI Simon[/eluser]
I'm having a problem with a function that needs to update a counter for the records found.

It's working fine on my local development machine but fails to update on the live server.

Can anyone give me an idea of where i've gone wrong.

Thanks,
Simon

Code:
function getAdvertiserEmailList ($region_id, $category_id)
    {
        $this->db->select('*');
        $this->db->from('fq_company');
        $this->db->join('fq_company_category', 'company_id = fq_company.id');
        $this->db->where('region_id', $region_id);
        $this->db->where('category_id', $category_id);
        $query = $this->db->get();

        $advertiser_id_array = array();
        $output = "";
        
        //Check if any companys are found
        if ($query->num_rows() > 0) {

            foreach ($query->result() as $advertisers) {
                
                    $advertiser_id_array[] = $advertisers->id;
    
                    $output .= $advertisers->company_email;
                    $output .= ", ";
                }
            
            $output = substr ($output, 0, -2);
            
            // Update company_count for emailed companies
            $this->db->set('company_count', 'company_count + 1', FALSE);
            $this->db->where_in('id', $advertiser_id_array);
            $query = $this->db->update('fq_company');
        
        }
        
        return $output;
    }


  using helpers outside the systems folder
Posted by: El Forum - 08-31-2008, 10:33 AM - Replies (3)

[eluser]Philipp Datz[/eluser]
hello, maybe an easy question, but i didn't find a way to handle it, neither in the userguide nor in the forums.
the structure of my application looks like this:

application
assets
system

application outside the system.
assets for js/img/etc.
and system.

im storing my js files, in that case mootools-functions and stuff in assets/js, but want to use the uri-helper for the url in the ajax requests. is there a proper way to include/load the helpers in that place?


  Calling all CI developers... interested in developing a tutorial?
Posted by: El Forum - 08-31-2008, 09:45 AM - Replies (18)

[eluser]mrtopher[/eluser]
I've had this idea in my head now for a while and I thought the best way to get it out would be to check with others to see if it's really a good idea or not.

With the new version of CI and EE on the horizon I have been thinking that it would be cool if a bunch of developers from the community came together and wrote a kick ass tutorial series. For those of you who have looked around at other frameworks, Symfony (http://www.symfony-project.org/) did it with Askeet but I don't think their community was involved. Derek Allard did something similar with BambooInvoice, but that's not so much a tutorial as an open source app written with CI. I was thinking of putting together something more of a how-to. I think this would be a great way to highlight the CI community and show people how to use CI to build a large scale real world web application. I think it would also generate some good buzz around the framework.

The idea is we would get a group of CI developers together and decide on an app to build. Once we have that we would split up the work and each developer would contribute a piece of the app and a write up explaining what they did. Then as the pieces are completed they will be posted on a site and at the end we should have a pretty nice open source web app with a complete narrative on how it was built.

Since the new version of CI isn't out yet, I wasn't thinking of diving head first into this right away but I wanted to get a discussion started to see if there were any developers interested in participating or if anybody else thought this would be a cool idea.

Something to keep in mind is that the new version of EE is going to be written using CI, so maybe that's all the tutorial people will want. I don't know, I just wanted to see if this idea sparked a discussion.

If you would be interested in participating or would like to see something like this developed, let me know. If you think I'm nuts or have any ideas or suggestions please post those too.


  What happen with this error ?
Posted by: El Forum - 08-31-2008, 09:14 AM - Replies (5)

[eluser]Berserk[/eluser]
Hello, i get this error when i run my code on server, on my localhost i don't get this problem

Code:
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/hahahaha/public_html/test/application/controllers/comments.php:1)

Filename: libraries/Session.php

Line Number: 315
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/hahahaha/public_html/test/application/controllers/comments.php:1)

Filename: helpers/url_helper.php

Line Number: 492

Anyone can tell me some information? Thanks


  uploading more than one file to different paths
Posted by: El Forum - 08-31-2008, 08:22 AM - Replies (1)

[eluser]Unknown[/eluser]
Once the upload lib is loaded, i can't configure it to upload files to another path. We don't have the clear method as in the image lib.

Someone done this already?


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

Username
  

Password
  





Latest Threads
Error / Shield 1.0.3 + Ci...
by kcs
4 hours ago
Defining extra constants ...
by InsiteFX
6 hours ago
Validation | trim causes ...
by Gary
Yesterday, 03:24 PM
Modify users data as an a...
by xsPurX
Yesterday, 01:37 PM
Bug with sessions CI 4.5....
by ALTITUDE_DEV
Yesterday, 06:26 AM
Integrating Bootstrap 5 i...
by Bosborne
Yesterday, 03:20 AM
Asset Minification Packag...
by tarcisiodev1
04-26-2024, 05:11 PM
Is it possible to go back...
by ejimenezo
04-26-2024, 11:49 AM
SQL server connection not...
by davis.lasis
04-26-2024, 07:11 AM
Problem with session hand...
by Julesb
04-26-2024, 04:13 AM

Forum Statistics
» Members: 85,605
» Latest member: Kinh88comco
» Forum threads: 77,587
» Forum posts: 376,041

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB