Hi,

I am using the module Simplenews together with Profile Tabs module. It would be great to be able to hide special tabs from the user profil when someone is looking into the profile data. I hope this is possible...

Regards

Comments

maartenvg’s picture

I came across the problem myself when using Simplenews. The problem lies partly with Simplenews as they are inconsistent in naming the profile category.

There are two solutions I can think of:
- I make some settings so you can select which categories are to be shown as tabs and which not. (via checkboxes)
- You edit line 558 of simplenews.module
return array(t('Newsletters') => $items);
to
return array(t('newsletter') => $items);

For now you could use option 2, while I work on option 1.

frerin’s picture

Thank you very much for your reply. I am not certain that I understood you correctly. While option 1 will be wonderfull am I experiencing problems understanding your option 2. What would help me to make the menu entry disapear?

Regards

frerin’s picture

Dear maartenvg,

I guess you ment

// return array(t('newsletter') => $items);

which I did right now. Unfortunately this is not exactly what I ment.

In normal user Profile it definitely removes the information. Since I am using Profile Tabs module do I get a different appearance, like:

-------------------------------------------------------------------------------
profile menuitem 1 profile menu item 2 profile menu item 3
-------------------------------------------------------------------------------

information entered in e.g. profile menu item 2
information entered in e.g. profile menu item 2
information entered in e.g. profile menu item 2
information entered in e.g. profile menu item 2
information entered in e.g. profile menu item 2
-------------------------------------------------------------------------------

Normal in Drupal would be:

-------------------------------------------------------------------------------
profile menuitem 1

information entered in e.g. profile menu item 1
information entered in e.g. profile menu item 1
information entered in e.g. profile menu item 1

profile menu item 2

information entered in e.g. profile menu item 2
information entered in e.g. profile menu item 2
information entered in e.g. profile menu item 2

and so on.

What I also would like to disapear is the "profile menu item" of newsletter if the user is not in Edit mode in his profile.

Is this possible?

Other solution I could think of is a different way to display the user profiles, but I also do not know how to do it.

Regards

maartenvg’s picture

I've altered the module slightly, making this possible and better tuned.

First of all it only shows tabs for the items rendered in the shown profile. (because for example a profile which has PM turned off will not need a tab for PM).
Secondly, you now can disable tabs for certain profile content. That content will be rendered in the 'default tab'.

The side-effect is now the tabs are not ordered based on their weight, but by alphabet, but that's a minor issue.

The new code will be up soon. After upgrading from the previous version, please check the administration screen for the correct settings.

maartenvg’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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