Quote:
Originally Posted by Dead Eddie
Yes. What do you actually need help with? How much PHP do you know?
|
Hello Dead Eddie,
thank you for your quick reply.
My PHP-Knowlege is not that good. Reading and edit a existing code is not a big deal, but write one by my self is a little to much for me.
I looked into the member.php and widget_memberslist and try to get a code sniped to edit it into order by desc - limit 5 or something like that.
Unfortunately I didn't find anything that helped me.
A big question for me is also if it is safe to make a php module in Site Edit with a DB query inside or rather how xould I use the db query within vB.
So I think I need a lot of help
Edit: Find a example at vBulletin.com that helps me a little...
http://www.vbulletin.com/forum/forum...-or-php-widget
Hopfully vB5 is working like this too... But it would be fine to have a latest-member-module to choose in "Edit site".
Try to make a php-module and call for help if I need it :-)
--------------- Added [DATE]1409605624[/DATE] at [TIME]1409605624[/TIME] ---------------
Ok, this is my idea or some code I edit from the Mod "Member Liste for VB5" (Thanks to the Developer
wdwms)
But it shows nothing so I need your help!
PHP Code:
<?
$max_results = 5;
//*** Display for Logged in Users only
//*** Set to 0 if you want the memberlist to only be shown to those users that are logged in
$showto_loggedout = 0;
//*** Check if user is logged in
$vbsession = $HTTP_COOKIE_VARS[bbsessionhash];
$query = vB::$db->query_first("Select loggedin from ".$vb_prefix."session where sessionhash = '$vbsession'");
$result2=mysql_db_query("$vb_table", "$query");
$loggedin=mysql_result($result2,0,"loggedin");
?>
<style> <!--
.dbhover {border: 1px solid #b4b4b4 !important;}
.dbhover:hover { background-color: #E5E7E8; }
--> </style>
<?
//*** //$total_results = mysql_num_rows($result); Anzahl User gesamt
$num=mysql_numrows($result2);
$total_results=mysql_numrows($result2);
//*** Falls eingeloggt oder auch nicht registrierten Nutzern zeigen
if ($loggedin || $showto_loggedout)
{
$query ="Select * from ".$vb_prefix."user order by userid desc LIMIT $from, $max_results";
$result=mysql_db_query("$vb_table", "$query");
$num=mysql_numrows($result);
$i=0;
while ($i < $num) {
$username=mysql_result($result,$i,"username");
$vbid=mysql_result($result,$i,"userid");
$joindate=mysql_result($result,$i,"joindate");
$posts=mysql_result($result,$i,"posts");
?>
<tr bgcolor="#F4F4F4" class=dbhover>
<td align="center" class=dbhover>
<img src=<? echo $vb_url; ?>/core/image.php?userid=<? echo $vbid;?> width=50>
</td>
<td align="left" class=dbhover>
<a href="<? echo $vb_url; ?>/member/<? echo $vbid; ?>-<?echo $username; ?>"><?echo $username; ?></a>
<br><font size=1>(<? echo $usertitle; ?>)</td>
</td>
<td valign=middle align="center" class=dbhover>
<? echo date("m-d-y",$joindate); ?>
</td>
<td valign=middle align="center" class=dbhover>
<? echo $posts; ?>
</td>
</tr>
<?
++$i;
}
}
else { ?>
<ul class="notices"><li class="notice restore" data-notice-id="1" data-notice-persistent="1">
<body bgcolor="white"><center>
<b><font style="color: red; font-weight: bold; font-size: 14px;">
Du musst eingeloggt sein um die neuesten Nutzer sehen zu k?nnen.</font></b>
</li>
</ul>
<?
}
?>
Thanks a lot!!!