WordPress.org

Ready to get started?Download WordPress

Forums

WP Mingle
Accessing variables in PHP (4 posts)

  1. Curt44319
    Member
    Posted 1 year ago #

    There are a couple of variables I'd like to access, to hack their values into another ( completely unrelated ) plugin. I'm a PHP programmer in no one's imagination, not even my own, so...
    In order to recover, echo out, values from a mingle profile in another plugin, would someone care to share with me a snippet on how to do that ?
    I suppose I could read the database directly, but it seems that's probably redundant.
    Specifically, I'm after age and gender from the MySQL table mngl_custom_field_values

    Any help at all appreciated...

    http://wordpress.org/extend/plugins/mingle/

  2. HeliosProtocol
    Member
    Posted 1 year ago #

    I would suggest that you look into the MnglBoardApi.php file, and there you can find a few little tidbits that may help you along. It states right at the top: before your plugin can add activity, it myst register itself as a source by using the mngl-activity-types filter to add a code (the key of your array entry), fname and icon url. Here's an example from the mnglBoardsController class:

    I would have a look at that file, find that you can register mingle's hooks in different parts of your code something similar to what follows:

    <ul><li><?php echo $_GET["$author->sex"]; ?></li>
    <li><?php echo $_GET["$author->age"]; ?> Year Young!!</li></ul>

    I'm not 100% sure that will work, but I am 100% sure that if you look into the mingle api php file, you will be able to figure something along those lines out with a little bit of help from good ole Google.

    Have a merry christmas

  3. Curt44319
    Member
    Posted 1 year ago #

    Thanks for the pointers. Looking into it........

  4. Curt44319
    Member
    Posted 1 year ago #

    Got past my issue.
    Had to write a php block to do it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic