Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hello,
i'd like to know if this is possible (and if yes how :)) to display BeautyTips only on the author display name. Also inthis tooltip I'd like to add a view to display first information level about the profile (like on LinkedIn fore example). I have created a view but now I really don't see how to do this.
Thanks by advance.
François
Comment | File | Size | Author |
---|---|---|---|
#4 | user-infobox-popup.txt | 8.07 KB | soulfroys |
Comments
Comment #1
soulfroysHi!
I just do it for a project! I took the liberty of changing the title to help others find this thread, ok?
There must be better ways to do this (as always in Drupal), but I used the template_preprocess_user_picture function. In fact, as I use the Imagecache Profiles module and I needed to use a copy of this function that can be found in the imagecache_profile.module file. The code and css is not finalized yet, but as soon as I finish I'll post here ... :)
Secret: you must use unique names and unique selectors to work properly (.
(Sorry for my Poor english)
Great references
User B
User C
Comment #2
FrancoisL CreditAttribution: FrancoisL commentedHello soulfroys,
no problem for the title (your english is better than mine :)).
Thanks for this great solution I will try on my side and let you know how it is for me.
François
Comment #3
allvip CreditAttribution: allvip commentedwhere should I insert this code?
Comment #4
soulfroysHi @allvip
You can insert the code in the template.php file, more details available in the following links:
- How to override a theme function (a Drupal how-to)
- Beginners guide to overriding themable output
The original code comes from Imagecache Profiles module, which I use in my project. My complete code are attached. It is not perfect, but works.
Comment #5
allvip CreditAttribution: allvip commentedthanks but is not working for me. I inserted the code at the end of my template.php an I get this errors:
Notice: Undefined variable: preset in include_once() (line 200 of /home/allvip/public_html/sites/all/themes/responsive_bartik/template.php).
Notice: Undefined variable: picture in include_once() (line 200 of sites/all/themes/responsive_bartik/template.php).
Notice: Undefined variable: alt in include_once() (line 200 of sites/all/themes/responsive_bartik/template.php).
Notice: Undefined variable: title in include_once() (line 200 of sites/all/themes/responsive_bartik/template.php).
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '' was given in theme_get_registry() (line 277 of includes/theme.inc).
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '' was given in theme_get_registry() (line 277 of includes/theme.inc).
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '' was given in theme_get_registry() (line 277 of includes/theme.inc).
Comment #6
allvip CreditAttribution: allvip commentedI inserted the code from user-infobox-popup.txt and nothing happens when I hover over or click a user name link.
Note.I do not use any view , just want this for my normal pages.
I did cleared the caches every time.beauty tips module is with Add beautytips js to every page checked.
I this code only for drupal 6?
Comment #7
soulfroysExactly. To make it work in D7 you need to use the core function or the Imagecache Profile function (if you need this module) as a starting point.
This code only works for user pictures, not for usernames.
Comment #7.0
soulfroysjust adding example
Comment #8
JA100685 CreditAttribution: JA100685 commenteddoes this mean that your provided code shall be inserted in "core function" user.module? sorry but i am very new to drupal and hoping you guys can help me get started
Comment #9
soulfroys@JA100685
Nope... please see this: About overriding themable output
Comment #10
ugintl CreditAttribution: ugintl commentedCan you plz tell me how to use it in D7?
Comment #11
pifagor