Closed (fixed)
Project:
Classified Ads
Version:
5.x-1.5-8
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Jan 2009 at 03:07 UTC
Updated:
8 Sep 2011 at 19:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
plan9 commentedI would also like to know how to do this.
Comment #2
milesgillham commentedI would just like to clarify what you're trying to achieve. Is it that you simply want to turn off that tab displaying for all users as a site setting (the permission settings would still allow create/edit/reset depending on what menu options you make available), or is it that you want to disable user ads (presumably because you're running administrator or system generated ads) and by implication then remove that tab for users as it's irrelevant? The answer to that would guide a solution.
Having said that, and bearing in mind that this request is tagged for the 5.x branch, a quick hack is to edit ed_classified.module, and change line 260 from:
to:
What this does is say to Drupal to only display that tab if you are the Administrator (uid 1). The attached patch will do it for you. But this is not an official patch, will not be included in the module ever, is purely to answer the original question, and I don't generally ever recommend modifying module or core code manually. I am happy to talk about the intended functionality and either make it a side effect of the combination of user permissions, or an explicit checkbox in the module settings as a feature request for inclusion in a future release of the module.
Cheers,
Miles
Comment #3
milesgillham commentedComment #4
plan9 commentedGreat. Thanks Miles - I'll give it a try.
G
Comment #5
plan9 commentedThe patch worked.
Comment #6
plan9 commentedI was hoping to make the tab visible only to users with site admin privileges:
if (($user !== FALSE) && ($is_admin !== TRUE)) {
But this seems to only hides it for non - logged in users....
Comment #7
fgmUser says "the patch worked", so assuming fixed.
Policy for displaying this tab or not changed in 6.x/7.x versions anyway.