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

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 11,514
» Latest member: doc
» Forum threads: 67,919
» Forum posts: 424,100

Full Statistics

Latest Threads
Ajax forbidden 403
Forum: Installation & Setup
59 minutes ago
» Replies: 0   » Views: 9
Page title from database
Forum: Best Practices
5 hours ago
» Replies: 1   » Views: 39
PHPTESTOR
Forum: Lounge
9 hours ago
» Replies: 0   » Views: 49
Looking for a good softwa...
Forum: Lounge
9 hours ago
» Replies: 0   » Views: 46
Uploadin Codeigniter 3 HM...
Forum: Installation & Setup
10 hours ago
» Replies: 2   » Views: 89
Image convert into base64...
Forum: Best Practices
10 hours ago
» Replies: 6   » Views: 167
Query String Support for ...
Forum: CodeIgniter 4 Feature Requests
10 hours ago
» Replies: 0   » Views: 16
Is calling models from ot...
Forum: Best Practices
11 hours ago
» Replies: 5   » Views: 116
Seeking Contract Telecomm...
Forum: Jobs
11 hours ago
» Replies: 6   » Views: 142
codeigniter3 + adminlte +...
Forum: Spotlight
Today, 05:01 AM
» Replies: 4   » Views: 6,306

 
  session destroyed by anchor!
Posted by: El Forum - 08-17-2007, 09:12 AM - Forum: Archived General Discussion - Replies (6)

[eluser]ph1k3l3d[/eluser]
Hello,

My first time, but I am not shy.

Straight to my issue, I have a session (CI session with DB) that holds data from a multi-page form.

All is well unless I put an <a href="somesite.com">Link</a> into the session. (Part of the form is to allow text and links).

If I have a peek at the session immediately after writing the link to it, I see it but at the next page, when more data is added all of the previous stuff I put in there has gone and only the new stuff is visible.

I have tried addslashes, htmlentities, htmlspecialchrs and all that good cleaning PHP stuff but I get the same result every time. If I enter just plain text into the form I get right through the process without a grumble.

I have searched the forums for any info but can't seem to find anything relating to this and its friday, I need stress free beer later so I want to get this sorted and get to the pub. Anyone have any ideas?

Cheers


  Routing problem
Posted by: El Forum - 08-17-2007, 03:09 AM - Forum: Archived Development & Programming - Replies (1)

[eluser]Unknown[/eluser]
Hi everyone!

I wanted to simply redirect some url like this:
/welcome/ => /welcome/
/fr/welcome/ => /welcome/
/it/welcome/ => /welcome/
/de/welcome/ => /welcome/

I've added those rules to my routing.php

Code:
$route['^fr/(.+)$'] = "$1";
$route['^it/(.+)$'] = "$1";
$route['^de/(.+)$'] = "$1";

It works great with 'it' and 'de' but it doesn't work with 'fr'.... Any idea?

Ben


  Using log4php with code igniter
Posted by: El Forum - 08-16-2007, 10:28 PM - Forum: Archived Development & Programming - Replies (1)

[eluser]mazaka[/eluser]
Hi all!

Its the first project I am using CI in, and I like it a lot.

My question tho: On every page request I want a log entry to be written with a handful of variables, such at timestamp, useragent, pageId etc. This is all for statistics reasons, on the live system. not debugging.

Has anyone used the log4php project for this, and where would the the best integreation point be? I started out by including it at the very top of my main layout view, but now I think I should move it to the general controller if possible.

cheers.

Any good loggin ideas are welcome!


  Using the Logging class
Posted by: El Forum - 08-16-2007, 06:11 PM - Forum: Archived Development & Programming - No Replies

[eluser]stevefink[/eluser]
Hi all,

I'm having difficulty converting an object to an array so that I can json_encode it. Is there anyway I can use log_message to determine if the following data construct is an object or array?

$data['models'] = $this->autodb->get_models($make_val);

Do I need to throw something like this into my controller:

Code:
if ( is_object( $data['models'] ) )
{
    log_message('info', "message here?");
}

I'm sure the above is an object, because my error logs tell me json_encode can't properly handle it. But I'd like to be able to utilize the logging class to help me debug in the future.

Thanks!


  Making data array available for all functions in the same controller
Posted by: El Forum - 08-16-2007, 04:08 PM - Forum: Archived General Discussion - Replies (7)

[eluser]millo[/eluser]
Hi,

I hope I'm not asking a silly question here.

I've got a controller and within it I have many functions, each of which have to load in the same data arrays that are used for building the navigation menu.

So for example, in my simple page function in the main.php controller you'll see how I load in the lines 4 and 5 which are used for the menu construction:

Code:
function page() {
    $this->load->helper('markdown');
    // all_sections_query and page_list_query used for constructing menu
    $data['all_sections_query'] = $this->Section_model->get_all_sections();
    $data['page_list_query'] = $this->Page_model->get_page_list();
    // load main content
    $page_id = $this->uri->segment(3);
    $data['page_contents_query'] = $this->Page_model->get_page_contents($page_id);
    $this->load->view('main/page', $data);
}

Rather than have to instantiate them in every function, is there a way to instantiate them globally for the whole controller since they are used in every function anyway?


  CI Determines there is a Valid Cache File, and Exits Early?
Posted by: El Forum - 08-16-2007, 03:20 PM - Forum: Archived Development & Programming - Replies (4)

[eluser]Vik[/eluser]
I'm a CI newbie. I have a text input form with a submit button that submits to a function called "search."

It appears that the first time I run it, the data is submitted to my search function correctly.

But after that, the following code in CodeIgniter.php, determines that there is a valid cache file, and exits, so that my search function isn't called:

Code:
* ------------------------------------------------------
*    Is there a valid cache file?  If so, we're done...
* ------------------------------------------------------
*/

if ($EXT->_call_hook('cache_override') === FALSE)
{
    if ($OUT->_display_cache($CFG, $RTR) == TRUE)
    {
        exit;
    }
}

What can I look into in order to fix this? Thanks in advance to all for any info.


  Separation of logic versus content inquiry
Posted by: El Forum - 08-16-2007, 02:57 PM - Forum: Archived Development & Programming - Replies (3)

[eluser]stevefink[/eluser]
So just wanted to hear out from the experts how they'd normally go about their everyday life with CI/MVC in general for the following.

I'm populating an initial select box upon load based on information from a database. The actual query I'm putting into an (optional) model, and handing the results back to the controller.

My question is, where would most of you build your HTML string together? Would you dump it into the Model or Controller? Perhaps even the view using a simple foreach construct?

It might sound silly, I just wish to follow 'best practices' and see how the experts do it.

Thanks all!


  Select multiple not working with Validation class
Posted by: El Forum - 08-16-2007, 01:50 PM - Forum: Archived Development & Programming - Replies (1)

[eluser]zdknudsen[/eluser]
If you use the validation class with a multiple select-box it only marks one of the selected options as selected.


  Documentation in .pdf format
Posted by: El Forum - 08-16-2007, 12:25 PM - Forum: Archived General Discussion - Replies (21)

[eluser]StormStrikes[/eluser]
Hello everyone. I went to the user guide section and ultimately printed out everything there which took some time and left me with about a 500 page manual it seems.

Ive never been a fan of the trend of online documentation and foregoing portable formats such as .pdf, .doc and so forth. I just dont like having to read a web page at the same time Im trying to learn about something like CI. At any rate, with that said, is there a .pdf version of the user guide? Something I can download and save to a memory stick or do a double sided print out of? Thanks.


  Image Upload
Posted by: El Forum - 08-16-2007, 11:01 AM - Forum: Archived Development & Programming - Replies (12)

[eluser]MMCCQQ[/eluser]
hi im workin in a proyect with CI. i dont know how upload a image to a Folder.

i need to know how create a Folder with CI
ex:

image/username/username.jpg

image/MMCCQQ/MMCCQQ.jpg



  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.