Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Random Thread Details »»
Random Thread
Version: 1.00, by GWLiaR GWLiaR is offline
Developer Last Online: Feb 2014 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 3.7.x Rating:
Released: 10-07-2008 Last Update: Never Installs: 21
 
No support by the author.

English:
What Does it?:This hack will add to Navbar Random Thread .

Install:
+Go to admin Cp
+Plugin System -> Manage Products -> [Add/Import Product] -> Select
+'product-random_thread.xml' then İmport.

Find Navbar:
Code:
        <if condition="$show['pmwarning']"><div><strong><phrase 1="$vbphrase[pmpercent_nav_compiled]">$vbphrase[your_pm_box_is_x_full]</phrase></strong></div></if>
Add Below:
Code:
$rthread
Mark As Installed

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 10-08-2008, 11:41 AM
GWLiaR GWLiaR is offline
 
Join Date: Mar 2008
Location: Mersin/TR
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*Reserved
Reply With Quote
  #3  
Old 10-08-2008, 11:50 AM
TilkiBey's Avatar
TilkiBey TilkiBey is offline
 
Join Date: Jul 2008
Location: Konya, TR
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

pls renew ur ss with supporting file types (jpg,jpeg etc.)

bmp desteklenmiyor inferno,direkt g?z?kmesi daha hoş olur demo g?r?nt?n?n
Reply With Quote
  #4  
Old 10-08-2008, 11:53 AM
GWLiaR GWLiaR is offline
 
Join Date: Mar 2008
Location: Mersin/TR
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TilkiBey View Post
pls renew ur ss with supporting file types (jpg,jpeg etc.)

bmp desteklenmiyor inferno,direkt g?z?kmesi daha hoş olur demo g?r?nt?n?n
D?zelttim..
Added JPEG Demo
Reply With Quote
  #5  
Old 10-08-2008, 02:14 PM
NAZIA's Avatar
NAZIA NAZIA is offline
 
Join Date: Feb 2008
Location: Multan Pakistan
Posts: 322
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

reserved...
Reply With Quote
  #6  
Old 10-08-2008, 02:36 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That query will/could bring a forum to it's knees running every page view.

Code:
mysql> explain Select * From thread order by rand() DESC LIMIT 1
    -> ;
+----+-------------+--------+------+---------------+------+---------+------+------+---------------------------------+
| id | select_type | table  | type | possible_keys | key  | key_len | ref  | rows | Extra                           |
+----+-------------+--------+------+---------------+------+---------+------+------+---------------------------------+
|  1 | SIMPLE      | thread | ALL  | NULL          | NULL | NULL    | NULL | 6026 | Using temporary; Using filesort |
+----+-------------+--------+------+---------------+------+---------+------+------+---------------------------------+
1 row in set (0.03 sec)
As you can see, a full table walk.

Here's a better way.

Code:
60*60 == 3600
3600*24 == 14400
14400*30 == 432000
1223479602 - 432000 == 1223047602

mysql> explain Select * From thread where dateline >= 1223047602 order by dateline DESC limit 1;
+----+-------------+--------+-------+---------------+----------+---------+------+------+-------------+
| id | select_type | table  | type  | possible_keys | key      | key_len | ref  | rows | Extra       |
+----+-------------+--------+-------+---------------+----------+---------+------+------+-------------+
|  1 | SIMPLE      | thread | range | dateline      | dateline | 4       | NULL |  104 | Using where |
+----+-------------+--------+-------+---------------+----------+---------+------+------+-------------+
1 row in set (0.00 sec)
See the difference? Gotta use those indexes. Rand() is bad.
Reply With Quote
  #7  
Old 10-08-2008, 05:44 PM
ahtapod ahtapod is offline
 
Join Date: Sep 2008
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It runs wrong.

When used, it transfers users to wrong thread.
Reply With Quote
  #8  
Old 10-08-2008, 06:51 PM
MrZeropage's Avatar
MrZeropage MrZeropage is offline
 
Join Date: Nov 2003
Location: Munich, Germany
Posts: 3,012
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Attention - this does not take care of hidden forums or forumpermissions, means it could also bring up a thread from your internal hidden administrator-forum...
Reply With Quote
  #9  
Old 10-08-2008, 06:55 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Add "AND forumid not in(1,2,3)" to the query.

This hack needs a lot of work.
Reply With Quote
  #10  
Old 10-12-2008, 11:05 PM
yousellstuff yousellstuff is offline
 
Join Date: Apr 2008
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

whats the point of this
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:03 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06467 seconds
  • Memory Usage 2,291KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete