Module for switching the read-/list-view
Posted by Thomas Seifert
All files from this thread
File Name | File Size | Posted by | Date | ||
---|---|---|---|---|---|
viewswitch.zip | 1 KB | open | download | Thomas Seifert | 07/02/2004 | Read message |
viewswitch.zip | 1.1 KB | open | download | Thomas Seifert | 07/04/2004 | Read message |
viewswitch_multilang.zip | 1.7 KB | open | download | iamback | 03/18/2007 | Read message |
Module for switching the read-/list-view July 02, 2004 03:44AM |
Admin Registered: 20 years ago Posts: 9,240 |
I've made a simple module which allows to switch the view (threaded / flat) on the list and/or read-page.
It switches the user-setting for showing flat/threaded list/read so it will remain set for all forums once used.
After you enabled the module you've got the new var SWITCHURL available in the templates which you can use to switch the view.
Just add this link somewhere in your templates.
I.e. I've put this in header.tpl:
{if SWITCHURL}
<a href="{SWITCHURL}">switch view</a>
{/if}
Have fun with it!
Thomas Seifert
It switches the user-setting for showing flat/threaded list/read so it will remain set for all forums once used.
After you enabled the module you've got the new var SWITCHURL available in the templates which you can use to switch the view.
Just add this link somewhere in your templates.
I.e. I've put this in header.tpl:
{if SWITCHURL}
<a href="{SWITCHURL}">switch view</a>
{/if}
Have fun with it!
Thomas Seifert
not working July 03, 2004 04:27PM |
Registered: 19 years ago Posts: 683 |
Re: not working July 04, 2004 04:06AM |
Admin Registered: 20 years ago Posts: 9,240 |
Re: not working July 04, 2004 07:35AM |
Registered: 19 years ago Posts: 683 |
Hi Thomas,
I don't remember the exact phrase of the Error message but it said something about a a thing being not defined in common.php somewhere around line 300 if you want I could try to switch back to 5.0.6 to tell you more.
And yes, I enabled it in the admin and put the link in header.php as you suggested.
thanx
pat
I don't remember the exact phrase of the Error message but it said something about a a thing being not defined in common.php somewhere around line 300 if you want I could try to switch back to 5.0.6 to tell you more.
And yes, I enabled it in the admin and put the link in header.php as you suggested.
thanx
pat
Re: not working July 04, 2004 08:15AM |
Admin Registered: 20 years ago Posts: 9,240 |
Re: not working July 04, 2004 12:40PM |
Registered: 19 years ago Posts: 683 |
Re: Module for switching the read-/list-view - Now working July 04, 2004 01:02PM |
Registered: 19 years ago Posts: 683 |
Hi,
I've got it working now. What was the mistake? Well, I named the folder where the mod-files go into something different than "viewswitch" but it has to be named exactly like that for the mod to work. So, Thomas I suggest, that you include the folder into your zip-file to avoid confusion in the future.
Thank you again, for the mod it's exactly what I was desperatly trying to write in an earlier attempt. With no success of course.
thanx
pat
I've got it working now. What was the mistake? Well, I named the folder where the mod-files go into something different than "viewswitch" but it has to be named exactly like that for the mod to work. So, Thomas I suggest, that you include the folder into your zip-file to avoid confusion in the future.
Thank you again, for the mod it's exactly what I was desperatly trying to write in an earlier attempt. With no success of course.
thanx
pat
Re: not working July 04, 2004 01:27PM |
Admin Registered: 20 years ago Posts: 9,240 |
It IS already compressed with the foldername.
you just have to give the decompressor the right switch to use the foldername as given in zip-archive.
attached is a new version with some more reliable url-generation. previously a reload of the page switched the view also.
Thomas Seifert
you just have to give the decompressor the right switch to use the foldername as given in zip-archive.
attached is a new version with some more reliable url-generation. previously a reload of the page switched the view also.
Thomas Seifert
Re: Module for switching the read-/list-view July 05, 2004 10:28AM |
Registered: 18 years ago Posts: 3 |
Re: Module for switching the read-/list-view July 05, 2004 11:00AM |
Admin Registered: 20 years ago Posts: 9,240 |
Sorry, only registered users may post in this forum.