The MU forums have moved to WordPress.org

Sociable plugin (28 posts)

  1. drmike
    Member
    Posted 18 years ago #

    Greets:

    I just took a look at the Sociable plugin and got it working. (At least it works with Digg and it works in WPMU.)

    I would install it within the plugins subdirectory and let folks deside if they want to use it or not.

    One major edit is required else it breaks your site. Open up /sociable/sociable.php for editing. Do a search for 'rss-functions.php' within that file. Rename that bit to 'rss.php' and save.

    Hope this helps,
    -drmike

  2. laurenceo
    Member
    Posted 17 years ago #

    Following the edit you mentioned above I too got it partially working--it appears to be functioning normally apart from the ability to reorder the sites.

    If anyone figures out how to get it fully functional, please share the love.

  3. drmike
    Member
    Posted 17 years ago #

    I can't reorder the sites either. There's no drag and drop with Netscape 7.2 here.

    I am having an issue though and was wondering if anyone else got this working yet. Any time a blogger clicks on the Save Options, it starts kicking out errors. The only time it does work is with the defaults in place.

    Warning: Invalid argument supplied for foreach() in /home/dariabe/public_html/wp-content/plugins/sociable/sociable.php on line 711

    Line 711 for me, after some editing, is the following:

    foreach($active_sites as $sitename) {

    Some digging around and testing is showing me that $active_sites is not being defined as an Array at this point although it is saving the changes.

  4. drmike
    Member
    Posted 17 years ago #

    Silly dumb question time: get_option is defined, right? I don't have to do anyhting weird to get it working within a plugin, right?

  5. lunabyte
    Member
    Posted 17 years ago #

    Correct.

    It's a core function, and available to plugins. As is get_site_option, is_site_admin, etc.

  6. drmike
    Member
    Posted 17 years ago #

    Yeah, it's choaking every time it interacts with sociable_active_sites via a get_option.

    *grumble*

  7. kingler
    Member
    Posted 17 years ago #

    I have fixed the problem in the plugin a few days ago.

    Check out my version:

    http://wpmudevorg.wordpress.com/project/Sociable-Plugin-for-WPMU

    Automatic update feature of the plugin was stripped out. And the default list is changed as well.

    NOTE: rss-functions.php is only available in WPMU 1.1.1 version, not WPMU 1.0.

    For WPMU 1.0, use the rss.php file instead just as Dr Mike suggested.

  8. drmike
    Member
    Posted 17 years ago #

    Thnaks. :)

    Just for reference, is the function get_option able to pull out an array out of the database? I'm assuming that it should be able to since a lot of the option tables contents are arrays but it really looks like that's what holding things up. (I've confirmed that the variable is not an array)

  9. drmike
    Member
    Posted 17 years ago #

    Greets:

    Still an issue when activated although it does work when you clikc on Save changes:

    Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/dariabe/public_html/wp-content/plugins/sociable/sociable.php on line 521

    I'll take a look at it shortly. The same fix you did whould probably work here as well.

  10. drmike
    Member
    Posted 17 years ago #

    When you reload Dashboard -> Options -> Sociable with the non-default listings, you get a screen full of errors as well:

    Along the top:

    Warning: Invalid argument supplied for foreach() in /home/dariabe/public_html/wp-content/plugins/sociable/sociable.php on line 680

    Within the icons:

    <li
    		id="BlogMemes"
    		class="sociable_site <br />
    <b>Warning</b>:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in <b>/home/dariabe/public_html/wp-content/plugins/sociable/sociable.php</b> on line <b>706</b><br />
    inactive"
    		onmouseup="javascript:save_reorder('cb_BlogMemes');"
    	>
    		<input
    			type="checkbox"
    			id="cb_BlogMemes"
    			class="checkbox"
    			name="active_sites[BlogMemes]"
    			onclick="javascript:toggle_checkbox('cb_BlogMemes');"
    			><br />
    <b>Warning</b>:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in <b>/home/dariabe/public_html/wp-content/plugins/sociable/sociable.php</b> on line <b>715</b><br />
    
    		/>
    		<img src="../wp-content/plugins/sociable/images/blogmemes.png" width="16" height="16" alt="" />
    		BlogMemes	</li>

    Ain't this fun? ;)

  11. kingler
    Member
    Posted 17 years ago #

    That's interesting. I have tested in my Virtual Appliance. And it worked on WPMU 1.0, 1.1.1 and the latest SVN.

    If you are still having this issue, it may be related to the PHP version. In my virtual machine, I am using PHP5.

    I have also tested it in my development server with PHP4. It also worked without any errors. Anything special for you here?

  12. drmike
    Member
    Posted 17 years ago #

    Are you adding in and removing sites?

  13. kingler
    Member
    Posted 17 years ago #

    I tested adding and removing sites and updating the option.

  14. drmike
    Member
    Posted 17 years ago #

    Well this sucks...

  15. gumdrop
    Member
    Posted 17 years ago #

    drmike I'm getting the same thing...seemed to stop working after I installed a few plugins...like comvatar...

  16. drmike
    Member
    Posted 17 years ago #

    I'll probably just go back to the older version then.

  17. gumdrop
    Member
    Posted 17 years ago #

    That's weird...sure like to know what broke it.

  18. gumdrop
    Member
    Posted 17 years ago #

    Oh here's the interesting part...if I make the changes they don't show in admin --> options --> sociable
    However, if I leave the admin page and go to view the site then come back to the admin the settings are there. 8-I

  19. kingler
    Member
    Posted 17 years ago #

    gumdrop, did you try my version in your install or the original sociable plugin?

    It is pretty weird that adding other plugins broke it.

  20. gumdrop
    Member
    Posted 17 years ago #

    Yes, I am using your version...downloaded from wpmudev.org.
    Now I'm kind of thinking this was the situation all along because of what I said in my prior post.

  21. gumdrop
    Member
    Posted 17 years ago #

    Also, the drag and drop function isn't working.
    ie."Drag and drop sites to reorder them."

    getting this script errors:


    Error: this._each is not a function
    Source File: http://domain.com/wp-includes/js/prototype.js?ver=1.5.0-0
    Line: 326

  22. kingler
    Member
    Posted 17 years ago #

    That's getting interesting, as I am pretty sure that it worked on my side.

  23. gumdrop
    Member
    Posted 17 years ago #

    in_array — Checks if a value exists in an array

    the error:

    PHP Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/html/wp-content/plugins/sociable/sociable.php on line 706, referer: http://domain.com/wp-admin/options-general.php?page=Sociable

    the error is at around line 715 also

    referer: http://domain.com/wp-admin/options-general.php

  24. drmike
    Member
    Posted 17 years ago #

    Yup, ditto. :(

    And of course idiot me forgot to make a backup before i started working on it so i can't even replace it with the older version.

  25. Konstan
    Member
    Posted 17 years ago #

    I got this working with the sociable version from wpmudev.org, not the original. The original gave me errors after saving. This one worked like a charm.

    Except the drag and drop :(

  26. drmike
    Member
    Posted 17 years ago #

    Are you sure? Have you tried add in and removing sites? Works fine when you install it. It's when you try other stuff that you get the errors?

  27. Konstan
    Member
    Posted 17 years ago #

    Yep, I can add/remove sites and save without getting errors.

    Its a shame that you can't drag and drop, there is no way to reorder. Other then that its working fine.

  28. kdesilva
    Member
    Posted 17 years ago #

    Is there any way to get this working for all users by default?

About this Topic