CodeIgniter Forums
CI & VB is integrated, but cookie / session problem when posting in forum - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: CI & VB is integrated, but cookie / session problem when posting in forum (/thread-56615.html)



CI & VB is integrated, but cookie / session problem when posting in forum - El Forum - 01-07-2013

[eluser]Swedie[/eluser]
I have combined CI and vBulletin (4).
CI instance is fetched in a plugin that hooks to the global.php file.
CI adds / modifies the header and footer to set the correct layout.
All that works as wanted.

But when posting for example a new thread, CI kills something inside vBulletin.
It works for doing replies via the ajax method (quick reply). But not full page replies.

CI goes in and does something with the variables that are being posted.
Leaving me with a vBulletin message saying I don't have the right to post anything!

It is something with either vB or CI's CSRF protection, I guess.
Or, CI kills global setting variables for vBulletin.

As soon as I disable CI, vBulletin works as it should.

I need to resolve this ASAP as it's an active community with thousands of users... waiting right now to post again! Smile


CI & VB is integrated, but cookie / session problem when posting in forum - El Forum - 01-07-2013

[eluser]Swedie[/eluser]
Using get_defined_vars() I can see that CI modified the $GLOBALS object severely.

Can I somehow store all $GLOBALS variables before I load CI and then restore again once CI is done?

Hope someone here can help me out!


CI & VB is integrated, but cookie / session problem when posting in forum - El Forum - 01-07-2013

[eluser]Swedie[/eluser]
Found that it comes down to $threadif (and other) variables simply are missing after CI has loaded.

Can I somehow ensure CI is not killing any existing variables?

//EDIT: it only kills $_POST values.


CI & VB is integrated, but cookie / session problem when posting in forum - El Forum - 01-07-2013

[eluser]Swedie[/eluser]
Had to override the core security function when inside vBulletin. That solved the issue

Case closed, close thread or delete it.


CI & VB is integrated, but cookie / session problem when posting in forum - El Forum - 01-07-2013

[eluser]bigbusty[/eluser]
seems like you helped yourself.