CodeIgniter Forums
CodeIgniter with Thickbox - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: CodeIgniter with Thickbox (/showthread.php?tid=13676)



CodeIgniter with Thickbox - El Forum - 12-02-2008

[eluser]Unknown[/eluser]
Hi guys i newbie using CI, and I have a question about the jQuery thickbox plugin.

I am trying to combine href link with thickbox, and I haved trouble in here.


Code:
<a id="example" class="thickbox" href="&lt;?= site_url('example/');?&gt;">example</a>
and for thickbox function it must add : ?keepThis=true&TB_iframe=true&height=250&width=400 in behind the href link, and cause of this I get error message : 404 Page Not Found.

my question :

1. What I must doing to fix this error ? please describe step by step about the solution
until fix it.

Please help me, It would be a great contribution


CodeIgniter with Thickbox - El Forum - 12-02-2008

[eluser]Phil Sturgeon[/eluser]
If you put the query string into the site_url() function then CI will try to parse it as URL segments, which will fail.

Try the link like this:

Code:
<a id="example" class="thickbox" href="&lt;?= site_url('example');?&gt;?keepThis=true&amp;TB_iframe=true&amp;height=250&amp;width=400">example</a>



CodeIgniter with Thickbox - El Forum - 12-02-2008

[eluser]xwero[/eluser]
This will still give an error because the only thing you did is put the query string outside the site_url function. The url isn't changed.

set enable_query_string to TRUE and uri_protocol to PATH_INFO this gives you the possibility to add query_strings and still get the page.

IMO adding javascript component metadata to an url is not a good way to go but that means you have to find another lightbox plugin.


CodeIgniter with Thickbox - El Forum - 12-02-2008

[eluser]sikkle[/eluser]
xwero, any suggestion ?

thanks!


CodeIgniter with Thickbox - El Forum - 12-02-2008

[eluser]xwero[/eluser]
The lightbox plugin i use is jqModal because it is light but it has no features like getting a gallery based on links or modal animation. Just check Plugins: Windows and Overlays on the jquery site for a plugin you like the best.


CodeIgniter with Thickbox - El Forum - 12-02-2008

[eluser]sikkle[/eluser]
xwero : still efficient you are Smile

see ya around