By fighella on
I am looking for a simple solution to call Blocks related to Current Nodes by Author...
Any ideas that work?
Thanks as always.
JD
I am looking for a simple solution to call Blocks related to Current Nodes by Author...
Any ideas that work?
Thanks as always.
JD
Comments
Block visibility
On your block configuration page find 'Page specific visibility settings'. Choose 'Show if the following PHP code returns TRUE (PHP-mode, experts only)' and paste this code:
Of course, change 'author' to the author that you want.
Many useful solutions you can find in the handbook: http://drupal.org/node/60317
Personal Website
Company Website
Thanks so much. That worked
Thanks so much. That worked a treat!
Now all I gotta do is figure out how to get the locations OUT of the user profiles... ?
;)
thanks
Users are easy
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
...user profile.
But can I prevent Drupal from display this in the user account settings:
Location
Enter as much of your address as you are comfortable with. Your address will only be viewable by those who have the appropriate permissions. The site will be able to automatically link you to driving directions and other features if it already knows your address.
Street:
Additional:
City:
State/Province:
Postal code:
...
I dont like to use this... So I've made seperate nodes instead... But I dont want to double up... & I dont want to lose the module.. because I like locations in some of the other nodetypes...
you've helped me before.
Hi Nancyw,
You have helped me before. So I thought I would ask...
I am looking to change the linkout from image cache, from the node.. to basically the user who has made that nodes profile...
Here is the bit I have found that controls the href... my problem is: how do i get the Authors User Variable into it? :)
function theme_imagecache_formatter($field, $item, $formatter) {
if (preg_match('/_linked$/', $formatter)) {
$formatter = preg_replace('/_linked$/', '', $formatter);
$image = theme('imagecache', $formatter, $item['filepath'], $item['alt'], $item['title']);
$output = l($image, 'node/'. $item['nid'], array(), NULL, NULL, FALSE, TRUE);
}
else {
$output = theme('imagecache', $formatter, $item['filepath'], $item['alt'], $item['title']);
}
return $output;
Somewhere in the output I want to make it not node/ --- but user/ (whoever)
=) Thanks for your time.
JD
Well...
Here's purely a guess based on what I see here. Change:
to:
Also, add your 2 cents worth at: http://drupal.org/node/190457
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru