What happens when...

Morus

www.votezone.eu , www.privateserversranking.com
License Active
1 problem, it is showing me all my members instead of only 10. hmm
 

Mark

Administrator
Staff member
skin_global.php of yoru plugin your still using 55 in the query, set this to 10 and you should be all set :)
 

Morus

www.votezone.eu , www.privateserversranking.com
License Active
i changed it to 10 and still was showing all
 

Morus

www.votezone.eu , www.privateserversranking.com
License Active
I removed

//How New Members To Show
$new_featured_members_limit = 5;
Cause I used the code you gave me above. With the $new_featured_members_limit = 5;
i have an error

Code:
$TMPL['premium_member_carousel_list'] = '';
$TMPL['new_featured_members_side_list'] = '';
$TMPL['new_featured_members_side_list_row'] = '';
 
 
$result = $DB->query("SELECT username,url,title,description,category FROM {$CONF['sql_prefix']}_sites WHERE active = 1 ORDER BY RAND()", 10, 0, __FILE__, __LINE__);
while ($row = $DB->fetch_array($result)) {
 
    $TMPL['newest_featured_members_title'] = $row['title'];
    $TMPL['newest_featured_members_url'] = $row['url'];
    $TMPL['newest_featured_members_title'] = $row['title'];
    $TMPL['newest_featured_members_category'] = $row['category']; 
    $TMPL['newest_featured_members_username'] = $row['username'];
 
    //Show Screenshots? (VisioList API Access required)
    if (!empty($CONF['visio_screen_api'])) {
 
        $parse = parse_url($TMPL['newest_featured_members_url']);
      $screenshot_url = $parse['host'];
    $screenshot_url = str_ireplace('/','-',"$screenshot_url");
    $screenshot_url = $screenshot_url.'_small.jpg';
 
      if (file_exists("screens/$screenshot_url")) {
        $TMPL['screenshot'] = "<br /><img src=\"screens/{$screenshot_url}\" alt=\"{$TMPL['newest_featured_members_title']}\" title=\"{$TMPL['newest_featured_members_title']}\" class=\"vistip screenshot\" />";
      }
      else {
        $TMPL['screenshot'] = '';
      }
 
    }
 
  $i++;
  if($i == 1){$active = ' active';}else{$active = '';}
 
  $TMPL['new_featured_members_side_list_row'] .= base::do_plugin_skin('./plugins/NewFeaturedMembers','new_featured_members_side_list_row');
 
}
 
$TMPL['sidebar_1_bottom'] .= base::do_plugin_skin('./plugins/NewFeaturedMembers','new_featured_members_side_list');
 

Morus

www.votezone.eu , www.privateserversranking.com
License Active
I mean I dont have an error when use
Code:
$result = $DB->query("SELECT username,url,title,description,category FROM {$CONF['sql_prefix']}_sites WHERE active = 1 ORDER BY join_date DESC LIMIT $new_featured_members_limit", __FILE__, __LINE__);
But I want random
 

Mark

Administrator
Staff member
$DB->query should be $DB->select_limit

that should do it :)


PHP:
$result = $DB->select_limit("SELECT username,url,title,description,category FROM {$CONF['sql_prefix']}_sites WHERE active = 1 ORDER BY RAND()", 10,0, __FILE__, __LINE__);
 

Morus

www.votezone.eu , www.privateserversranking.com
License Active
Yes, I don't know how I missed that. I will update the plugin then. Chears
See attached Plugin, updated
 

Attachments

Mark

Administrator
Staff member
no problem, i miss this stuff all the time :) let me know how it works for you
 

Morus

www.votezone.eu , www.privateserversranking.com
License Active
It works ok, just need to put it in other place on wrapper but I think it can be added to 0.7 as plugin for those people that need it. :) Thanks again
 

Mark

Administrator
Staff member
good stuff :) would be great to see our first user contributed plugin!

cheers
 

Morus

www.votezone.eu , www.privateserversranking.com
License Active
ohh, its yours anyway :) i was just following your instructions :) but I think the premium plugin should be added for sure. Also ask Basti for the members server online status, thats cool plugin :)
 
Top