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

Reply
 
Thread Tools
Lucky Thread Details »»
Lucky Thread
Version: 1.20, by Atakan KOC Atakan KOC is offline
Developer Last Online: Mar 2023 Show Printable Version Email this Page

Category: End-User Options - Version: 3.7.0 Beta 3 Rating:
Released: 12-19-2007 Last Update: Never Installs: 44
Uses Plugins Template Edits Auto-Templates
 
No support by the author.

Lucky Thread

This hack redirects the user to a various thread when they click "Lucky" button on the navbar. This is like Google's lucky button. Let's see what is your lucky subject.

Mark as Installed - Nominate for MOTM


install

Go to your admin cp, then:
Plugin System -> Manage Products -> [Add/Import Product] -> Select 'product-lucky.xml' from your computer then press 'Import'

Modifications Info

Plugin : 3
Phrases : 1
Template : 1
Setting : 0

Versions:
v1.0 - 22 Octaber 2007
-First release

v1.1 - 28 Octaber 2007
- Query error fixed
- Setting Added
- Usergroup permisson added
- Disallow forum ID added
- Forum permisson added
- On/Off added

v1.2 - 20 December 2007
- vBulletin 3.7
- Project name change "Lucky Button => Lucky Thread"
- Small Phrase change

Mark as Installed - Nominate for MOTM


Manuel Template Change

Open navbar template

HTML Code:
vbphrase[faq]</a></td>
add below

HTML Code:
<td class="vbmenu_control"><a href="misc.php?do=lucky">$vbphrase[lucky]</a></td>

Show Your Support

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

Comments
  #22  
Old 06-04-2008, 02:56 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this...
  1. AdminCP > Plugins & Products > Plugin Manager
  2. From the list look for:
    Quote:
    Lucky admin_options_processing [Edit] [Delete]
  3. Click [Edit].
  4. Change the PHP Code (the bit in the big box) to:
    PHP Code:
    if (is_array($settings['lucky_group']))
    {
        
    $settings['lucky_group'] = implode(','$settings['lucky_group']);

It should work, I hope.
Reply With Quote
  #23  
Old 06-04-2008, 05:05 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Opserty View Post
Try this...
  1. AdminCP > Plugins & Products > Plugin Manager
  2. From the list look for:
  3. Click [Edit].
  4. Change the PHP Code (the bit in the big box) to:
    PHP Code:
    if (is_array($settings['lucky_group']))
    {
        
    $settings['lucky_group'] = implode(','$settings['lucky_group']);

It should work, I hope.
Thank you. Unfortunately it still redirects to the smiley list.
Reply With Quote
  #24  
Old 06-05-2008, 11:18 AM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make sure you re-save the settings for the modification in vBulletin Options. It works for me on 3.7.1
Reply With Quote
  #25  
Old 06-05-2008, 10:14 PM
binevi binevi is offline
 
Join Date: Jan 2008
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<defaultvalue>2,5,6,7</defaultvalue> that gives permission to some usergroup

what i done is i put all the usergroups number and save it and than import is as a product.

try to install attachment if it doesnt work i cant say anything else ;D

anyway it works for me properly
Reply With Quote
  #26  
Old 06-06-2008, 08:04 AM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

binevi did you try the instructions I provided? If you did, did they work? (Your method won't allow you to change settings for this product in future).
Reply With Quote
  #27  
Old 06-06-2008, 11:17 AM
Ninth Dimension's Avatar
Ninth Dimension Ninth Dimension is offline
 
Join Date: Oct 2001
Location: London, England.
Posts: 739
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is an error in the code in one of the plugins.

Edit the 'misc_start' code within the plugin manager and replace with this:
PHP Code:
if ($_REQUEST['do'] == 'lucky')
{
if (
$vbulletin->options['lucky_onoff'])
{
$wol_can_view is_member_of($vbulletin->userinfo,explode(',',$vbulletin->options['lucky_group'])) ? true false;
if (
$wol_can_view)
{
$excludedforums '';
if (
$vbulletin->options['lucky_forum'] !== '') {
    
$excludedforums ',' $vbulletin->options['lucky_forum'];


$forumpermissions = array();
foreach(
$vbulletin->forumcache AS $forum) {

    
$forumpermissions[$forum["forumid"]] = fetch_permissions($forum['forumid']);

    if (!(
$forumpermissions[$forum["forumid"]] & $vbulletin->bf_ugp_forumpermissions['canview']) AND !$vbulletin->options['showprivateforums'])  {
        
$excludedforums $excludedforums ',' $forum['forumid'];
    }
}
unset(
$forum);

// get rid of initial comma
$excludedforums substr($excludedforums1);

if (
$excludedforums != "") {
    
$excludedforums "AND " TABLE_PREFIX "thread.forumid NOT IN ($excludedforums)";
}

$lucky_threads $db->query_first("SELECT threadid, dateline, visible FROM " TABLE_PREFIX "thread WHERE NOT ISNULL(threadid) AND visible = '1' $excludedforums ORDER BY RAND() LIMIT 1");
header('Location: showthread.php?t='.$lucky_threads['threadid']);
}
}

If you want to know what I've changed, you'll see a new " . TABLE_PREFIX . " contained within this section of code
Code:
if ($excludedforums != "") {
    $excludedforums = "AND " . TABLE_PREFIX . "thread.forumid NOT IN ($excludedforums)";
}
I hope this helps someone
Reply With Quote
  #28  
Old 06-06-2008, 12:47 PM
binevi binevi is offline
 
Join Date: Jan 2008
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Opserty View Post
binevi did you try the instructions I provided? If you did, did they work? (Your method won't allow you to change settings for this product in future).
There wasnt any explaination when i installed this product. thats why i find it by my self. I tried your method it works
Reply With Quote
  #29  
Old 06-07-2008, 08:53 AM
formunda formunda is offline
 
Join Date: Sep 2006
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Atakan
Reply With Quote
  #30  
Old 07-11-2008, 10:47 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

edit, nevermind
Reply With Quote
  #31  
Old 07-25-2008, 09:49 AM
ErrorLog ErrorLog is offline
 
Join Date: Jul 2008
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Eyvallah Atakan KOÇ !!

İnstalled =}
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 01:52 PM.


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.04833 seconds
  • Memory Usage 2,329KB
  • Queries Executed 25 (?)
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
  • (1)bbcode_code
  • (2)bbcode_html
  • (3)bbcode_php
  • (3)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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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