incremental plugin - show only newest link

Discussion in 'Customization & add-ons' started by denleyd1, Feb 4, 2010.

  1. denleyd1

    denleyd1 New Member

    Joined:
    Jun 16, 2008
    Messages:
    5
    Hi guys,

    I'm doing this thing where i need to show only newest available link. Is there any way to do it, or some custom code that i could use to achieve this functionality.

    Thanks!
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Is this on a php page?

    You will need a bit of custom code written to do this.
    The basic code to display incremental content is:
    <?php
    session_start();
    if ($_SESSION['_amember_links'])
    {
    echo "<ul>";
    foreach ($_SESSION['_amember_links'] as $link_id => $link)
    {
    echo "<li><a href=\"".$link['link_url']."\">".$link['link_title']."</a></li>";
    }
    echo "</ul>";
    }
    ?>


    David
  3. denleyd1

    denleyd1 New Member

    Joined:
    Jun 16, 2008
    Messages:
    5
    Hi David,

    Yes, exactly, it's on php page.

    I guess i could use that code, but i will need it to show only ONE link, the most recent one that became available for customer...And this code will show all links.

    So I guess i need to add some kind of condition statement which would look for the highest link_id number in database.

    Any idea where i could put that?

    Thanks!

Share This Page