Closed (works as designed)
Project:
Buy Me a Beer
Version:
6.x-2.0-beta1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Apr 2011 at 16:30 UTC
Updated:
26 May 2012 at 00:36 UTC
Hi,
thanks for this module. Could you make the $node parameter for the function buymeabeer_paypal_link() optional, so a block can be used on none node pages? A quick glance into this function shows, that there is a fallback anyway and the node object is only used to retrieve a user id in case user specific donation emails are set.
I would simply like to show a block on every page of a site, pointing to the same, globally defined paypal account.
For my use case it is sufficient to change
function buymeabeer_paypal_link($node) {
to
function buymeabeer_paypal_link($node = NULL) {
An alternative would be to be able to give the user id or an account object as a parameter, but not the node.
Comments
Comment #1
d34dman commentedhii berliner, must confess i quite do not understand your requirement. Where would the email id come from to generate the paypal link?
Comment #2
berliner commentedHi,
sorry, that I forgot to respond. I just found this issue on my dashboard.
I don't really need this anymore, but the general requirement was to just drop the required node argument when calling the
function buymeabeer_paypal_link(). As far as I understood your modules code this wouldn't require any other code changes. The email could come from a globally defined email setting, either as an option in your module or simply the from global site configuration.Hope that clarifies it. As I remember the scenario right, this feature would be useful on pages with very limited or no registered user to propose a general donation option for the whole page.
best regards,
berliner
Comment #3
yaph commentedCurrently there is no block hook, I think that is what would need to be added, but if it's not needed any more, it should be okay the way it is.
Comment #4
berliner commentednevermind, thanks for looking into this
Comment #5
berliner commentedclosing the issue