vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Member of the Day! (https://vborg.vbsupport.ru/showthread.php?t=34779)

cditty 02-25-2002 02:09 AM

By chance did you try the query that FireFly gave me?

PHP Code:

$newmember=$DB_site->query_first("SELECT userid,username,userid*0+RAND() AS randNum
                                        FROM user
                                       WHERE userid<>
$daybits[1]
                                         AND (usergroupid=5
                                          OR usergroupid=6
                                          OR usergroupid=7
                                          OR usergroupid=2)
                                       ORDER BY randNum
                                       LIMIT 1"
); 


FireFly, any thoughts about my last question? ie....use an image on the MOTD's posts. Something like the birthday hack?

Chris

ForKmaN 02-27-2002 03:09 AM

I would try but how do i run a query?

cditty 02-27-2002 02:02 PM

Check out this thread - http://www.vbulletin.com/forum/showt...threadid=18558

Chris

wvvwnet 02-27-2002 11:55 PM

DO you have an example of forum has this hacks work on?

Admin 02-28-2002 10:05 AM

This forum.

streamzone 03-03-2002 12:59 AM

sounds like a cool hack. i ran the db queery and modified the index.php then added the code to forumhome template...but i do not see member of the day :(

verion 2.2.2.

any idea's on what i should try fellas?

Thanx

streamzone 03-03-2002 01:04 AM

umm...DUH!! i swear my own eyes deceive me sometimes. i got it working by following the very easy directions and its working great. thanx again for another cool hack guys.

neal 03-03-2002 08:21 PM

Quote:

Originally posted by ForKmaN
I get this:

Database error in vBulletin 2.2.1:

Invalid SQL: SELECT userid,username
FROM user
WHERE userid<>
AND (usergroupid=5
OR usergroupid=6
OR usergroupid=7
OR usergroupid=2)
ORDER BY RAND()
LIMIT 1
mysql error: You have an error in your SQL syntax near 'AND (usergroupid=5
OR usergroupid=6
' at line 4

mysql error number: 1064

Date: Sunday 24th of February 2002 03:53:22 PM
Script: http://www.gb-mod.net/forums/forums/index.php?
Referer: http://www.gb-mod.net/forums/admin/i...hp?action=head


And how Do I query that first line?

This is exactly what I am getting... it is not a random problem like you were having cditty. Any ideas anyone?

cditty 03-03-2002 09:47 PM

Quote:

Originally posted by FireFly
Replace:
Code:

                                      WHERE userid<>$daybits[1]
with:
Code:

                                      WHERE userid<>$daybits[1] AND lastactivity>".time()-(86400*14)."
(14 is the number of days)

By the way, I'm not sure myself whether it's lastactivity or lastvisit we need to check, so I'm open for corrections here. :)


Chen, any idea on how to get the time feature to work with that mysql you gave me? I played with it a bit and couldn't figure it out.

Thanks

Chris

Admin 03-04-2002 11:37 AM

What went wrong cditty?

ForKmaN and neal, run the query I gave in the hack instructions.


All times are GMT. The time now is 10:51 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01360 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete