Closed (outdated)
Project:
BeautyTips
Version:
6.x-2.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2011 at 12:47 UTC
Updated:
11 Feb 2018 at 16:59 UTC
Jump to comment: Most recent, Most recent file
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 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 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 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 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 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 commentedCan you plz tell me how to use it in D7?
Comment #11
pifagor commented