Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Using Disqus with Codeigniter
#6

[eluser]simonmaddox[/eluser]
Quote:Why? What does this mean? I guess what you’re saying is if I want to manually add a “?Iheartponies=0” to the end of one of your urls, you want the request to get sent through your special controller and ultimately break rather than continuing along to the correct controller/method?

Well, no. What we've done is a little more complicated than what I posted. Wink

Obviously you'll only be interfacing with external services that you actually know about and have to support in your code anyway (Facebook, Google, Disqus, payment gateways you've chosen), and in this case a "disqus_reply" GET variable would only refer to /blog/comments (or something) so it's fairly simple to build logic around it. Not knowing Disqus outside of installing the plugin on Wordpress, it's quite tricky to explain in this context.

EDIT: And, if it's not a valid query string according to our checks, it'll ignore it and let you right in and do the usual CodeIgniter thing of pretending it doesn't exist.

Again, it's personal preference - but by forcing yourself to use CodeIgniter's filtered values instead, you reduce the risk that you'll accidentally introduce an SQL injection hole.

It's pretty simple, by the way, to extend the Router class to take a GET key/value and turn it into a CodeIgniter friendly URL to be passed into the controller (do it in the _validate_request() method).

Yes, I agree that it's a pain in the arse that CI doesn't let you use the GET vars by default, but so far it hasn't caused us too much trouble (but we only integrate with a single external service in this way).


Messages In This Thread
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-06-2009, 11:31 AM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-06-2009, 03:59 PM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-06-2009, 05:49 PM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-06-2009, 06:11 PM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-06-2009, 06:32 PM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-06-2009, 06:56 PM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-06-2009, 07:14 PM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-07-2009, 07:03 AM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-07-2009, 07:18 AM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-07-2009, 01:39 PM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-07-2009, 05:05 PM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-07-2009, 05:37 PM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-13-2009, 02:25 PM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-13-2009, 02:28 PM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-13-2009, 03:13 PM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-13-2009, 04:03 PM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-13-2009, 04:33 PM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-13-2009, 04:40 PM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 01-13-2009, 04:46 PM
[SOLVED] Using Disqus with Codeigniter - by El Forum - 02-10-2009, 09:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB