Message to a specific User

Discussion in 'Customization & add-ons' started by thomas, Mar 18, 2010.

  1. thomas

    thomas New Member

    Joined:
    Aug 29, 2006
    Messages:
    23
    Any thoughts on what code i can use to display a specific message on MEMBER.PHP to a specific Member ID number? Im assuming some sort of If/Then statement that uses member_id as criteria.
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    yeah, could use id or login id

    {if $smarty.session._amember_user.login == "name" }
    display this
    {/if}

    David
  3. thomas

    thomas New Member

    Joined:
    Aug 29, 2006
    Messages:
    23
    Thank you, i will give it a shot.
  4. thomas

    thomas New Member

    Joined:
    Aug 29, 2006
    Messages:
    23
    Worked like a charm, thank you.
  5. jadeb

    jadeb New Member

    Joined:
    Mar 26, 2010
    Messages:
    14
    Hi David,

    I know this is an old thread, but I'm just wondering if anyone knows of a method or plugin for making this easier to implement.

    This method works great, but I have to manually edit the pages to include the "if" statement and then I have to remember to remove it later.

    Is there any way to implement this so it could be done automatically from the admin panel?

    Perhaps this belongs in a feature request, but what I'd really like is that I could visit a member's info in the admin panel and I could place a checkmark for something like "message to member" and then have a textfield where I could type the message.

    And I could have a single "if" statement in my templates that would display the message if required.

    Then, all I'd have to do is return to the member's info in admin and remove the checkmark and the message would stop displaying.

    Anyone ever done something like this? Ever seen it working somewhere?

    Thanks in advance,
    Jade
  6. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Sure, should be possible to "add a field", then check if the field isnt empty, if not, display the contents.

    David

Share This Page