Support » Plugin: WP Mingle » Accessing variables in PHP

  • 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…

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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

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

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Accessing variables in PHP’ is closed to new replies.