Welcome Guest, Not a member yet? Register   Sign In
  Mixing query strings and CI URLs (redirect from external host)
Posted by: El Forum - 08-11-2007, 02:09 AM - No Replies

[eluser]dfau[/eluser]
I am working on a project where I need to redirect the users' browser to a site that uses query string URLs. My site is using CI URLs. The redirection away to the remote site is not an issue, the problem is when the remote site sends the browser back to my site - the remote site must send information back with the URL in the form of the query string. Variables from the remote site must come back as a query string (ie. no POST allowed). I also have no control over the external site other than the return URL.

This is not a huge problem; I can get around the issue by ensuring the redirection from the remote site to my site is to a non-CI page whose job is to take the URL, parse the query string into a CI equivalent, and then redirect to a CI page.

I was just wondering if anyone has come across this issue before, or if there is a more elegant solution.

Many thanks,
Cheers,
df


  Default URI Routing Behaviour
Posted by: El Forum - 08-11-2007, 01:26 AM - No Replies

[eluser]deand[/eluser]
Hi all,

I want to "disable" the implicit routing behaviour (i.e. www.your-site.com/class/function/ID) and the access to the controllers/methods to be only by explicit URI routing and no other way.

For example, if I have "welcome" to be the default controller I want it to be accessible only at www.your-site.com/ and not at www.your-site.com/welcome. The same goes for the other controllers.

Does anyone have an idea how it can be achieved?

In Symfony this default behaviour is made as a pre-configured routing rule (the last one) which can be changed easily. Is it possible something similar in CodeIgniter?

All suggestions are welcome. Thanks in advance!


  How to repopulate check box group?
Posted by: El Forum - 08-10-2007, 09:29 PM - No Replies

[eluser]chobo[/eluser]
I've searched around, but I couldn't find a good answer to repopulating check boxes. I have some validation rules on text fields, but the user also has the option to check some check boxes (There are no validation rules on the check boxes).

If the user fills in the text fields erroneously I would like the state of the check boxes to be kept, so they don't have to refill those in when validation on the text fields fails. I'm using a check box group, so my checkbox name is something like checkbox_name[]. I've tried using $this->validation->set_checkbox('checkbox_name[]', 1), but it doesn't seem to do anything.


  Breaking the MVC convention, I think
Posted by: El Forum - 08-10-2007, 08:55 PM - No Replies

[eluser]stevefink[/eluser]
Hi all,

I just realized I"m working on a simple application where I'm completely breaking the MVC convention. I keep doing everything using just controller/view, but lack models. I'm certain my views are okay as they're all just markup and have a few foreach clauses using very light PHP. Can anyone take a look at this controller class and tell me if any of it belongs in the model according to good practices?

---

<?php

class Meduser extends Controller {

// db resource handlers
private $db_users;
private $db_notes;

function Meduser()
{
parent::Controller();
$this->db_users = $this->load->database('medusers', TRUE);
$this->db_notes = $this->load->database('mednotes', TRUE);
}

function index()
{
// load view.
$this->load->view('default/meduser_view');
}

function check_pending_users()
{
// retrieve all records.
$data['query'] = $this->db_users->query('select * from tbl_signups
where hostname = \'\''
);

// view for pending users container div.
$this->load->view('default/meduser_pu_view', $data);
}
}

?>

--

Thank you kindly.


  Using tabbed style view in code igniter
Posted by: El Forum - 08-10-2007, 06:25 PM - No Replies

[eluser]stevefink[/eluser]
Hi all!

I'm excited to say that I decided to use code igniter as my framework for an auto site I'm putting together for a client. I've also got their permission to submit it to the projects tab when the site is completed.

I have a quick inquiry. I currently have tabs made using CSS where the user goes through a process of registering a vehicle. Once they fill out one tab, they're allowed to navigate to the next.

I'd like them to be able to accomplish this without refreshing the page, so I'm going to ultimately have to use some XmlHttpRequest in my javascript.

Would anyone be kind enough to give me insight on how to handle the control/view part of this code with code igniter? I'm guessing I'll need four different views for four tabs even though they're all going to be presented in the same page?

Thanks for any insight, can't wait to show you folks the final product.

- sf


  [removed] why use .js instead of .txt?
Posted by: El Forum - 08-10-2007, 05:51 PM - No Replies

[eluser]Unknown[/eluser]
With respect to refering to an external javascript, is there any reason why use of .js is better than the .txt when both seem to work?


  rapyd library 0.9.8 released
Posted by: El Forum - 08-10-2007, 02:24 PM - No Replies

[eluser]Felice Ostuni[/eluser]
Hi,

rapyd 0.9.8 (for CI 1.5.4) is ready

changelog
http://www.rapyd.com/rapyd_guide/changelog.html


Many thanks to all for suggestions, help and contributions
We are now on a new host, with a new website, new trac/svn environment
http://www.rapyd.com

Thanks to Thierry for a lot of new stuffs and improvements.
Also to heretique for suggestions about dataobject & ci models (they will be implemented in the next release)

I've plan to rebuild all to be more in standard with CI and give the ability to extend rapyd components too, so after the 1.0 I hope that all can be more elegant and simple.


Bye
Felix


  File uploads: check if any uploaded and specify filename
Posted by: El Forum - 08-10-2007, 12:52 PM - No Replies

[eluser]Martin Penev[/eluser]
Hi there,
I'm on a upload form that should upload a file, but there are some things I haven't found yet:

1) How can I check, if a file has been uploaded? (Important if I want to program a
mandatory upload field)
2) How can I specify a filename which will be used as a filename after upload?


Have checked the user guide, but couldn't find any answer.

Thanks for your help in advance.

Martin


  url title
Posted by: El Forum - 08-10-2007, 10:50 AM - No Replies

[eluser]wemago[/eluser]
is there any function / helper that
makes a string like this safe for url?

$string = 'André Começa Agrão';

if i save it using url_title() it will
kill the letters e,c and a...i'll get something
like this 'andr comea agro'.

my question is if exists a function to convert those
letters to normal letters, safe for url title.

thanx Smile


  cant modify headers with FCKeditor
Posted by: El Forum - 08-10-2007, 09:43 AM - No Replies

[eluser]matt2012[/eluser]
Im getting this

Code:
Message: Cannot modify header information - headers already sent by (output started at /home/ukmental/public_html/system/application/libraries/Fckeditor.php:123)

Filename: controllers/admin.php

Line Number: 134

when I try to redirect in the controller after updating a post,

I know this is normally about blank lines but I can find any.


Here is the controller,

Code:
//nothing before or after tags on this page
function edit_service_3()
    {        
        //stuff here        
        if ($this->validation->run() == FALSE)
        {
            $data['query']= $this->Servicemodel->get_service('3_dir3', $id);
            $data['id'] = $id;
            $data['content'] = 'admin/edit_service_3';
            $this->load->view('MyViews/container2', $data);
        }
        else
        {        
            $this->Servicemodel->update_service('3_dir3', $id);
        redirect('/admin/edit_service_4/'.$id, 'refresh');
        }    
    }


the error is giving the last line of the FCK library but there are no blank spaces
before or after the tags there either.

:-S


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

Username
  

Password
  





Latest Threads
Validation does not appea...
by Tokioshy
16 minutes ago
Block IP addresses of bad...
by luckmoshy
7 hours ago
The Hidden Cost of “Innov...
by LordKaos
10 hours ago
Best Way to Implement Aff...
by InsiteFX
06-28-2025, 09:35 PM
Unable to scroll left nav...
by Crenel
06-28-2025, 07:58 PM
After GIT Clone: Call to ...
by paulbalandan
06-28-2025, 02:49 AM
I want to install the CI ...
by InsiteFX
06-27-2025, 03:12 AM
HTML6 and CSS5: What's ne...
by HarryKDowns
06-26-2025, 09:08 PM
Installation & Setup on W...
by mohamedtg
06-26-2025, 04:18 AM
Server Push/preloading?
by sanjay210
06-25-2025, 09:38 PM

Forum Statistics
» Members: 154,133
» Latest member: captureatrip482
» Forum threads: 78,433
» Forum posts: 379,683

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB