• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[library] History

#21
[eluser]garymardell[/eluser]
No the idea is so you can use it in your code. For example a situation im doing now. A user will report some content on a page so we have that location added to the history. He is directed to a report submit form. Now from that point if he cancels we can find where he came from. If the form is submitted then the user is taken to a page to thank him, we may want to then have a link so the user can return to where he was. So you can use the users history stack to find out where the user was 2 pages ago and give him/her a link to that location.

#22
[eluser]missionsix[/eluser]
Quote:Might be an offtopic, but isn’t Google Analytics doing this?


Google analytics looks at the request coming from the user from the specific page they are on, and probably does a stack to track which pages the user has visited where the entry point is the first item in the stack. If you were building a tracking app this library might be useful for that purpose.


@topic,
Its a great Idea, I had thought about doing something like this in my Auth library so login / logout procedures can redirect to the called location correctly. thanks!

#23
[eluser]BoogieK[/eluser]
Hy, the library is quite interesting and very useful but I got an error when simply trying to see if your "Usage" works. It says that there is "unexpected ; on line 82 in /libraries/History.php". I modified the function by replacing the return isset($this->history[0])?$this->history[0]:isset($_SERVER['HTTP_REFERER']) etc with some if end else statements and it works. Anyway, maybe you don`t have this error but I`m quite unsure. So, if you get this problem maybe you`ll try to solve it, just in case there are geeks that don`t know how to solve it. Congrats for this library and start create others too.

#24
[eluser]asumaran[/eluser]
[quote author="BoogieK" date="1235956690"]Hy, the library is quite interesting and very useful but I got an error when simply trying to see if your "Usage" works. It says that there is "unexpected ; on line 82 in /libraries/History.php". I modified the function by replacing the return isset($this->history[0])?$this->history[0]:isset($_SERVER['HTTP_REFERER']) etc with some if end else statements and it works. Anyway, maybe you don`t have this error but I`m quite unsure. So, if you get this problem maybe you`ll try to solve it, just in case there are geeks that don`t know how to solve it. Congrats for this library and start create others too.[/quote]

I just added a ")" before ";" in the line 82

#25
[eluser]BoogieK[/eluser]
[quote author="asumaran" date="1252718130"][quote author="BoogieK" date="1235956690"]Hy, the library is quite interesting and very useful but I got an error when simply trying to see if your "Usage" works. It says that there is "unexpected ; on line 82 in /libraries/History.php". I modified the function by replacing the return isset($this->history[0])?$this->history[0]:isset($_SERVER['HTTP_REFERER']) etc with some if end else statements and it works. Anyway, maybe you don`t have this error but I`m quite unsure. So, if you get this problem maybe you`ll try to solve it, just in case there are geeks that don`t know how to solve it. Congrats for this library and start create others too.[/quote]

I just added a ")" before ";" in the line 82[/quote]

OK, and thanks. I will take a new review on it but for me worked with the modifications I made. Anyway, the idea was great so for those that the library hadn`t worked and have done some modifications it was OK.

#26
[eluser]megabyte[/eluser]
My only question would be, why does this have to run with hooks?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.