If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
redirect a user to another page after comment.  XML
Forum Index » Advanced Guestbook Forum
Author Message
john_73
Beginner

Joined: 21/01/2008 15:38:19
Messages: 9
Offline

Hello,

How can I redirect a user to another page if he made a reply (comment) to a subject ?

Thanxs..
John
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

Off the top of my head edit comment.class.php somewhere towards the end of the file.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
john_73
Beginner

Joined: 21/01/2008 15:38:19
Messages: 9
Offline

Thanks so far !!!

But the code makes me ..

Can you help me a bit more...

Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

$this->insert_comment();
header("Location: $GB_PG[index]");

Change $GB_PG[index] to the url you want to take them to.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
john_73
Beginner

Joined: 21/01/2008 15:38:19
Messages: 9
Offline

Hmmm, that doesn't work....

My problem is that is comes up with a empty page after I submit a comment. Proberly I made a mistake someware in the comment.php..
I hoped that I could fixed with a redirection to the index.php
But it doesn't work...

Thanks anyway !!!
john_73
Beginner

Joined: 21/01/2008 15:38:19
Messages: 9
Offline

Hmmm, this irritates me.. .I can't make it work...

Someone a suggestion why this doens't work, or maybe a workarround ??
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

Post your modified code.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
john_73
Beginner

Joined: 21/01/2008 15:38:19
Messages: 9
Offline

oke..here it come....

Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

No I mean your modified comment.class.php showing how you edited the header function,

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
john_73
Beginner

Joined: 21/01/2008 15:38:19
Messages: 9
Offline

oke, here it is :

Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

You changed the wrong one. You wanted to edit

if ($status == 1) {
$this->insert_comment();
header("Location: $GB_PG[index]");
} else {

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
john_73
Beginner

Joined: 21/01/2008 15:38:19
Messages: 9
Offline

GRRRRRR...it still doesn't work...
It submits the comment, but I get a empty page back...
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

header("Location:http://intranet.pol.index.php");

For a start you need a space between the Location: and http://

next is http://intranet.pol.index.php a valid address on your system?

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
john_73
Beginner

Joined: 21/01/2008 15:38:19
Messages: 9
Offline

no, this is the test system, the actual site is on internet..
http://www.frahollandtilnorge.info/gbook/index.php

If you give a comment on test, you can see what is happening..
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

I will look at the headers when I get home. Email me your comment.class.php file.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
 
Forum Index » Advanced Guestbook Forum
Go to:   
Based on the open source JForum