Quote:
Originally Posted by Mobo
Great Hack!! Just installed it with the ET&Trap in the postbit with no probs at all!! Well done.
I do have one question. Would it be possible to make it were only users or a certain User group should show up on the main list (timeslip.php)? My site has normal users and paid members, and I'd like for this to be an extra feature that the paid members have.
Thanks for the great Hack!
|
Just change the queries in timeslips.php so that it only selects from your specified usergroup like this:
Find:
Code:
// Get total number of users
$userscount=$DB_site->query_first("SELECT COUNT(*) AS users
FROM user,userfield
$cond
AND user.userid = userfield.userid");
Replace it with:
Code:
// Get total number of users
$userscount=$DB_site->query_first("SELECT COUNT(*) AS users
FROM user,userfield
$cond
AND user.userid = userfield.userid AND user.usergroupid = X");
Change the X to the usergroupid in this bit of code: user.usergroupid = X
Then find:
Code:
// Get users
$users=$DB_site->query("SELECT *
FROM user,userfield
WHERE user.userid = userfield.userid
$condition
ORDER BY $orderby $direction
LIMIT $pos,$perpage");
Replace it with:
Code:
// Get users
$users=$DB_site->query("SELECT *
FROM user,userfield
WHERE user.userid = userfield.userid
AND user.usergroupid = X
$condition
ORDER BY $orderby $direction
LIMIT $pos,$perpage");
Again, change the X in the code above to the usergroupid.
Quote:
Okay, I ran into a problem. When I tried to put a link to the timeslip.php file on my forum, ithe page is not found. I added a button int the Head section (forum styles). This what I added...
<a href="timeslips.php?s=$session[sessionhash]"><img src="{imagesfolder}/top_carinfo.gif" alt="Timeslips, Mods and HP!!" border="0"></a>
|
Is this in your forum directory? Try adding $bburl/ before timeslips.php. If that doesn't work just add the full url. If you can go to the page manually its gotta be just a typo in the URL or timeslips.php isn't in that directory.