Recent Topics

1 Mar 03, 2006 01:42    

Hi all I there is one thing I'm wondering about since a long time ago.
I would like to be able to go back to the main (index.php) page when I'm seeing a full post after clicking "read more" or when I'm seeing the comments of a post.

Yeah, seems easy, but I would like to be on the right page when I come back...

Here is an example: I browse the posts 'til page 3, I leave a comment, and I'd like to go back to the posts list, but on the page where I came from (page 3), (whitout hitting my browser's "back" button).
I've tried to use page & paged variables but they aren't accessible when in 'single' mode, so I put a simple link back to the main page and the comments in a pop-up as a workaround...

Thank you very much for any idea ;)

2 Mar 03, 2006 10:27

What about using Javascript? It's probably not the most elegant solution, but it should work...

Something like this:

<a href="javascript: history.go(-1)">Back</a>

4 Mar 03, 2006 10:59

How about hotlinking the banner back to the homepage? It works for me.

5 Mar 03, 2006 11:02

Hmmm... I don't think linking back to the homepage is what madz is aiming at. He/she wants to link back to the page the user came from. If a user has used the "next" and "previous" buttons to get to another page, and puts a comment there, he should be able return to the page on which he found the entry that he commented on, which is not necessarily the homepage. Right?

6 Mar 03, 2006 11:08

Thanks for the quick answers but that's not exactly what I want to do.

I don't want to use the browser's back button nor javascript to go back because the visitor may have leaved a comment: hitting back would only display the comment form filled with his comment to him...

I've already seen the topic you mention John: the problem is not really when I want the link to appear, rather where the link should link.

What I need is b2evolution to tell me which number was the page the user came from in the posts list to let him go back to that page...

Any more idea?

Thank you in advance & have a nice day all :D

7 Mar 03, 2006 11:12

Still not elegant, and I'm not sure if it works, but what about:

<a href="javascript: history.go(-2)">Back</a>

(I know what you want, but since I do not know how to achieve that, I come up with near solutions, I'm sorry... ;-))

8 Mar 03, 2006 11:22

Yes could be a solution thanks but there are still some cases that won't be handled this way:

I don't know if the visitor leaved a coment or not, so 1 or 2 pages back?

If the visitor is in on the 5th page of a looooong post, i will need to bring him 5 pages back...

If he comes to the the post's comments through a link from another website Javascript as pretty as it is won't help me anymore :p

I'm kinda going to hack B2evolution to get this working :lol:

Any other solution except rebuilding the wheel?


Form is loading...