Firefox PHP

Module for switching the read-/list-view

Posted by Thomas Seifert 
Re: Module for switching the read-/list-view
May 02, 2006 06:45PM
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
Re: Module for switching the read-/list-view
May 03, 2006 08:06AM
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
Re: Module for switching the read-/list-view
March 18, 2007 04:09AM
A simple tweak to make it multi-lingual - in your templates you can now use:

{IF SWITCHURL}<a class="PhorumNavLink" href="{SWITCHURL}">{LANG->switch_view}</a>&bull;{/IF}
(Or without the &bull; - 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
Attachments:
open | download - viewswitch_multilang.zip (1.7 KB)
Re: Module for switching the read-/list-view
December 10, 2007 01:19PM
Does this need to be updated for 5.2?

How will it behave with 3 view options rather than 2?

thanks,
...Steve
Re: Module for switching the read-/list-view
December 10, 2007 01:29PM
Quote
stevehealy
Does this need to be updated for 5.2?

sure

Quote
stevehealy
How will it behave with 3 view options rather than 2?

it simply knows only the two current ones.


Thomas Seifert
Re: Module for switching the read-/list-view
January 23, 2008 07:25PM
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.

Click here to login