Version: 1.00, by Tigga
Developer Last Online: Nov 2023
Category: Add-On Releases -
Version: 3.6.2
Rating:
Released: 11-06-2006
Last Update: Never
Installs: 33
No support by the author.
For those running both vBadvanced CMPS and the new Zoints Local profile system, here is a CMPS module to show random Zoints profile's on your CMPS pages. Simply download the attached file, remove the ".php" extension from the end (that had to be added for vb.org to accept it as an attachment) and upload it using the "Download / Upload Module" link under the vBa CMPS section of your Admin CP.
Enjoy!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Well, I am using basketmen's latest contribution and nothing is being displayed.
I have the proper path, assigned module to a page, and activated it...
Here is what I got so far:
Code:
<?php
// ++=========================================================================++
if (@include_once($mod_options['portal_zoints_path'] . '/includes/localsettings.php'))
{
// Determine the type of user profile links
if ($config['mod rewrite'])
{
$zlinkstyle = 'rewrite';
}
else
{
$zlinkstyle = 'normal';
}
// Determine the URL of the Zoints Local installation
if ($vbulletin->options['zointsprofile_zurl'])
{
$zurl = $vbulletin->options['zointsprofile_zurl'] . '/';
}
else
{
$zurl = '/z/';
}
// Connect to the Zoints Local database
$zlink = mysql_connect($config['master_server']['host'], $config['master_server']['user'], $config['master_server']['pass']);
mysql_select_db($config['server_database']);
// Select the users from the Zoints Local user table
$getusers = mysql_query("
SELECT *
FROM " . $config['table prefix'] . "user
ORDER BY RAND()
LIMIT $mod_options[portal_zoints_randmemb_limit]
", $zlink);
// Loop through the users selected and build the output
while ($user = mysql_fetch_array($getusers))
{
// Alternate the background color
exec_switch_bg();
// Build the link to the user's profile
$user['zurl'] = $config['site url'] . sprintf($config['profile'][$zlinkstyle]['url'], $user['usertoken']);
// Get an avatar for the user
if ($user['avatar'])
{
// If the user uploaded a Zoints Local avatar then use it
$user['avatar_path'] = $zurl . 'user/' . implode('/', array_reverse(preg_split("##", $user['userid'], -1, PREG_SPLIT_NO_EMPTY))) . '/avatar.' . $user['avatar'];
}
else
{
// If the user does not have a Zoints Local avatar then use their vBulletin avatar
require_once('./includes/functions_user.php');
$user['avatar'] = true;
$avatarurl = fetch_avatar_url($user['userid']);
if (!$avatarurl)
{
// If the user does not have a Zoints local avatar and they do
// not have a vBulletin avatar then use a generic image.
$user['avatar_path'] = $stylevar['imgdir_misc'] . '/noavatar.gif';
}
else
{
// If The user does not have a Zoints Local avatar and they do
// have a vBulletin avatar so use it.
$user['avatar_path'] = $vbulletin->options['bburl'] . '/' . $avatarurl[0];
}
}
// Finally go ahead and build the actual template output
eval('$home[$mods[modid]][content] .= "' . fetch_template('adv_portal_zoints_randmemb') . '";');
}
// Free the query results
mysql_free_result($getusers);
}
?>