When BeautyTips API and BeautyTips UI are enabled in Drupal 7.0-beta1, I get the following errors:
Warning: preg_match(): No ending delimiter '.' found in file_scan_directory() (line 1938 of /chroot/home/[myuser]/[mydomain.com]/html/includes/file.inc).
Warning: preg_match(): No ending delimiter '.' found in file_scan_directory() (line 1938 of /chroot/home/[myuser]/[mydomain.com]/html/includes/file.inc).
Notice: Undefined variable: params in beautytips_ui_include_invoke() (line 89 of /chroot/home/[myuser]/[mydomain.com]/html/sites/all/modules/beautytips/beautytips_ui.module).

CommentFileSizeAuthor
#5 beautytips.patch3.84 KBerichomanchuk
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kleinmp’s picture

Only Beautytips API has been ported to Drupal 7, though it's not completely ready. You shouldn't be even be able to turn the Beautytips UI on (using the user interface).

kleinmp’s picture

Status: Active » Postponed
erichomanchuk’s picture

I had the same Problem in version 7.x-2.x-dev, where you can still turn the beauty tips ui on. I have turned it off but i got some other errors from the beautytips.admin.inc.

'#attributes' => array('class' => 'class')

Needs to be an array on lines 78, 96, 110

'#attributes' => array('class' => array('class'))

Also I got an error in beautytips.module for the line 90 for file_scan_directory its still d6 version

if (count(file_scan_directory($expath, 'excanvas.js', array('.', '..', 'CVS'), 0, FALSE))) {

I changed it to d7

if (count(file_scan_directory($expath, '/excanvas.js/', $options = array('recurse' => FALSE)))) {

The last thing was in the beautytips.js its still using the d6 behaviors method

Drupal.behaviors.beautytips = function() {
//code
}

Changed to the d7 way

(function ($) {
Drupal.behaviors.beautytips = {
attach: function(context, settings) {
//code
}};
})(jQuery);

Other then that is working great for me. Thanks.

campeon38’s picture

I'm not really sure what is working for you, but when I turn BeautyTips UI on. I'm still getting these errors:

Warning: preg_match() [function.preg-match]: No ending delimiter '.' found in file_scan_directory() (line 1984 of C:\vhosts\ditcons\includes\file.inc).
Warning: preg_match() [function.preg-match]: No ending delimiter '.' found in file_scan_directory() (line 1984 of C:\vhosts\ditcons\includes\file.inc).
Notice: Undefined variable: params in beautytips_ui_include_invoke() (line 89 of C:\vhosts\ditcons\sites\all\modules\beautytips\beautytips_ui.module).
Warning: preg_match() [function.preg-match]: No ending delimiter '.' found in file_scan_directory() (line 1984 of C:\vhosts\ditcons\includes\file.inc).
Warning: preg_match() [function.preg-match]: No ending delimiter '.' found in file_scan_directory() (line 1984 of C:\vhosts\ditcons\includes\file.inc).
Notice: Undefined variable: params in beautytips_ui_include_invoke() (line 89 of C:\vhosts\ditcons\sites\all\modules\beautytips\beautytips_ui.module).
Warning: preg_match() [function.preg-match]: No ending delimiter '.' found in file_scan_directory() (line 1984 of C:\vhosts\ditcons\includes\file.inc).
Warning: preg_match() [function.preg-match]: No ending delimiter '.' found in file_scan_directory() (line 1984 of C:\vhosts\ditcons\includes\file.inc).
Notice: Undefined variable: params in beautytips_ui_include_invoke() (line 89 of C:\vhosts\ditcons\sites\all\modules\beautytips\beautytips_ui.module).
Warning: preg_match() [function.preg-match]: No ending delimiter '.' found in file_scan_directory() (line 1984 of C:\vhosts\ditcons\includes\file.inc).
Warning: preg_match() [function.preg-match]: No ending delimiter '.' found in file_scan_directory() (line 1984 of C:\vhosts\ditcons\includes\file.inc).
Notice: Undefined variable: params in beautytips_ui_include_invoke() (line 89 of C:\vhosts\ditcons\sites\all\modules\beautytips\beautytips_ui.module).
Warning: preg_match() [function.preg-match]: No ending delimiter '.' found in file_scan_directory() (line 1984 of C:\vhosts\ditcons\includes\file.inc).
Warning: preg_match() [function.preg-match]: No ending delimiter '.' found in file_scan_directory() (line 1984 of C:\vhosts\ditcons\includes\file.inc).
Notice: Undefined variable: params in beautytips_ui_include_invoke() (line 89 of C:\vhosts\ditcons\sites\all\modules\beautytips\beautytips_ui.module).

And even I turn it off, nothing won't show up. I'm using next code as preprocess_block function:

if( module_exists('beautytips') ) {
$options['bt_banner_rotator_block'] = array(
'area' => '#widget_pager_bottom_rotating_banner-block_1 .views-field-counter a',
'contentSelector' => '$(this).attr("href")',
'trigger' => array(0 => 'mouseover'),
'width' => 250,
);
beautytips_add_beautytips($options);
}

Also, after checking the source code I'm seeing next code being applied to my page:

{"bt_banner_rotator_block":{"fill":"rgba(0, 0, 0, .8)","padding":20,"strokeStyle":"#CC0","strokeWidth":3,"spikeLength":40,"spikeGirth":40,"cornerRadius":40,"cssStyles":{"color":"#FFF","fontWeight":"bold"},"area":"#widget_pager_bottom_rotating_banner-block_1 .views-field-counter a","trigger":["mouseover","mouseover","mouseover","mouseover","mouseover","mouseover","mouseover","mouseover","mouseover","mouseover","mouseover"],"list":["fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","area","trigger","fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","area","trigger","fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","area","trigger","fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","area","trigger","fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","area","trigger","fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","area","trigger","fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","area","trigger","fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","area","trigger","fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","area","trigger","fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","area","trigger","fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","area","trigger"]}}

erichomanchuk’s picture

FileSize
3.84 KB

I Patched some of the code to get it working. Here are the patches that I made to beautytips module and beautytips_ui module

campeon38’s picture

I installed the patch and everything looks wonderful. I'm just getting next warning at the time to configure BeautyTips:

Warning: call_user_func_array() expects parameter 2 to be array, null given in beautytips_ui_include_invoke() (line 87 of C:\vhosts\ditcons_site\sites\all\modules\beautytips\beautytips_ui.module).
Warning: call_user_func_array() expects parameter 2 to be array, null given in beautytips_ui_include_invoke() (line 87 of C:\vhosts\ditcons_site\sites\all\modules\beautytips\beautytips_ui.module).

Regards,

kleinmp’s picture

Status: Postponed » Active

I just committed the patch by erichomanchuk plus some other code to update this to work with Drupal 7.
I haven't tested out all the options yet, but I suspect a number of them are now broken.

campeon38’s picture

This last update for beautytips is not working. I'm comparing the script that is being applied to my site against the script that filemakerworld.com is using:

My site:

"beautytips":{".beautytips":{"fill":"rgba(0, 0, 0, .8)","padding":20,"strokeStyle":"#CC0","strokeWidth":3,"spikeLength":40,"spikeGirth":40,"cornerRadius":40,"cssStyles":{"color":"#FFF","fontWeight":"bold"},"shadow":false,"cssSelect":".beautytips","list":["fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","shadow"]},"bt_text_field":{"fill":"rgba(0, 0, 0, .8)","padding":20,"strokeStyle":"#CC0","strokeWidth":3,"spikeLength":40,"spikeGirth":40,"cornerRadius":40,"cssStyles":{"color":"#FFF","fontWeight":"bold"},"shadow":false,"cssSelect":"input.form-text","trigger":["focus","blur"],"contentSelector":"$(this).nextAll('.description:eq(0)').hide().html()","width":"275px","positions":["top"],"preEval":true,"list":["fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","shadow","trigger","contentSelector","width","positions"]},"bt_text_area":{"fill":"rgba(0, 0, 0, .8)","padding":20,"strokeStyle":"#CC0","strokeWidth":3,"spikeLength":40,"spikeGirth":40,"cornerRadius":40,"cssStyles":{"color":"#FFF","fontWeight":"bold"},"shadow":false,"cssSelect":"textarea.form-textarea","trigger":["focus","dblclick"],"contentSelector":"$(this).parents('.form-item').find('.description').hide().html()","width":"275px","positions":["top"],"preEval":true,"list":["fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","shadow","trigger","contentSelector","width","positions"]},"bt_banner_rotator_block":{"fill":"rgba(0, 0, 0, .8)","padding":20,"strokeStyle":"#CC0","strokeWidth":3,"spikeLength":40,"spikeGirth":40,"cornerRadius":40,"cssStyles":{"color":"#FFF","fontWeight":"bold"},"shadow":false,"area":"#block-rotating-banner-1 .rotating-banner a","contentSelector":"$(this).attr(\"href\")","trigger":["mouseover","mouseover","mouseover","mouseover","mouseover","mouseover"],"list":["fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","shadow","area","contentSelector","trigger","fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","shadow","area","contentSelector","trigger","fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","shadow","area","contentSelector","trigger","fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","shadow","area","contentSelector","trigger","fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","shadow","area","contentSelector","trigger","fill","padding","strokeStyle","strokeWidth","spikeLength","spikeGirth","cornerRadius","cssStyles","shadow","area","contentSelector","trigger"]}}

vs

Filemakerworld.com

"beautytips": { "bt_filemaker_blocks": { "area": "#block-views-filemaker_news-block_1 .views-field-title a, #block-views-filemaker_blogs-block_1 .views-field-title a", "contentSelector": "$(this).attr(\"bt-xtitle\")", "trigger": [ "mouseover" ], "width": 250, "list": [ "contentSelector", "trigger", "width" ] } }, "beautytips_defaults": { "fill": "#F7F7F7", "padding": 8, "strokeStyle": "#B7B7B7", "cornerRadius": 0, "cssStyles": { "fontFamily": "\"lucida grande\",tahoma,verdana,arial,sans-serif", "fontSize": "11px" }, "list": [ "fill", "padding", "strokeStyle", "cornerRadius", "cssStyles" ], "css_list": [ "fontFamily", "fontSize" ] }

I'm just getting bunch of empty properties that don't make any sense. Filemakerworld.com is getting a clean scripting code.

kleinmp’s picture

Status: Active » Closed (fixed)

I don't think this is relevant anymore. There was another ticket for porting to drupal 7. The module seems to enable just fine now in Drupal 7.