Digg Widget in Block disables Photoframe
| Project: | Photoframe |
| Version: | 5.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Hello,
Maybe I am doing something wrong, but I am having an issue with compatibility with Photoframe and the Digg Widget. I have Photoframe enabled and it is successfully producing frames around certain content in my page. I have tried adding a block to my page with the code for a Widget from Digg.com that will display my recent diggs. However, when I add that block to the page, none of the Photoframe elements render. Disabling the block restores functionality. The code for the widget is as follows:
<script type="text/javascript">
digg_id = 'digg-widget-container'; //make this id unique for each widget you put on a single page.
digg_width = 'auto';
digg_height = 'auto';
digg_target = 1;
digg_theme = 'digg-widget-theme3';
digg_title = 'Stories dugg by user jomtois';
</script>
<script type="text/javascript" src="http://digg.com/tools/widgetjs"></script>
<script type="text/javascript" src="http://digg.com/tools/services?type=javascript&callback=diggwb&endPoint=/user/jomtois/dugg&count=5"></script>I have added it to the block as written (no formatting) and also surrounded with tags with the same result. The widget will display correctly, however, my photoframes will disappear.
Any ideas?
Thanks

#1
I gave it a try and can verify that indeed the problem is with the digg widget. More specifically, it looks like it's probably the http://digg.com/tools/widgetjs, which includes jquery and the fly-dom jquery plugin. I'm unable to test what specifically in the included files is causing the conflict, but if you wanted to do some testing, I would just start including different parts of the widgetjs and see what breaks photoframe. There might be a way you can get around it. If I'm able to put together some time in the near future to test it out myself, I will.
#2
Thanks for looking into it. I figured it was most likely some sort of conflict from the widget end where it didn't close out some bit of code or something, but I am not knowledgeable enough in jquery to figure it out.
I appreciate your response! And if you do find out anything, I look forward to hearing about it.
Thanks.
#3
I have tried disabling many things in the http://digg.com/tools/widgetjs by downloading it locally and changing the script to point to the local version. I have commented basically everything out and still get the same results.
I then inspected the http://digg.com/js/jquery.js . I really have no idea what I am looking at but at the beginning of the file it has this:
// Map over jQuery in case of overwrite
if ( typeof jQuery != "undefined" )
var _jQuery = jQuery;
var jQuery = window.jQuery = function(a,c) {
// If the context is global, return a new object
if ( window == this || !this.init )
return new jQuery(a,c);
return this.init(a,c);
};
// Map over the $ in case of overwrite
if ( typeof $ != "undefined" )
var _$ = $;
// Map the jQuery namespace to the '$' one
window.$ = jQuery;
....
Is this mapping over the jquery that is normally used by drupal / photoframe and therefore messing up the calls? Maybe I have no clue and just tell me that, but by going line by line and disabling things, I could not get it to show the frames even after commenting out all the code so I thought maybe this was what could be breaking something.
#4
Did you try commenting out the inclusion of jQuery?
#5
Yes. Commenting that out breaks the widget (thus restoring the photoframes).
Firebug gives this error:
$j is not defined
$j('#'+digg_id+' ul').html('');
So I think that that version of jquery defines that variable $j.
#6
tag
#7
If I add the digg widget to a block it breaks my jsTooltips and reflection.js