vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Best&Worst Thread of the day-Week-Month (https://vborg.vbsupport.ru/showthread.php?t=107711)

Developer 02-10-2006 10:00 PM

Best&Worst Thread of the day-Week-Month
 
Best&Worst Thread of the day-Week-Month
Description::.
This hack shows in forum home Best&Worst Thread of the day-Week-Month
[Hack Features::.
1-easy yo install
[See Screen Shots]
Admin Controllable
From vBulletin Options ==> vBulletin Options ==> Best&Worst Thread of the (day,week,month) Statistics.]

Installation::.
1-Import The Product.
2-Edit Template FORUMHOME
Find:
Code:

<!-- end what's going on box -->
Add After it
Code:

<if condition="$vboptions[enbwt]"><if condition="$vboptions[enbt]"><table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" height="10"><tbody>
        <tr>
                <td class="thead" height="10" colspan="3">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('bthread')"><img id="collapseimg_bthread" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_bthread].gif" alt="" border="0" /></a>
                $vbphrase[bthread]</td>
        </tr>
</tbody>
<tbody id="collapseobj_bthread" style="$vbcollapse[collapseobj_bthread]"
<tr>
<if condition="$vboptions[encolbt1]"><td class='alt1' width='33%' height='20%'>$devebdt</td></if>
<if condition="$vboptions[encolbt2]"><td class='alt1' width='33%' height='20%'>$devebwt</td></if>
<if condition="$vboptions[encolbt3]"><td class='alt1' width='33%' height='20%'>$devebmt</td></if>
</tr>
</tbody></table></if>
<if condition="$vboptions[enwt]"><table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" height="10"><tbody>
        <tr>
                <td class="thead" height="10" colspan="3">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('wthreads')"><img id="collapseimg_wthreads" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_wthreads].gif" alt="" border="0" /></a>
        $vbphrase[wthread]</td>
        </tr>
</tbody>
<tbody id="collapseobj_wthreads" style="$vbcollapse[collapseobj_wthreads]">
<tr>
<if condition="$vboptions[encolwt1]"><td class='alt1' width='33%' height='20%'>$devewdt</td></if>
<if condition="$vboptions[encolwt2]"><td class='alt1' width='33%' height='20%'>$devewwt</td></if>
<if condition="$vboptions[encolwt3]"><td class='alt1' width='33%' height='20%'>$devewmt</td></if>
</tr>
</tbody></table></if><br></if>

History::.
1.0 On 11. Feb 2006 Initial Version.
1.1 On 12 feb 2006 Fixes SQL Query
Hack Languages::.
allan Had translate the hack to french. here
Hellraider Had translate the hack to german. here
Details::.
6 plugin, 26 phrases, 12 options, 6 queries(reading only not change or add)
Donation::.
Feel Free To https://www.paypal.com/en_US/i/btn/x...tcc-donate.gif
aT lAsT::.
IF YOu lIkE iT cLIcK INSTALL
vbulletin.orghttps://vborg.vbsupport.ru/

Support Given For Who Clicked Install {ONLY}

RFViet 02-11-2006 12:57 PM

I'll try it, thanks !!

Marco van Herwaarden 02-11-2006 12:57 PM

just a question: is good or bad only determined by the number of replies?

Also when you are not using an exclude (thread or forum) you are still using it in the where clause. This make the query perform less good. I suggest you only include those in the where if you are excluding something.

I would also suggest you prefix all the used Phraseid's and Varnames, for example with the productid, so there can be no problems with other hacks or future vB versions for using the same names.

Gizmo5h1t3 02-11-2006 12:57 PM

qyuestion : is this a hack that just calls a random thread for a section?
or are the threads selectable??

Developer 02-11-2006 01:29 PM

Quote:

Originally Posted by MarcoH64
just a question: is good or bad only determined by the number of replies?
__________________________________________________ ___________
i think it's good and this hack requested in vbh.com with just hack of the day ordered by replies only

Also when you are not using an exclude (thread or forum) you are still using it in the where clause. This make the query perform less good. I suggest you only include those in the where if you are excluding something.
__________________________________________________ ___________
i think this is the best way :surprised:

I would also suggest you prefix all the used Phraseid's and Varnames, for example with the productid, so there can be no problems with other hacks or future vB versions for using the same names.
__________________________________________________ ___________
ok i'll keep this in mind and now i am putting such a codes like devel,developer,first letter hack name like this hack i used bwt (best&worst thread)

my reply in green

Developer 02-11-2006 01:31 PM

Quote:

Originally Posted by Gizmo5h1t3
qyuestion : is this a hack that just calls a random thread for a section?
or are the threads selectable??

it calls all threads that's not in the exclude forums and threads then ordered by posts

kofoid 02-11-2006 03:08 PM

Do you think that code for FORUMHOME could easily be put into a CMPS Module?

GamerJunk.net 02-11-2006 03:16 PM

Database error in vBulletin 3.5.2:

Invalid SQL:

SELECT thread.postusername,
thread.postuserid,
thread.title AS fth,
thread.lastposter,
thread.replycount,
thread.views,
thread.threadid,
thread.forumid tid,
forum.forumid AS fid,
forum.title AS ft
FROM vb3_thread, forum
WHERE forum.forumid = thread.forumid
AND dateline BETWEEN 1139591779 AND 1139764579
AND thread.forumid NOT IN (0)
AND thread.threadid NOT IN (0)
ORDER BY thread.replycount DESC LIMIT 1;

MySQL Error : Table '******_*****.forum' doesn't exist
Error Number : 1146
Date : Saturday, February 11th 2006 @ 12:16:19 PM

apdcanari 02-11-2006 08:51 PM

same error :speechless:

Mr Chad 02-11-2006 09:37 PM

When i enable this i get:

[sql]
Database error in vBulletin 3.5.3:

Invalid SQL:

SELECT thread.postusername,
thread.postuserid,
thread.title AS fth,
thread.lastposter,
thread.replycount,
thread.views,
thread.threadid,
thread.forumid tid,
forum.forumid AS fid,
forum.title AS ft
FROM BlizzedOut_thread, forum
WHERE forum.forumid = thread.forumid
AND dateline BETWEEN 1139613221 AND 1139786021
AND thread.forumid NOT IN ()
AND thread.threadid NOT IN ()
ORDER BY thread.replycount DESC LIMIT 1;

MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')
AND thread.threadid NOT IN ()
ORD
Error Number : 1064
Date : Saturday, February 11th 2006 @ 06:13:42 PM
Script : http://www.BeastToast.com/forums/index.php?
Referrer :
IP Address : *.*.*.*
Username : Chad
Classname : vb_database
[/sql]

Mr Chad 02-11-2006 10:43 PM

anyone know how to fix this?

o0Hubba0o 02-12-2006 04:22 AM

Like the idea, I'll keep an eye on this one, appears to be some bugs maybe?

PHPGeek2k3 02-12-2006 05:42 AM

hello,

this really isnt a bug just you havent set a setting in the vBulletin Options.

You need to set

Exclude Forums to 0
and
Exclude Threads to 0

than this will work

Thanks
- James

apdcanari 02-12-2006 06:44 AM

Quote:

Originally Posted by PHPGeek2k3
hello,

this really isnt a bug just you havent set a setting in the vBulletin Options.

You need to set

Exclude Forums to 0
and
Exclude Threads to 0

than this will work

Thanks
- James

no...bug for me

orphan 02-12-2006 07:19 AM

for me too

orphan 02-12-2006 07:24 AM

Sql Query is not including table prefix!
If you correct it it works fine

Mr Chad 02-12-2006 07:25 AM

Quote:

Originally Posted by orphan
Sql Query is not including table prefix!
If you correct it it works fine

you sure?

PHPGeek2k3 02-12-2006 09:14 AM

your right and for some reason i didnt see that.

Thanks
- James

Snake 02-12-2006 09:23 AM

Thanks man!

PHPGeek2k3 02-12-2006 09:33 AM

in order to fix this you need to change the every instance of

Code:

FROM " . TABLE_PREFIX . "thread, forum
To the following

Code:

FROM " . TABLE_PREFIX . "thread AS thread, " . TABLE_PREFIX . "forum AS forum

klaush 02-12-2006 02:29 PM

Same here!

Developer 02-12-2006 05:10 PM

Fixes Sql Query But it was Working fine with me :) CUZ:I Don't use Table_Prefix any way thnx for who support the hack :) especially PHPGeek2k3
you have to import the new product from the ZIP make sure you allowed overwrite
regards

klaush 02-12-2006 05:52 PM

Quote:

Originally Posted by Developer
Fixes Sql Query But it was Working fine with me :) CUZ:I Don't use Table_Prefix any way thnx for who support the hack :) especially PHPGeek2k3
you have to import the new product from the ZIP make sure you allowed overwrite
regards

Yep, that?s it! Thanks!

Mr Chad 02-13-2006 02:22 AM

Still wont work :(
[sql]
Database error in vBulletin 3.5.3:

Invalid SQL:

SELECT thread.postusername,
thread.postuserid,
thread.title AS fth,
thread.lastposter,
thread.replycount,
thread.views,
thread.threadid,
thread.forumid tid,
forum.forumid AS fid,
forum.title AS ft
FROM BlizzedOut_thread AS thread, BlizzedOut_forum AS forum
WHERE forum.forumid = thread.forumid
AND dateline BETWEEN 1137213119 AND 1142397119
AND thread.forumid NOT IN ()
AND thread.threadid NOT IN ()
ORDER BY thread.replycount AND thread.views ASC LIMIT 1;

MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')
AND thread.threadid NOT IN ()
ORD
Error Number : 1064
Date : Sunday, February 12th 2006 @ 11:32:01 PM
Script : http://www.BeastToast.com/forums/index.php?
Referrer : http://www.BeastToast.com/forums/showthread.php?t=2115
IP Address : 1.2.3.4
Username : Chad
Classname : vb_database[/sql]

Developer 02-13-2006 06:35 AM

you didn't but 0 in exclude threads and exclude forums
https://vborg.vbsupport.ru/attachmen...chmentid=42564
look at the sceernshot

Mr Chad 02-13-2006 01:11 PM

Quote:

Originally Posted by Developer
you didn't but 0 in exclude threads and exclude forums
https://vborg.vbsupport.ru/attachmen...chmentid=42564
look at the sceernshot

lol i feel stupid, thanks that did the trick :)

lazytown 02-15-2006 07:49 AM

thanks for the mod.

How is "BEST" determined? If it's just replies, those usually aren't the "best" on my forum. I guess the best on my forum would be the ones that have the highest star rating or the highest rep power given over the entire thread.

How is "WORST" determined? Should be lowest rated thread or thread with the most negative reps given.

-vissa

lairnoc 02-15-2006 11:43 AM

ok question how can i get it on the top of my forumhome?

Developer 02-15-2006 01:20 PM

Quote:

Originally Posted by vissa
thanks for the mod.

How is "BEST" determined? If it's just replies, those usually aren't the "best" on my forum. I guess the best on my forum would be the ones that have the highest star rating or the highest rep power given over the entire thread.

How is "WORST" determined? Should be lowest rated thread or thread with the most negative reps given.

-vissa

as i said this hack requested

Developer 02-15-2006 01:20 PM

Quote:

Originally Posted by lairnoc
ok question how can i get it on the top of my forumhome?

after $navbar add the code

CupraSi 02-15-2006 02:31 PM

Quote:

Originally Posted by Developer
after $navbar add the code

Is that in Forum Home?

Developer 02-15-2006 02:56 PM

yes ....

CupraSi 02-15-2006 03:50 PM

Brilliant have managed to move it to the top now

Thanks

Gwynar 02-16-2006 03:13 AM

Does this make use of vb cron?

If not, might I suggest you include it? On highly trafficked boards it might be beneficial to use the vb cron.

lazytown 02-17-2006 09:37 AM

Quote:

Originally Posted by Developer
as i said this hack requested

Huh? So no answers to my questions? So it's requested.. What was the request?
-vissa

Developer 02-17-2006 09:38 AM

Quote:

Originally Posted by Gwynar
Does this make use of vb cron?

If not, might I suggest you include it? On highly trafficked boards it might be beneficial to use the vb cron.

ok may i make it later

Allan 02-17-2006 09:10 PM

Click Install ;)

French Language :)

nufc fan 02-19-2006 11:52 AM

im still new to all this so what di i have to do when instructions say import the product can someone tell me what to do please.

Developer 02-20-2006 09:48 AM

Quote:

Originally Posted by nufc fan
im still new to all this so what di i have to do when instructions say import the product can someone tell me what to do please.

goto to you're admin cp ==> Plugin System ==> Manage Products ==> [Add/Import Product] ==> upload the product then from Admin cp also
==> vBulletin Options ==> vBulletin Options ==> BestWorst Thread of the (day,week,month) and change settings

nufc fan 02-20-2006 12:37 PM

thanks mate


All times are GMT. The time now is 01:02 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.01673 seconds
  • Memory Usage 1,839KB
  • 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
  • (4)bbcode_code_printable
  • (12)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