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)

Atakan KOC 12-19-2007 10:00 PM

Lucky Thread
 
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>

Atakan KOC 12-20-2007 01:51 PM

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

katilkuzu 12-20-2007 01:51 PM

hmm reserved... i ll try

kaptanblack 12-20-2007 02:13 PM

Thanks

Snake 12-20-2007 03:22 PM

Many thanks for the release!

yahoooh 12-20-2007 04:58 PM

can be depend in usergroup?

semauae 12-20-2007 04:59 PM

thnx

I want to choose the luky thread from the new threads only

can I ?

Hornstar 12-21-2007 01:49 AM

Just wondering, will this try and send a normal member into a staff only section (but give them the no permission error) OR will it only send them to forums they have permission to view in the first place.

blastup 12-21-2007 05:38 AM

i like this idea.. is there a way it can be turn to include just the thread id..just a group of threads that it will display random from .. it would be to much of a hassle to then to exclude all of the categories. let me know asap thanks

Mazinger 12-21-2007 09:31 AM

Does this work on 3.6.8?

IrPr 12-21-2007 10:38 AM

Quote:

Originally Posted by Mazinger (Post 1406056)
Does this work on 3.6.8?


Check this out: https://vborg.vbsupport.ru/showthread.php?t=160816

Thanks Atakan

Traxdata 12-30-2007 06:11 PM

does not work for me on 3.7.b3.
product installed, navbar changed - no problems at all. but when i click on lucky thread in my navbar then all is see are my smilies. changed location for lucky thread in navbar - still the same. my other members can confirm it.
in acp i disallowed some forums and afterwards all usergroups were unselected. tried to select _ without luck. when i click on save i see unselected usergroups again. very strange.
product disabled.

halkum 02-08-2008 04:22 PM

Quote:

Originally Posted by Traxdata (Post 1412073)
does not work for me on 3.7.b3.
product installed, navbar changed - no problems at all. but when i click on lucky thread in my navbar then all is see are my smilies. changed location for lucky thread in navbar - still the same. my other members can confirm it.
in acp i disallowed some forums and afterwards all usergroups were unselected. tried to select _ without luck. when i click on save i see unselected usergroups again. very strange.
product disabled.

Same issue. Worked right once, then stuck on smilies

binevi 02-09-2008 12:15 AM

i got same problem too. If it works properly that would be great hack ;)

halkum 02-14-2008 10:33 PM

this needs to be fixed or scrapped.

vanpelt 03-09-2008 04:30 AM

It works for me. I've called it 'Lucky Dip". Thanks for the mod.

mgurain 05-21-2008 05:25 AM

Quote:

Originally Posted by hornstar1337 (Post 1405872)
Just wondering, will this try and send a normal member into a staff only section (but give them the no permission error) OR will it only send them to forums they have permission to view in the first place.

same,,

Chadi 05-29-2008 02:40 AM

This is not working for me on 3.7.1

I imported the xml, did manual template edits. For one thing, nothing shows up in navbar. Second, the vboptions > luck thread area does not save my settings. I check the admin, mod, super mod and member usergroup. Click save. It refreshes, then nothing is checked.

Also, the plugin is enabled/active. On top of that, if I manually add the link on forumhome side column, it shows up. However, clicking the link takes me to the smiley list page instead. VBSEO conflict?

aykolandforum 06-02-2008 10:48 AM

thanks..

Chadi 06-03-2008 05:07 PM

I can confirm vbseo is not causing this as the link still redirects to smiley list page when vbseo is disabled.

Anyone else have this problem?

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 =}

PoetJA-1975 08-05-2008 07:31 AM

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.

Thanx = Now works wonderfully on 3.7.2 PL1
Thanx ATAKAN :)

Jacquii.

yingzhou 08-19-2008 01:01 PM

interesting!!!

Chadi 10-05-2008 06:27 PM

I don't know what happened but I'm still getting redirected to the smiley page. It was working fine until today when I noticed it happening.

I applied osperty's method, did not work.

When I originally uploaded the template, I first changed all reference of the word "lucky" to "stumble" instead as we Christians do not believe in "luck".

Anyway, template is called "stumble" in the template list as it was and should be.

The code in the plugin is this:
Code:

if (is_array($settings['stumble_group']))
{
    $settings['stumble_group'] = implode(',', $settings['stumble_group']);
}

The template called "stumble" has this

Code:

<td class="vbmenu_control"><a href="misc.php?do=stumble">$vbphrase[stumble]</a></td>

Chadi 10-11-2008 09:12 PM

Would appreciate help on this. Thanks.

Chadi 10-18-2008 06:43 PM

Would appreciate any help on this.

vithorius 10-18-2008 09:45 PM

This is an interesting Mod, but I see that there is not much support from the coder, right...?!? :confused: :(


I would like to install it, but it would have to have some way to disable some of my sub-forums... (I really would not like to have Classifieds on the "Lucky Thread")

Chadi 10-29-2008 05:02 PM

Uninstalled since it does not work.

RTMdotORG 06-13-2009 12:01 AM

I Have Fixed This MOD....
Do The Same Template Edits...

And Install This XML....

tommac3 06-13-2009 10:22 PM

Quote:

Originally Posted by RTMdotORG (Post 1828682)
I Have Fixed This MOD....
Do The Same Template Edits...

And Install This XML....

didnt do the template edits ... but it seems to work ... do I need to do the edits?

DobieGillis? 06-13-2009 11:11 PM

man, hit the lucky button and got transported to another dimension. One hell a mod!


All times are GMT. The time now is 05:49 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.01427 seconds
  • Memory Usage 1,844KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_html_printable
  • (4)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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