Show user's previously selected tab instead of default tab

yngens - June 6, 2008 - 08:26
Project:Magic Tabs
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:yhager
Status:closed
Description

This module would become even more useful if it could remember selected by a user tab and with next refresh of the page could load previously selected by the user tab as opposed to always loading the first tab, the default behavior for now.

#1

yhager - June 6, 2008 - 09:20

are you thinking user-tab cache, or session-tab cache?

#2

yngens - June 6, 2008 - 09:44

I am not sure of the difference between the two. You will see what I mean if you go to http://www.gazeta.kg and try to press any of the tabs on the right, then go to any other page and return to the first page - it will load the tab that you chose last time, not the default first one.

#3

yhager - June 6, 2008 - 10:37
Title:Make use of cache memory for selected tabs» Show user's previously selected tab instead of default tab
Assigned to:Anonymous» yhager

In the example site you sent, the selected tab is saved in a session cookie.

It's a very good idea, I'll work on that.

#4

yngens - June 6, 2008 - 21:12

thanks! looking forward to see this feature in your module.

#5

d0t101101 - June 9, 2008 - 02:33

As am I :)

Also, it would be helpful to have a way to set the default tab programmatically, inside the callback. A use case would be when magic_tabs are used on profile pages. One might want to view the 'Latest' tab for their own profile by default, and view the 'About' tab on everyone elses profile page.

For the above, you wouldn't want to change the order of the tabs, but simply set the default...

Just a thought,
.

#6

yhager - June 9, 2008 - 04:59

Also, it would be helpful to have a way to set the default tab programmatically, inside the callback. A use case would be when magic_tabs are used on profile pages. One might want to view the 'Latest' tab for their own profile by default, and view the 'About' tab on everyone elses profile page.

This can be achieved with the existing code, just use

<?php
 
print magic_tabs_get('yourcallback', 'last');
?>

the second parameter can be 'first' (default), 'last', or a numeric value.

#7

d0t101101 - June 9, 2008 - 13:35

THANKS!!!

And sorry, I should have RTFM before posting the last comment ;)
.

#8

yngens - June 11, 2008 - 19:46

Hi Yuval,

Can you please give any approximate terms when the initial request could be realized. I would like to shift all of my websites to magictabs, but waiting for only this feature. Otherwise the modules is just awesome.

#9

yhager - June 11, 2008 - 20:04

@yngens, I was waiting for SA-2008-032 to be published. Now that it's done I hope to get this going within a week or so.

Please remember I'm doing this is done on free time on a voluntary basis.

#10

yngens - June 13, 2008 - 00:49

sure i do see that and actually was asking my question without any intention to make you hurry, just to plans my own priorities according to your plans. thank you very much for this module!

#11

yhager - June 16, 2008 - 14:27
Status:active» fixed

this fix is now in the CVS, and will soon be in the development snapshot (make sure you use snapshot from today or later, or use the CVS directly).

#12

yngens - June 16, 2008 - 18:21

thanks man, you are the great!

#13

Anonymous (not verified) - June 30, 2008 - 18:23
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.