View Full Version : End-User Options - Lucky Thread
Atakan KOC
12-19-2007, 10:00 PM
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 (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=165704) - Nominate for MOTM (https://vborg.vbsupport.ru/vborg_miscactions.php?do=nominate&threadid=165704&type=1)
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 (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=165704) - Nominate for MOTM (https://vborg.vbsupport.ru/vborg_miscactions.php?do=nominate&threadid=165704&type=1)
Manuel Template Change
Open navbar template
vbphrase[faq]</a></td>add below
<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?
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
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
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...
AdminCP > Plugins & Products > Plugin Manager
From the list look for:
Lucky admin_options_processing [Edit] [Delete]
Click [Edit].
Change the PHP Code (the bit in the big box) to:
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
Try this...
AdminCP > Plugins & Products > Plugin Manager
From the list look for:
Click [Edit].
Change the PHP Code (the bit in the big box) to:
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:
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($excludedforums, 1);
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 if ($excludedforums != "") {
$excludedforums = "AND " . TABLE_PREFIX . "thread.forumid NOT IN ($excludedforums)";
}
I hope this helps someone :)
binevi
06-06-2008, 12:47 PM
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
Try this...
AdminCP > Plugins & Products > Plugin Manager
From the list look for:
Click [Edit].
Change the PHP Code (the bit in the big box) to:
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:
if (is_array($settings['stumble_group']))
{
$settings['stumble_group'] = implode(',', $settings['stumble_group']);
}
The template called "stumble" has this
<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
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!
RTMdotORG
06-14-2009, 12:09 AM
didnt do the template edits ... but it seems to work ... do I need to do the edits?
nope i guess not, lol
gungor
04-06-2010, 08:16 AM
thanks..
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.