You currently cannot disable the "my quotes" entry in the menu. You should be able to.

Comments

jhriggs’s picture

Category: bug » feature
Status: Active » Postponed

Drupal's menu system does not currently allow administratively-controlled dynamic menu items like this. So, just as you cannot disable 'my account', 'my blog', etc., you cannot disable 'my quotes'.

solipsist’s picture

So how do I get rid of it? Hacking core?

jhriggs’s picture

You can just edit the quotes.module file and remove that entry in the array() created in quotes_menu(). That is, simply delete or comment out lines 65-70:

    $items[] = array(
      'path' => "quotes/$user->uid",
      'title' => t('my quotes'),
      'access' => ($user->uid && (user_access('create quotes') || user_access('import quotes') || user_access('edit own quotes'))),
      'type' => MENU_DYNAMIC_ITEM
    );
solipsist’s picture

Thank you very much for your help and for the module! :)

seanbfuller’s picture

StatusFileSize
new1.58 KB

here is a small patch that adds a setting option to disable or enable the "my quotes" menu link.

seanbfuller’s picture

Status: Postponed » Needs review

Sorry, forgot to mark this for review.

solipsist’s picture

Thanks Sean!

seanbfuller’s picture

StatusFileSize
new2.69 KB

Updated version that also includes a setting for turning on/off the %name's quotes link at the bottom of nodes.

Seemed like these two were similar functions, so I put them in a fieldset and rolled them both into this one patch.

fm’s picture

Might these changes be incorporated into the module proper?

Thank you in advance for a promptly updated module!

fm’s picture

Does this patch work on release 5.x-1.1?

This is a great module and a much appreciated patch. Just out of curiosity, why wasn't the patch incorporated into the new release?

alexandreracine’s picture

+1 for this.

Can the author patch this?

nancydru’s picture

Just go into the module. Locate the the last line of that menu entry (line 70), which says "'type' => MENU_DYNAMIC_ITEM". Put "//" in the first two columns. Save the module.

Now your menu item is no longer "locked" and you can disable it.

beginner’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev
Category: feature » bug
Status: Needs review » Needs work

the patch is the wrong approach.

The menu item should be put in if (!may_cache) {} and the menu type should be MENU_NORMAL_ITEM.

It is actually a bug.

mariagwyn’s picture

Where does this stand? Is it a patch or a bug that will be fixed? I would like to be able to disable 'my quotes' without modifying the module if possible.

Thanks,
Maria

sunfish62’s picture

I, too, would like to know what action to take to fix this problem. It's been three months since Maria's message received no reply.

nancydru’s picture

#12 is very easy even if you don't know php.

Based on the statistics (http://drupal.org/project/issues/statistics/quotes) for this module, I'd say it is close to being abandoned.

nancydru’s picture

Assigned: Unassigned » nancydru
Status: Needs work » Needs review

The fix in #13 is done. I will look further at Sean's suggestions.

nancydru’s picture

Title: Disable "my quotes" in menu » Disable "my quotes" in menu and on user account page

Marking http://drupal.org/node/244555 as a duplicate of this.

nancydru’s picture

Status: Needs review » Fixed

The full patch has been committed to both of the -dev versions.

There are new settings to disable the "My quotes" menu item and the "xxx's quotes" links.

Note: The 6.x version includes a link to the performance settings page where the menu can be forced to be rebuilt (the "clear cache" button) if you change the menu setting.

samirnassar’s picture

Abandoned? Personally speaking I just started using it and am loving it.

nancydru’s picture

No, this module is no longer abandoned. I am actively maintaining it.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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