Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Dries, you asked for this.
Comment | File | Size | Author |
---|---|---|---|
#4 | block_php_2.patch | 9.68 KB | chx |
#2 | block_php_1.patch | 3.51 KB | chx |
#1 | block_php_0.patch | 3.38 KB | chx |
block_php.patch | 3.37 KB | chx | |
Comments
Comment #1
chx CreditAttribution: chx commentedEscaped the < and > signs in the description.
Comment #2
chx CreditAttribution: chx commentedRewording following advice from Steef and JonBob.
Comment #3
Dries CreditAttribution: Dries commentedThis looks _really_ handy to me. +1 from me.
In order not to confuse the average user, I suggest to remove the 'node-type specific visibility settings'. Like that, we cater for the most common/popupalar functionality. Anything less popular can be implemented using PHP.
This is a good example of 'less is more'.
Comment #4
chx CreditAttribution: chx commentedI deleted types.
Comment #5
buddaProbably a little confusing to non-coders but it will solve the problem and copy n paste code can be provided via drupal.org for users.
Good stuff.
+1 from me.
Comment #6
tostinni CreditAttribution: tostinni commentedMaybe a handbook page could be created with some examples Dries provided on the mailing list (and others code of course) and make a link in the block_help ?
Comment #7
Dries CreditAttribution: Dries commentedCommitted to HEAD.
Comment #8
(not verified) CreditAttribution: commentedComment #9
m3avrck CreditAttribution: m3avrck commentedI know this closed and will be added to the handbook soon, but here are a few examples for anyone interested (I'm currently using these):
To display a block to any user that is logged in (hide from anonymous users):
And to display a block for only logged in users of a certain type:
Comment #10
rrichard63 CreditAttribution: rrichard63 commentedUpdate #9 above appears to say this patch was incorporated into 4.6.0. But it appears to me to be gone from 4.6.3. Is this correct? If so, why was it dropped?
Also, just out of curiosity, why does this patch drop the "types" field from the "blocks" table?
Bob Richard
Comment #11
tostinni CreditAttribution: tostinni commentedIn fact, it has been incorporated to HEAD aka 4.7 so it doesn't work in 4.6.x
See what Dries mentioned in #3
Comment #12
shyam2053 CreditAttribution: shyam2053 commentedWill this work in 4.6.x?
If not why? and how can it be made to work on 4.6.x?
Comment #13
puregin CreditAttribution: puregin commentedJust to answer shyam2053's question - new features are added to the 'development' version, i.e. HEAD. Once a numbered release is made, e.g. 4.6, that becomes a branch, and no new development is done, on that branch, except for example to fix security issues.