Welcome Guest, Not a member yet? Register   Sign In
New to CI, how to extend Libraries and helpers?
#1

[eluser]timbojones[/eluser]
Hi guys and girls,

New to CI, enjoying it and getting through much of it with topics found of this forum and in the documentation. But I've got a question:

The pagination library has a bug, where the links to "First" and "1" have trailing slashes in the URL. I know I could fix this with a .htaccess mod rewrite, but this results in an extra http request and stuff like that, seems an overkill for something that can be fixed with a simple rtrim() php function.

But, my OOP isn't crash hot, how would I go about extending the library (I don't want to hack at the core, any CI updates later would override my changes) and actually make those changes? I've managed to do it in the core, but as mentioned I don't want to do it there and am at a loss as to how to do it via a class extension. If I make my own library, extending the core library, and call it's method, wont I just end up with the resulting html string for the pagination links? (making it much harder to do the simple rtrim())?

Similar thing, but with the smiley helper. I'd much prefer to use an image sprite and css classes (reducing 40 http requests for the 40 smiley images into 1!!!). But a helper isn't a class, so is my only option here to copy the smiley file, paste it into my own helper and hack to code to suit my purposes?

Thanks, hope that all makes sense, hoping someone can point me in the right direction


Messages In This Thread
New to CI, how to extend Libraries and helpers? - by El Forum - 06-05-2012, 01:00 PM
New to CI, how to extend Libraries and helpers? - by El Forum - 06-05-2012, 01:05 PM
New to CI, how to extend Libraries and helpers? - by El Forum - 06-05-2012, 01:08 PM
New to CI, how to extend Libraries and helpers? - by El Forum - 06-05-2012, 01:16 PM
New to CI, how to extend Libraries and helpers? - by El Forum - 06-05-2012, 01:23 PM
New to CI, how to extend Libraries and helpers? - by El Forum - 06-05-2012, 01:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB