Module for switching the read-/list-view
Posted by Thomas Seifert
|
Module for switching the read-/list-view July 02, 2004 02:44AM |
Admin Registered: 23 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 03:27PM |
Registered: 22 years ago Posts: 683 |
|
Re: not working July 04, 2004 03:06AM |
Admin Registered: 23 years ago Posts: 9,240 |
|
Re: not working July 04, 2004 06:35AM |
Registered: 22 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 07:15AM |
Admin Registered: 23 years ago Posts: 9,240 |
|
Re: not working July 04, 2004 11:40AM |
Registered: 22 years ago Posts: 683 |
|
Re: Module for switching the read-/list-view - Now working July 04, 2004 12:02PM |
Registered: 22 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 12:27PM |
Admin Registered: 23 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 09:28AM |
Registered: 22 years ago Posts: 3 |
|
Re: Module for switching the read-/list-view July 05, 2004 10:00AM |
Admin Registered: 23 years ago Posts: 9,240 |
Sorry, only registered users may post in this forum.
