Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons

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
  #12  
Old 10-17-2008, 09:40 PM
tirol07 tirol07 is offline
 
Join Date: Mar 2007
Location: Austria
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GWLiaR View Post
D?zelttim..
Added JPEG Demo
bi sorum olacaktı arkadaşım bunu vb sayfası hari? g?sterme imanımız varmi?

Mesela vbulletin haric bir sayfada 5 rastgele konu g?stermek istiyorum! m?mk?nm? bu?
Reply With Quote
  #13  
Old 10-18-2008, 03:54 AM
GWLiaR GWLiaR is offline
 
Join Date: Mar 2008
Location: Mersin/TR
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tirol07 View Post
bi sorum olacaktı arkadaşım bunu vb sayfası hari? g?sterme imanımız varmi?

Mesela vbulletin haric bir sayfada 5 rastgele konu g?stermek istiyorum! m?mk?nm? bu?
Evet M?mk?n...Mysal ile Yapabilirsin
Reply With Quote
  #14  
Old 10-19-2008, 08:09 PM
tirol07 tirol07 is offline
 
Join Date: Mar 2007
Location: Austria
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GWLiaR View Post
Evet M?mk?n...Mysal ile Yapabilirsin
Peki nasıl yaplıyor bu mysal dediğin?

Detaylı anlatabilirmisin sana zahmet, ?ok uğraştım yapamadım?
Reply With Quote
  #15  
Old 11-14-2009, 12:31 PM
KrisP KrisP is offline
 
Join Date: Jun 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ahtapod View Post
It runs wrong.

When used, it transfers users to wrong thread.
In plugin change

Quote:
$ryaz.="<a href=showthread.php?p=$veri[threadid]>$baslik</a>";
to

Quote:
$ryaz.="<a href=showthread.php?t=$veri[threadid]>$baslik</a>";
Reply With Quote
  #16  
Old 06-06-2010, 04:19 AM
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Location: Google Kansas
Posts: 4,678
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It would be handy if this worked properly, I could use it.
Does anyone know of a 3.8 version?

PS... I think the rules say you have to speak in english, or at least have an english version.
Reply With Quote
  #17  
Old 08-12-2011, 11:21 AM
valdet's Avatar
valdet valdet is offline
 
Join Date: Feb 2007
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry to bump this thread.

Quote:
Originally Posted by noppid View Post
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.
Can you please let me know how would I optimize this query so it doesn't overload the database as much as with rand() function.

Also how to add the limitations so it does not opens threads from private forums?

Thanks
Reply With Quote
Reply

Thread Tools

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 04:19 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.07782 seconds
  • Memory Usage 2,271KB
  • 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
  • (7)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
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)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_postinfo_query
  • fetch_postinfo
  • 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