View Single Post
  #174  
Old 02-02-2004, 09:18 PM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01063 seconds
  • Memory Usage 1,780KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete