PDA

View Full Version : Redirections?



Carnage
08-18-2004, 05:25 PM
So what with the update. Will you take care of the redirecion thingy?
Patiek?

Patrick
08-19-2004, 02:25 PM
As in when you are logged in and redirected to the CMS instead of the forums? No, that would be a different hack. You can probably find one similar to that somewhere on invisionize.com or something.

As for the update in general, I updated the script a while ago to work with IPB. Unfortunately, my personal computer has been acting up lately and I have not had the chance to fix it. I may post the IPB 2.0 support version as a beta (or more correctly alpha) in a bit, but it will not be tested at all if I do.

Carnage
08-19-2004, 03:39 PM
Post it i can test it for you :)

BrainDamage
09-04-2004, 01:02 AM
Hello Patiek,

I've been trying to find where to comment the line that does the redirection from e107 to invision at login and logout but I couldn't find it !!!

Can you give me a clue ?

Patrick
09-06-2004, 10:40 AM
Hello Patiek,

I've been trying to find where to comment the line that does the redirection from e107 to invision at login and logout but I couldn't find it !!!

Can you give me a clue ?
This may or may not work. You may also have to modify the modification.

But you can try:

1. Opening the e107 class file in classes/
2. Finding "function Redirect($type, $link)"
3. Modifying / inserting new case statements corresponding to "login" and "logout" (logout should already be there).

You should put something like this:


case "login" :
return 0;


I am not sure how well that will work, it really depends on the modifications made more than anything. Like I said, there is probably more involved. The redirection is an essential part of the script as it is in the forum script that the user is logged in / logged out of BOTH e107 and the forums. Still, you can try the above and if that doesn't work try messing with the install at the end of the class (if you look closely you can see clearly which files are being modified where and with what new code).

BrainDamage
09-06-2004, 07:17 PM
I tried that but no changes were made !! :huh:

I followed the redirection process, and found a variable with a link to the forum.
Can we create a variable for e107 to redirect to and another for the forum ??

So every system would login and stand still !

I know it's such a pain... :D But please... i'm sure many people would appreciate that feature !!!!

Patrick
09-06-2004, 08:29 PM
I tried that but no changes were made !! :huh:

I followed the redirection process, and found a variable with a link to the forum.
Can we create a variable for e107 to redirect to and another for the forum ??

So every system would login and stand still !

I know it's such a pain... :D But please... i'm sure many people would appreciate that feature !!!!
Right now the script is set to work with multiple forum and CMS scripts (not just e107, phpnuke, and invisionboard).

The current redirection is setup in such a way that both the forum and the CMS classes get a chance to have their say in the redirection.

Meaning a redirect can perform much more than a redirect, as the forum class can do what it needs to and the CMS can do what it needs to before the redirect. This works out great as some CMS and some forum software requires some actions (such as figuring out some id or clearing a cookie).

That is how the script is currently setup to work. While people may dislike some of the redirections, they can always revert the changes to just the specific modified files.

As far as redirecting from the forum back to the CMS, that can be done in another simple hack. If it were me I would just trace the login function in the forum script and redirect it once it was done verifying the login.

BrainDamage
09-11-2004, 04:50 AM
:blink: Is it possible to redirect it back to where it was in e107 ?????

Example :

I'm on download.php ! I log in...

I get redirected to forum

Then get redirected again to download.php

B) If yes what code to insert and where ?

;) Thanks Patiek

Patrick
09-12-2004, 01:21 AM
You could probably use javascript to redirect based on browser history. I don't think there are any other options because I am betting that IPB strips out globals that do not belong to it (so passing in an extra variable would probably fail).

Otherwise, your could always add in $_SERVER['PHP_SELF'] to a variable to be submitted, then try to call on it via $_POST['variable_name'] inside IPB to redirect back to previous page.

For example, with <form> login tags you could have <input hidden="redirect_to" value="<? echo $_SERVER['PHP_SELF']; ?>">

And then in IPB do something like the following after user has been logged in:
<?
header("Location: " . $_POST['PHP_SELF']);
?>

Either the javascript or the POST variable would be the method I would take. Alternatively, if you had sessions enabled on the CMS site then you could use $_SESSION and not worry about passing in variables.

BrainDamage
09-16-2004, 01:44 PM
:huh: not working for me..... :(

I'll give it another try tomorrow... cause I try one more thing and the computer screen gets off the window :angry: