Module for switching the read-/list-view
Posted by Thomas Seifert
Re: Module for switching the read-/list-view May 02, 2006 06:45PM |
Registered: 16 years ago Posts: 2 |
to let everyone know, this module can be easily hacked to allow non logged in users to change the view as well because the anonymous user is a user as well and has a user ID of 0
all you have to do is remove the check to see if the user is logged in and the module will work for both logged in and non logged in users
all you have to do is remove the check to see if the user is logged in and the module will work for both logged in and non logged in users
May 03, 2006 08:06AM |
Admin Registered: 17 years ago Posts: 8,532 |
That is not really true. The module has quite some code that is used to remember the user's setting for the view mode in the database. Removing the check for being logged in will not make this work like intended. There is no user 0 in the database to store the data for. At best it would become a shared setting for all users with user ID 0, but that's not the case.
To remember the setting for anonymous users, one should use another storing mechanism like cookies to remember the view setting.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
To remember the setting for anonymous users, one should use another storing mechanism like cookies to remember the view setting.
Maurice Makaay
Phorum Development Team



Re: Module for switching the read-/list-view March 18, 2007 04:09AM |
Registered: 15 years ago Posts: 35 |
A simple tweak to make it multi-lingual - in your templates you can now use:
English, Dutch and Dutch informal included.
-- Marjolein Katsma * Marjolein's Travel blog * Marjolein's Travel Forum
The first condition of understanding a foreign country is to smell it.
-- Rudyard Kipling
{IF SWITCHURL}<a class="PhorumNavLink" href="{SWITCHURL}">{LANG->switch_view}</a>•{/IF}(Or without the • - I'm using it on the read pages.)
English, Dutch and Dutch informal included.
-- Marjolein Katsma * Marjolein's Travel blog * Marjolein's Travel Forum
The first condition of understanding a foreign country is to smell it.
-- Rudyard Kipling
Re: Module for switching the read-/list-view December 10, 2007 01:19PM |
Registered: 18 years ago Posts: 231 |
Re: Module for switching the read-/list-view December 10, 2007 01:29PM |
Admin Registered: 19 years ago Posts: 9,240 |
January 23, 2008 07:25PM |
Registered: 14 years ago Posts: 122 |
Quote
stevehealy
Does this need to be updated for 5.2?
With Thomas' help, this works for 5.2.
[forum.xpattern.net]
--
Bert Garcia - When all you have is a keyboard
Sorry, only registered users may post in this forum.