Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Plugins & Atahualpa (http://forum.bytesforall.com/forumdisplay.php?f=16)
-   -   OpenID Comments Form (http://forum.bytesforall.com/showthread.php?t=3361)

Chris Bennett Sep 9, 2009 02:49 PM

OpenID Comments Form
 
I'm trying to figure out why the OpenID Comments form isn't able to change the comments on this theme. The id's look to be what it's looking for, I'm a little lost.

The Javascript that modifies the comments form looks like this:

Code:

jQuery(function() {
        jQuery('#openid_system_status').hide();

        jQuery('#openid_status_link').click( function() {
                jQuery('#openid_system_status').toggle();
                return false;
        });
});

function stylize_profilelink() {
        jQuery("#commentform a[@href$='profile.php']").addClass('openid_link');
}

function add_openid_to_comment_form() {

        jQuery('#commentform').addClass('openid');

        var html = ' <a id="openid_enabled_link" href="http://openid.net">(OpenID Enabled)</a> ' +
                                '<div id="openid_text">' +
                                        'If you have an OpenID, you may fill it in here.  If your OpenID provider provides ' +
                                        'a name and email, those values will be used instead of the values here.  ' +
                                        '<a href="http://openid.net/what/">Learn more about OpenID</a> or ' +
                                        '<a href="http://openid.net/get/">find an OpenID provider</a>.' +
                                '</div> ';

        jQuery('#commentform #url').attr('maxlength', '100');
        var label = jQuery('#commentform label[@for=url]');
        var children = jQuery(':visible:hastext', label);

        if (children.length > 0)
                children.filter(':last').appendToText(html);
        else if (label.is(':hastext'))
                label.appendToText(html);
        else
                label.append(html);

        // setup action
        jQuery('#openid_text').hide();
        jQuery('#openid_enabled_link').click( function() {
                jQuery('#openid_text').toggle(200);
                return false;
        });
}


Chris Bennett Sep 15, 2009 10:48 AM

still struggling with this, any ideas?

Flynn Sep 15, 2009 11:20 AM

It adds the CSS class "openid". Is that CSS class defined somewhere?

I also noticed
#commentform label[@for=url]

This should be

#commentform label[for=url]

since jQuery 1.3

Also try removing the hard coded jQuery that Atahualpa adds, in Atahualpa's header.php

Chris Bennett Sep 17, 2009 09:59 AM

The .js is aparently never getting added to the header.
I added wp_print_scripts(); to the end of the openid plucin, and now I get the javascript file included.
(it also prints code that was apparently missing from wp-email as well, is the theme supposed to be calling wp_print_scripts somewhere instead?)

The script gets printed in the header now, but it's still not changing the form...
(I changed the #commentform label[for=url] thing too)

http://www.bennettphoto.net/2009/09/...-park/#respond is the URL

Flynn Sep 18, 2009 10:43 AM

Try disabling the pretty Photo plugin, it's using jQuery with $ instead of jQuery, whereas Atahualpa and OpenID are using jQuery, maybe that's causing this. Right now the default Atahualpa jQuery action such as the toggle effect for the "You can use this HTML" link isn't working either.

Additionally and just in case you could also remove the whole IE Pngfix code from js.php

Delete everything from

PHP Code:

(c2008 Angus Turnbull http://www.twinhelix.com 

up to
PHP Code:

    document.styleSheets[0].addRule('div''behavior: url(http://www.bennettphoto.net/blog/wp-content/themes/atahualpa/js/iepngfix.php)'); */
 } 

This will be removed in the next version anyway.

Chris Bennett Sep 20, 2009 08:17 PM

The problem seems to be the openid plugin itself. I went thru today disabling everyting and re-enabling one at a time till the supported html chars broke, it broke after enabling the openid plugin. I'm just surprised that js didn't whine a little more.

It seems to have some syntax errors in the js that firefox is complaining about. I'll dig into that a little bit more and let you know!

Chris


All times are GMT -6. The time now is 10:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.