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


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks