vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   End-User Options - Lucky Thread (https://vborg.vbsupport.ru/showthread.php?t=165704)

Opserty 06-04-2008 02:56 PM

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.

Chadi 06-04-2008 05:05 PM

Quote:

Originally Posted by Opserty (Post 1540675)
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.

Opserty 06-05-2008 11:18 AM

Make sure you re-save the settings for the modification in vBulletin Options. It works for me on 3.7.1

binevi 06-05-2008 10:14 PM

<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

Opserty 06-06-2008 08:04 AM

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).

Ninth Dimension 06-06-2008 11:17 AM

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 :)

binevi 06-06-2008 12:47 PM

Quote:

Originally Posted by Opserty (Post 1542155)
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 ;)

formunda 06-07-2008 08:53 AM

Thanks Atakan :)

Chadi 07-11-2008 10:47 PM

edit, nevermind :)

ErrorLog 07-25-2008 09:49 AM

Eyvallah Atakan KOÇ !!

İnstalled =}


All times are GMT. The time now is 02:00 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.03261 seconds
  • Memory Usage 1,757KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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