Results 1 to 5 of 5

Thread: Featured members link

  1. #1
    Prometheus
    Guest

    Default Featured members link

    I think you all get the variations on this theme so.......last post on this....


    This adds a featured members link to the member menu and the visitors menu.

    Can you see what I am doing here???...rotflol....sorry 20 hours of ae....


    insert a new row into your GIParams (see featured_page_row.doc)


    take a copy of your index.php
    rename it to feature.php


    add: below the current
    Featured members block
    ( or use attached )





    /**
    * Featured members block block
    */
    function PageCompFeatured($featured_vertical)
    {
    global $site;
    global $ID_PIC_DIR;
    global $ID_PIC_URL;
    global $tmpl;

    $feature_page = getParam('featured_page');

    // get random featured profiles
    if (!$featured_vertical || $tmpl == 'ae9')
    {
    $add_height = 10;
    }
    else
    {
    $add_height = 0;
    }

    $thumb_width = getParam("thumb_width");
    $thumb_height = getParam ("thumb_height") + $add_height;

    if ($feature_page)
    {
    $featured_res = db_res( "SELECT `Profiles`.`ID`, `Pic_0_addon`, `NickName`, `Headline` FROM `Profiles` WHERE `Status` = 'Active' AND `Featured` = '1' ORDER BY RAND() LIMIT $feature_page" );

    $out = "";
    while ( $featured_arr = mysql_fetch_array ( $featured_res ) )
    {
    $src = "{$ID_PIC_DIR}{$featured_arr['ID']}_0_{$featured_arr['Pic_0_addon']}.jpg";
    if ( file_exists($src) )
    $src = "{$ID_PIC_URL}{$featured_arr['ID']}_0_{$featured_arr['Pic_0_addon']}.jpg";
    else
    $src = "{$site['images']}pic_not_avail.gif";

    if ( $featured_vertical )
    $out .="<tr>\n";
    $out .= "<td align=\"center\" height=\"" . $thumb_height . "\" width=\"" . $thumb_width . "\" class=\"featured\" valign=\"middle\">";
    $out .= "<div STYLE=\"width: ".$thumb_width."; overflow : hidden;\">";
    $image_alt = process_line_output($featured_arr['NickName']) .': '. process_line_output( $featured_arr['DescriptionMe'] );
    $out .= "<a href=\"{$site['url']}profile.php?ID={$featured_arr['ID']}\"><img $thumb_pic_size alt=\"$image_alt\" title=\"$image_alt\" border=0 src=\"$src\"></a>";
    $out .= "</div></td>";
    if ( $featured_vertical )
    $out .="</tr>\n";
    }
    return $out;
    }
    }




    to your new featured.php

    change the page call to 600

    find:

    $_page_cont[$_ni]['featured_members'] = PageCompFeatured($featured_vertical);


    below it add:

    $_page_cont[$_ni]['featured_mempage'] = PageCompFeatured($featured_vertical2);

    $_page_cont[$_ni]['featured_mempage1'] = PageCompFeatured($featured_vertical3);

    $_page_cont[$_ni]['featured_mempage2'] = PageCompFeatured($featured_vertical4);


    Then:

    In your members.inc.php make the appropriate changes for the new links.



    Take your tmpl_ae3_page.html and rename it to tmpl_ae3_page_600.html


    add: (see tmpl_ae3_page_600.doc rename to .html to edit)




    <tr><td colspan=2 bgcolor=FFFFFF><table align="center">__featured_members__</table>


    <tr><td colspan=2 bgcolor=FFFFFF><table align="center">__featured_mempage__</table>

    <tr><td colspan=2 bgcolor=FFFFFF><table align="center">__featured_mempage1__</table>

    <tr><td colspan=2 bgcolor=FFFFFF><table align="center">__featured_mempage2__</table>



    To see how this looks hit: http://CageMe.com/featured.php

    All this may be over kill but it's Friday and I am using the shotgun method.....lol......

    I have not coded for redundancies so....................

    Enjoy.


    TGIF..

    Todd
    Attached Files Attached Files

  2. #2
    fido
    Guest

    Default

    Thanks for posting this mod.

    I had to tweak it a bit as I use the ACT template which means the Featured Members run vertically on the index page (not horizontally like your template) so the first table on the feature.php was running vertically and the rest were horizontal.

  3. #3

    Join Date
    Feb 2006
    Posts
    92

    Default

    Tried this and got _page_main_code. I am using template the mcl template. Is there something else I might need to change?
    Aedating 4.1 Patch 2
    Dolphin 5.3

  4. #4
    Prometheus
    Guest

    Default

    I have rewritten this mod. I now displays the members profiles not just their picture. See http://cageme.com/featured.php

    This is a copy and paste job.

    Copy the attached featured.php to you your root.

    Of course you will have to change the attached template for your template.

    Add __featured_members_title__ and __like_search_result__ as it is in the attached tmpl_ae3_page_600.html make sure you put these in a table.

    rename the attached tmpl_ae3_page_600.doc to
    tmpl_ae3_page_600.html to view it.

    Peace.

    Todd
    Attached Files Attached Files

  5. #5

    Join Date
    Feb 2006
    Posts
    92

    Default

    Works great! Thanks.
    Aedating 4.1 Patch 2
    Dolphin 5.3

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Featured Members box
    By ebuddiez in forum Graphics / Templates
    Replies: 1
    Last Post: 02-21-2007, 12:30 PM
  2. Featured Members Question
    By Fototrust in forum Dolphin General Discussion v5.0 to v5.21
    Replies: 4
    Last Post: 01-24-2007, 01:44 PM
  3. Featured Members = Couples
    By thrullas in forum General Troubleshooting
    Replies: 2
    Last Post: 11-03-2006, 10:33 AM
  4. Featured members
    By M@rix in forum Dolphin General Discussion v5.0 to v5.21
    Replies: 4
    Last Post: 08-11-2006, 11:04 PM
  5. Featured Memvers vs Top Members
    By hafleystyles in forum General Troubleshooting
    Replies: 0
    Last Post: 06-30-2006, 03:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •