Disable "my quotes" in menu and on user account page

solipsist - May 15, 2006 - 14:36
Project:Quotes
Version:5.x-1.x-dev
Component:User interface
Category:bug report
Priority:normal
Assigned:NancyDru
Status:closed
Description

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

#1

jhriggs - May 16, 2006 - 11:59
Category:bug report» feature request
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'.

#2

solipsist - May 17, 2006 - 10:06

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

#3

jhriggs - May 17, 2006 - 11:53

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:

<?php
    $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
   
);
?>

#4

solipsist - May 17, 2006 - 15:25

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

#5

Sean B Fuller - December 15, 2006 - 18:15

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

AttachmentSize
quotes_myquotes.patch1.58 KB

#6

Sean B Fuller - December 15, 2006 - 18:16
Status:postponed» patch (code needs review)

Sorry, forgot to mark this for review.

#7

solipsist - December 16, 2006 - 19:49

Thanks Sean!

#8

Sean B Fuller - December 19, 2006 - 16:29

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.

AttachmentSize
quotes_myquotes2.patch2.69 KB

#9

fm - January 7, 2007 - 23:26

Might these changes be incorporated into the module proper?

Thank you in advance for a promptly updated module!

#10

fm - April 24, 2007 - 22:51

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?

#11

alexandreracine - May 14, 2007 - 03:44

+1 for this.

Can the author patch this?

#12

NancyDru - July 1, 2007 - 03:21

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.

#13

beginner - July 1, 2007 - 07:58
Version:4.7.x-1.x-dev» 5.x-1.x-dev
Category:feature request» bug report
Status:patch (code needs review)» patch (code 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.

#14

mariagwyn - August 27, 2007 - 07:32

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

#15

sunfish62 - December 5, 2007 - 03:11

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.

#16

NancyDru - December 5, 2007 - 03:33

#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.

#17

NancyDru - April 8, 2008 - 01:55
Assigned to:Anonymous» NancyDru
Status:patch (code needs work)» patch (code needs review)

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

#18

NancyDru - April 14, 2008 - 04:50
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.

#19

NancyDru - April 17, 2008 - 15:31
Status:patch (code 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.

#20

samirnassar - April 17, 2008 - 17:32

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

#21

NancyDru - April 17, 2008 - 18:02

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

#22

Anonymous (not verified) - May 1, 2008 - 18:02
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.