[Geniously Solved] Redirection to Forum Index

Support for IntegraMOD 141

Moderator: Integra Moderator

[Geniously Solved] Redirection to Forum Index

PostAuthor: spaniel » Mon Jan 28, 2008 8:55 pm

After joining a group how do I stop it redirecting to the forum index?

Surely it makes sense that if you're busy joining/checking out the groups that if ur automatically redirected anywhere, it should be back to the groups main page? Or am i thinking laterally again? :)
Last edited by spaniel on Tue Jan 29, 2008 6:00 pm, edited 1 time in total.

spaniel
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 26, 2006 4:29 pm
Cash on hand: 0.00

Re: [No1 Complaint] Redirection to Forum Index

PostAuthor: DjPorkchop » Mon Jan 28, 2008 9:58 pm

I believe you could find that text in your language folder. BUT Im also quite sure Im not correct. I tried to change some info like that once and was told it was in the database somewhere. <img> Im curiously waiting for a reply on this as well.
Last edited by DjPorkchop on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
"Don't gain the world and lose your soul, wisdom is better than silver and gold" -Bob Marley

If you build it, I can break it! ~ Whispered in the tone of the movie Field of Dreams.
User avatar
DjPorkchop
Administrator
Administrator
 
Posts: 1593
Likes: 136 posts
Liked in: 26 posts
Images: 12
Joined: Fri Apr 21, 2006 7:59 pm
Cash on hand: 1,575.25
Location: Illinois
IntegraMOD version: phpBB2x

PostAuthor: spaniel » Mon Jan 28, 2008 10:12 pm

the redirect to the forum index is annoying if ur not quick enough to click to go back to the group.

interestingly when u send a pvt msg, it redirects u automatically to your inbox.

why can't groups redirect us to groups? lol.
Last edited by spaniel on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

spaniel
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 26, 2006 4:29 pm
Cash on hand: 0.00

PostAuthor: tmotley » Tue Jan 29, 2008 2:56 pm

'Your request has been approved.' comes from lang_groupcp.php
Code: Select all
$lang['Group_approved'] = 'Your request has been approved.';  


'Click here to return to the group.' comes from lang_main.php
Code: Select all
$lang['Click_return_group'] = 'Click %sHere%s to return to group information';  


'Click here to return to main index.' comes from lang_main.php as well
Code: Select all
$lang['Click_return_index'] = 'Click %sHere%s to return to the Index';  


That little section of code is generated in groupcp.php
Code: Select all
$message = $lang['Group_approved'] . '<br><br>' . sprintf($lang['Click_return_group'], '<a>', '</a>') . '<br><br>' . sprintf($lang['Click_return_index'], '<a>', '</a>');  


I don't understand the code even remotely enough to change the redirect...
Last edited by tmotley on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
tmotley
IntegraMODerators
IntegraMODerators
 
Posts: 524
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 3:56 am
Cash on hand: 0.00
Location: Missouri, USA

PostAuthor: spaniel » Tue Jan 29, 2008 3:03 pm

But great that you found the source. I'm too scared to change it even slightly without a coder's ok - past experience has taught me never to go near php with my eyes closed lol.

I am tempted tho ... i mean, if there's a php code redirect to index.php, surely changing that to groupcp.php can't cause too much damage, can it?

But I don't know where the redirect code is to test it out.
Last edited by spaniel on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

spaniel
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 26, 2006 4:29 pm
Cash on hand: 0.00

Re: [No1 Complaint] Redirection to Forum Index

PostAuthor: tmotley » Tue Jan 29, 2008 4:32 pm

Hey, I actually tinkered with it a bit and it's as easy as pie!

Right before those confirmation screens within groupcp.php there are meta refreshes that redirect to the index in most cases. I don't know what all screens you'd want changed but it's easy to find.

Open groupcp.php within a quality text edit (I use Crimson Editor) and find sprintf

That word (whatever it means) is in the code for every confirmation screen. Just a two or three lines above the line with sprintf in it lies the meta refresh redirect. Change index to groupcp in that refresh line. I tested and it works on my site.

For example, the first sprintf it finds in my groupcp.php is on line 193... You can tell by the 'Group_approved' at the beginning that this is the one you are specifically talking about. On line 190 is this line]'META' => '<meta>')  [/code]

INLINE FIND: index
INLINE REPLACE: groupcp
SAVE

There are numerous confirm screen code sections just like that that you may want to redirect back to the groupcp also. I just keep hitting F3 to find the next sprintf...

Good luck!
Last edited by tmotley on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
tmotley
IntegraMODerators
IntegraMODerators
 
Posts: 524
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 3:56 am
Cash on hand: 0.00
Location: Missouri, USA

Re: [No1 Complaint] Redirection to Forum Index

PostAuthor: DjPorkchop » Tue Jan 29, 2008 5:02 pm

So I was halfway correct. Atleast it was a start :wink:
Last edited by DjPorkchop on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
"Don't gain the world and lose your soul, wisdom is better than silver and gold" -Bob Marley

If you build it, I can break it! ~ Whispered in the tone of the movie Field of Dreams.
User avatar
DjPorkchop
Administrator
Administrator
 
Posts: 1593
Likes: 136 posts
Liked in: 26 posts
Images: 12
Joined: Fri Apr 21, 2006 7:59 pm
Cash on hand: 1,575.25
Location: Illinois
IntegraMOD version: phpBB2x

PostAuthor: spaniel » Tue Jan 29, 2008 5:59 pm

Tmotley, you're a genius! It works perfectly. I also redirected the unsubscribe function back to groupcp.php, the META for that I found on line 300 on mine.

Many many thanks Tmotley <img>
Last edited by spaniel on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

spaniel
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 26, 2006 4:29 pm
Cash on hand: 0.00


Return to IntegraMOD 141

Who is online

Registered users: App360MonitorBot, Bing [Bot], Google [Bot]