[drupal-devel] [feature] Option to disable printer friendly version
for book module
kbahey
drupal-devel at drupal.org
Fri Feb 18 02:48:47 UTC 2005
Project: Drupal
Version: cvs
Component: book.module
Category: feature requests
Priority: normal
Assigned to: Anonymous
Reported by: kbahey
Updated by: kbahey
Status: patch
Attachment: http://drupal.org/files/issues/book-2.patch (1017 bytes)
There are no UI changes in this patch.
If someone wants to turn off the printer friendly link, then all they
do is :
- Go to settings.php
- Uncomment the lines that have the $conf variable and the closing
bracket
- Add a line like this:
'book_hide_printer_friendly' => 1,
That is it.
No menus, no options, nothing ...
Preferrably, we should document these 'hidden' options in the future,
under an 'Advanced Configuration' section.
kbahey
Previous comments:
------------------------------------------------------------------------
November 20, 2004 - 01:30 : kbahey
Attachment: http://drupal.org/files/issues/book_17.patch (2.18 KB)
I wanted an option for the book module to NOT display a
'printer-friendly version' link for every node.
So, I implemented an option for the book module to allow this to be
turned off.
Using this option:
- Go to the /admin/node/book
- Uncheck the box that say 'show printer friendly links for books' if
you want
- Click 'Save settings'
There will be no printer friendly links after you do this.
Please consider applying this patch to CVS.
------------------------------------------------------------------------
November 21, 2004 - 12:01 : kbahey
Setting status to patch, so that it is discussed on the mailing list.
------------------------------------------------------------------------
November 25, 2004 - 18:36 : kbahey
Attachment: http://drupal.org/files/issues/book_18.patch (2.3 KB)
I have remade this patch to match what is in the current CVS version.
The previous patch had conflicts with the latest CVS version.
Will this be included in the base any time soon?
------------------------------------------------------------------------
November 25, 2004 - 19:07 : Bèr Kessels
options, options, options.
Alltough an option is an easy method to add fetaures, while not
breaking backwards compatibility, it is generally very bad for
useability.
I am therefore a -1 for this patch.
kbahey,
Eventhough the functionality is very nice, I would rather see you
either make thisa single site wide setting (in books settings).
Or -even better IMO- make the link dis(appear) through a theme
function.
Or -and thats the best option IMO- help the folks who are working on a
better $links (the links under each node) and introduce a general API
and theme system to show, hide and markup those links on nodes.
------------------------------------------------------------------------
November 26, 2004 - 16:55 : Anonymous
"I would rather see you either make thisa single site wide setting (in
books settings).
"
That is what it already does. The setting is global in books settings,
and not in every individual book.
It just so happens, for a reason unknown to me, that book's setting
page is under administer -> content -> books, and not under administer
-> settings -> book like other modules.
"Or -even better IMO- make the link dis(appear) through a theme
function.
Or -and thats the best option IMO- help the folks who are working on a
better $links (the links under each node) and introduce a general API
and theme system to show, hide and markup those links on nodes.
"
Those sound like a better option for sure.
If the option is in admin -> themes -> configure, under the "Toggle
display" part.
I am not familiar with that code at this point. Will do some digging to
see what can be done.
------------------------------------------------------------------------
February 17, 2005 - 09:58 : kbahey
One of the objections to this patch is that it introduces one more
option.
If I resubmit this patch without an option, does it have a change to be
accepted?
I will rely on the new $conf variable being able to override
variable_get(), so there is no option screen needed.
How about that?
------------------------------------------------------------------------
February 17, 2005 - 10:23 : stefan nagtegaal
Imo this is a theme feature, so it should be handled in there..
A link management system should be the best to handle such things, but
is - unfortunatly - quite hard to inplement...
------------------------------------------------------------------------
February 17, 2005 - 15:41 : kbahey
Ideally it would be a theme function. However, most themes, specially
the ones that ship with the standard Drupal distribution, do not
provide a way to turn that off at will.
Most ideal solution is the link management interface you mention, where
site admins can turn on off any link they like for any module.
But that does not exist so far, so until either one of the above
solutions exist, I will be submitting a patch that allows turning off
the printer friendly link.
------------------------------------------------------------------------
February 17, 2005 - 15:52 : Bèr Kessels
With a theme function, is not meant a function that will make an option
on your screen.
"Ideally it would be a theme function. However, most themes, specially
the ones that ship with the standard Drupal distribution, do not
provide a way to turn that off at will."
With a theme function, stefan most probablt meant a function
theme_printer_friendly(). That function would return the link. If you
want to turn it off, you woudl have to make a function
yourtheme_printer_friendly() that does /not/ return that link. Problemd
solved, without adding more clutter to the UI.
--
View: http://drupal.org/node/13211
Edit: http://drupal.org/project/comments/add/13211
More information about the drupal-devel
mailing list