vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Featured Threads (https://vborg.vbsupport.ru/showthread.php?t=320387)

ProfC 04-18-2016 12:47 PM

This mod has quickly become a staple of my board, thank you ^^

However, when trying to reorder the threads, I get a database error which suggests that the table "thread" doesn't exist.

Code:

Database error in vBulletin 4.2.2:

Invalid SQL:

                SELECT thread.*, featuredthreads.id
                FROM estate_thread
                INNER JOIN estate_featuredthreads
                ON thread.threadid = featuredthreads.threadid
                    ORDER BY featuredthreads.thread_order ASC, featuredthreads.id ASC;

MySQL Error  : Unknown table 'thread'
Error Number  : 1051


MarkFL 04-18-2016 01:41 PM

Can you provide the information about the steps you are taking to reorder the list and the exact error you get?

ProfC 04-18-2016 02:58 PM

Quote:

Originally Posted by MarkFL (Post 2569204)
Can you provide the information about the steps you are taking to reorder the list and the exact error you get?

Thank you, and from the main page (forumhome) which is where I display the Featured Threads box, I either select all or select the Featured Threads I want to reorder and then alter the value in the display order box to be what I want it to (while editing the display order of any other threads which had that original value to the value of the threads being moved up or down). I then click re-order.

My exact error is this on the standard vBulletin Database Error page:

Page URL: https://www.alexandria-ns.com/featur...p?action=array

Code:

Database error in vBulletin 4.2.2:

Invalid SQL:

                SELECT thread.*, featuredthreads.id
                FROM estate_thread
                INNER JOIN estate_featuredthreads
                ON thread.threadid = featuredthreads.threadid
                    ORDER BY featuredthreads.thread_order ASC, featuredthreads.id ASC;

MySQL Error  : Unknown table 'thread'
Error Number  : 1051
Request Date  : Monday, April 18th 2016 @ 02:43:08 PM
Error Date    : Monday, April 18th 2016 @ 02:43:08 PM
Script        : http://www.alexandria-ns.com/featuredthread.php?action=array
Referrer      : https://www.alexandria-ns.com/forum.php
IP Address    : xx.xx.xx.xx
Username      : Joshua Ravenclaw
Classname    : vB_Database_MySQLi
MySQL Version : 5.5.47-0ubuntu0.14.04.1


MarkFL 04-18-2016 03:27 PM

1 Attachment(s)
Okay, try replacing the file "featuredthread.php" (in your forum's root folder) with the attached file...let me know if that works. :)

ProfC 04-18-2016 04:39 PM

Quote:

Originally Posted by MarkFL (Post 2569216)
Okay, try replacing the file "featuredthread.php" (in your forum's root folder) with the attached file...let me know if that works. :)

It now works perfectly, thank you so much! :D

MarkFL 04-18-2016 04:47 PM

Quote:

Originally Posted by ProfC (Post 2569218)
It now works perfectly, thank you so much! :D

Thanks for calling this to my attention and for now letting me know it works. :) I neglected to give some tables an alias in a few of the queries which resulted in an error for sites with a table prefix.

I am planning an upgrade for this product soon to fix a lot of minor details, as I have learned a great deal since I wrote the code for this product.

BadgerDog 04-26-2016 07:02 PM

I'd like to give this a try.. :)

Any idea when upgrade will be forthcoming so I can test the most current version?

Thanks for your efforts ...

Regards,
Doug

MarkFL 04-27-2016 11:24 AM

Quote:

Originally Posted by BadgerDog (Post 2569670)
I'd like to give this a try.. :)

Any idea when upgrade will be forthcoming so I can test the most current version?

Thanks for your efforts ...

Regards,
Doug

Sorry, I can't be more specific than "soon." The main changes I have in mind are to use phrases and to revise the thread links. :)

BadgerDog 04-27-2016 11:26 AM

Quote:

Originally Posted by MarkFL (Post 2569710)
Sorry, I can't be more specific than "soon." The main changes I have in mind are to use phrases and to revise the thread links. :)

Thanks Mark .. :)

I'll keep checking back... :up:

Regards,
Doug

Snowhog 02-06-2017 11:22 PM

Quote:

Originally Posted by MarkFL (Post 2569219)
Thanks for calling this to my attention and for now letting me know it works. :) I neglected to give some tables an alias in a few of the queries which resulted in an error for sites with a table prefix.

I am planning an upgrade for this product soon to fix a lot of minor details, as I have learned a great deal since I wrote the code for this product.

Have you gotten around to this yet? I don't see a post from you saying you have.

MarkFL 02-07-2017 12:06 AM

Quote:

Originally Posted by Snowhog (Post 2581977)
Have you gotten around to this yet? I don't see a post from you saying you have.

As far as I know, this was done. :)

Morrus 05-08-2017 03:25 PM

Quick question re the functionality of this. I think I know the answer, but wanted to check first --

Can I use this mod to set up a separate page which lists all the most replied to threads which were started in the last week?

Thanks!

MarkFL 05-08-2017 03:50 PM

Quote:

Originally Posted by Morrus (Post 2586311)
Quick question re the functionality of this. I think I know the answer, but wanted to check first --

Can I use this mod to set up a separate page which lists all the most replied to threads which were started in the last week?

Thanks!

You can see a list of the most replied to threads, from which you can add to the featured list, but it won't auto-add only from the last week.

Morrus 05-08-2017 04:35 PM

Quote:

Originally Posted by MarkFL (Post 2586312)
You can see a list of the most replied to threads, from which you can add to the featured list, but it won't auto-add only from the last week.

Darnit. Thanks for the reply!

chloe101 05-19-2017 04:26 PM

Quote:

Originally Posted by MarkFL (Post 2569216)
Okay, try replacing the file "featuredthread.php" (in your forum's root folder) with the attached file...let me know if that works. :)

Hi Mark, I am having a similar, though not the exact same, problem and wonder if I should replace this file too? Or if you have another suggestion.

This happens when I try to reorder the threads. Here is my error message:
HTML Code:

PHP Warning: mysqli_query(): (42S02/1051): Unknown table 'thread' in ..../includes/class_core.php on line 1394

Database error in vBulletin 4.2.4:

Invalid SQL:

                                SELECT thread.*, featuredthreads.id
                                FROM (redacted)thread
                                INNER JOIN (redacted)featuredthreads
                                ON thread.threadid = featuredthreads.threadid
                                        ORDER BY featuredthreads.thread_order ASC, featuredthreads.id ASC;

MySQL Error  : Unknown table 'thread'
Error Number  : 1051

Thanks again for this awesome mod!

MarkFL 05-19-2017 04:33 PM

Quote:

Originally Posted by chloe101 (Post 2586689)
Hi Mark, I am having a similar, though not the exact same, problem and wonder if I should replace this file too? Or if you have another suggestion.

This happens when I try to reorder the threads. Here is my error message:
HTML Code:

PHP Warning: mysqli_query(): (42S02/1051): Unknown table 'thread' in ..../includes/class_core.php on line 1394

Database error in vBulletin 4.2.4:

Invalid SQL:

                                SELECT thread.*, featuredthreads.id
                                FROM (redacted)thread
                                INNER JOIN (redacted)featuredthreads
                                ON thread.threadid = featuredthreads.threadid
                                        ORDER BY featuredthreads.thread_order ASC, featuredthreads.id ASC;

MySQL Error  : Unknown table 'thread'
Error Number  : 1051

Thanks again for this awesome mod!

Yes, try doing the replacement, and let me know if that works or not. If not, we can go from there. :)

chloe101 05-19-2017 04:53 PM

Thank you! That seems to have worked beautifully. I can now reorder the threads without the SQL error.

Additional question if you don't mind... Is it possible to see how many nominations each thread received? It's entirely possible I'm missing something obvious.

Also, I am not sure what the "Rating Threshold" in the Nominations setting means and how it correlates to the "Votes Threshold".

I have the settings on Auto-Add Featured threads but that's adding an awful lot of threads at the top of my forum. Is it possible to limit the number of threads to 5 or 6 if I use Auto-Add?

MarkFL 05-19-2017 05:06 PM

Quote:

Originally Posted by chloe101 (Post 2586691)
Thank you! That seems to have worked beautifully. I can now reorder the threads without the SQL error.

Great...glad to hear it. :)

Quote:

Originally Posted by chloe101 (Post 2586691)
Additional question if you don't mind... Is it possible to see how many nominations each thread received? It's entirely possible I'm missing something obvious.

You should see how many nomination each thread has received when you open up the list of nominated threads. Only those who have been designated as managers can do this...but since you are reordering threads, you are a manager already.

Also, if you hover your mouse over the number of nominations, a tooltip will show you a list of users who have nominated the threads.

Quote:

Originally Posted by chloe101 (Post 2586691)
Also, I am not sure what the "Rating Threshold" in the Nominations setting means and how it correlates to the "Votes Threshold".

The "Rating Threshold" is the minimum rating average a thread must have before being including in the "User-Rated Threads" list. The "Votes Threshold" is the minimum number of votes a threads must have before being included.

For example, you might wish to only have 5 star threads in the list, but you want a thread to have at least 5 votes as well, this way you don't see those that have only gotten a small number of votes.

Quote:

Originally Posted by chloe101 (Post 2586691)
I have the settings on Auto-Add Featured threads but that's adding an awful lot of threads at the top of my forum. Is it possible to limit the number of threads to 5 or 6 if I use Auto-Add?

The only way to limit the number is to use the option "Yes, And Penultimate Thread Is Removed"...this way when the newest thread is added, the previous auto-added thread is removed.

I don't have a way to limit this by number.

I use this feature at MHB for our "Problem Of The Week" forums...when a new problem is posted in one of our problem categories (High School/University/Post-Grad), last week's problem is auto-removed, and the new problem is auto-added. :)

chloe101 05-19-2017 05:46 PM

Quote:

Originally Posted by MarkFL (Post 2586692)
You should see how many nomination each thread has received when you open up the list of nominated threads.

Also, if you hover your mouse over the number of nominations, a tooltip will show you a list of users who have nominated the threads.

The User Nominated & Featured tables are different on my forum. I am trying to find a way to sort the threads by number of nominated votes (or at least know how many votes they got) so that when I manually add new ones, I have a little more visibility into which ones to eliminate.

First I couldn't get people to use it on our new forum and suddenly they're using it everywhere so your add-on is a major success!

Quote:

The "Rating Threshold" is the minimum rating average a thread must have before being including in the "User-Rated Threads" list. The "Votes Threshold" is the minimum number of votes a threads must have before being included.

For example, you might wish to only have 5 star threads in the list, but you want a thread to have at least 5 votes as well, this way you don't see those that have only gotten a small number of votes.
Thank you.

Quote:

The only way to limit the number is to use the option "Yes, And Penultimate Thread Is Removed"...this way when the newest thread is added, the previous auto-added thread is removed.

I don't have a way to limit this by number.
This will make things difficult when our forum gets busy. Would you be available to tailor this for our needs when donations start rolling in? We'd compensate you of course. One feature I'd love is the ability to put these in a couple of widgets on the CMS. I hope I didn't break any VB rules by asking that!

(on edit, I found the admin setting for "Yes, And Penultimate Thread Is Removed" but I'd still like it tailored ;) )

MarkFL 05-19-2017 09:16 PM

Quote:

Originally Posted by chloe101 (Post 2586698)
The User Nominated & Featured tables are different on my forum. I am trying to find a way to sort the threads by number of nominated votes (or at least know how many votes they got) so that when I manually add new ones, I have a little more visibility into which ones to eliminate.

First I couldn't get people to use it on our new forum and suddenly they're using it everywhere so your add-on is a major success!

You should see the number of nominations in the leftmost column in that table when you click the button to view it. There is no option to turn that column off.

The threads in that table are automatically sorted in descending order by the number of nominations they receive, and in the event of a tie, the threads are sorted within the members of the tie by threadid, so that the older threads are displayed first.

chloe101 05-20-2017 02:51 PM

Quote:

Originally Posted by MarkFL (Post 2586707)
The threads in that table are automatically sorted in descending order by the number of nominations they receive, and in the event of a tie, the threads are sorted within the members of the tie by threadid, so that the older threads are displayed first.

Thank you for explaining that.

Quote:

You should see the number of nominations in the leftmost column in that table when you click the button to view it. There is no option to turn that column off.
I can see them when I click on "show nominated". I think my problem, confusion is because I temporarily had it set to 'auto add new threads' thinking that meant new threads that already had the correct number of votes and I thought they'd been nominated. My confusion. Thanks!

MarkFL 05-20-2017 02:57 PM

Quote:

Originally Posted by chloe101 (Post 2586726)
Thank you for explaining that.



I can see them when I click on "show nominated". I think my problem, confusion is because I temporarily had it set to 'auto add new threads' thinking that meant new threads that already had the correct number of votes and I thought they'd been nominated. My confusion. Thanks!

The auto-adding of new threads is done without regards to any nominations/ratings/replies; as soon as a new thread is added to one of the designated forums, it is added to the Featured Threads list. :)

chloe101 05-20-2017 03:05 PM

Is there anyway to make "Most Replied Threads" permanently show for our members on the Featured Threads page?

And also, is it easily possible to insert "Featured Threads" into a widget for the CMS?

Please forgive my excitement at loving your add-on so much

MarkFL 05-20-2017 03:09 PM

Quote:

Originally Posted by chloe101 (Post 2586729)
Is there anyway to make "Most Replied Threads" permanently show for our members on the Featured Threads page?

Do you mean where the top X replied threads is auto-maintained? If so, that's not currently a feature of the product.

Quote:

Originally Posted by chloe101 (Post 2586729)
And also, is it easily possible to insert "Featured Threads" into a widget for the CMS?

Please forgive my excitement at loving your add-on so much

I have no experience with CMS or its widgets. Sorry. :(

chloe101 05-23-2017 07:54 PM

Thank you Mark. I'll figure out how to squeeze your terrific add-on into a CMS widget yet ;)

chloe101 05-30-2017 12:48 PM

I removed and added a few forums but when I go to the Management panel, it's still showing the old ones. I emptied the cache and even went to tools to rebuild the forum cache but it's still showing me the old forums. How can I update that please? Thanks

MarkFL 05-30-2017 01:45 PM

Quote:

Originally Posted by chloe101 (Post 2587113)
I removed and added a few forums but when I go to the Management panel, it's still showing the old ones. I emptied the cache and even went to tools to rebuild the forum cache but it's still showing me the old forums. How can I update that please? Thanks

For now, until I can address the issue in a future update, remove the threads that are in new/renamed forums from the featured threads list, and them add them back...they should then show the correct forum. :)

chloe101 05-30-2017 06:09 PM

Quote:

Originally Posted by MarkFL (Post 2587115)
For now, until I can address the issue in a future update, remove the threads that are in new/renamed forums from the featured threads list, and them add them back...they should then show the correct forum. :)

Thanks Mark. They were already showing the correct forum on the Featured Threads Display block on the forum page. It's just in the Admin CP that the forums aren't updating. If this helps, it's listing the new forums in the Admin CP but not removing the deleted ones in "Managing The "Featured Threads" List"

Take your time. It's just a small thing. Thanks again

MarkFL 05-30-2017 09:06 PM

Try clearing the system cache. All of my products rely on the cache to construct a list of the available forums within their settings. :)

chloe101 05-31-2017 03:18 AM

Quote:

Originally Posted by MarkFL (Post 2587122)
Try clearing the system cache. All of my products rely on the cache to construct a list of the available forums within their settings. :)

You may never want to talk with me again. Those forums were only deactivated, not deleted. I obviously need some sleep :( Profuse apologies for wasting your time. That's 2 boxes of chocolate now

MarkFL 05-31-2017 03:36 AM

Quote:

Originally Posted by chloe101 (Post 2587132)
You may never want to talk with me again. Those forums were only deactivated, not deleted. I obviously need some sleep :( Profuse apologies for wasting your time. That's 2 boxes of chocolate now

LOL! No worries...I have been known to edit plugins that have been disabled, or edit the wrong version of an external script, and then pull my hair out when the changes have no effect.

And at least you are conscientious enough to admit your minor oversight, rather than simply walking away from it like nothing happened. :cool::D

chloe101 05-31-2017 03:52 AM

Quote:

Originally Posted by MarkFL (Post 2587133)
LOL! No worries...I have been known to edit plugins that have been disabled, or edit the wrong version of an external script, and then pull my hair out when the changes have no effect.

And at least you are conscientious enough to admit your minor oversight, rather than simply walking away from it like nothing happened. :cool::D

Ok, now that's funny lol. Thanks for the laugh before going to get some zzzzzs! Now I don't feel so awful but I still apologize for wasting your time :)

chloe101 06-03-2017 01:08 AM

Hi Mark, Another day, another request if this isn't asking too much because my new problem is with the theme I'm currently using as our default. I didn't even realize this was a problem until I saw that featured threads get a star in the default & in a theme I'm adding but not in my main theme. I can't ask the theme author because he dropped out of site a few years ago. Is it possible to get your star to show up in front of the title?

(Edited to remove images)

MarkFL 06-03-2017 04:57 AM

Unfortunately when a custom theme changes the HTML layout of a template such that certain elements are no longer present, then my code to append the star to the thread title isn't going to work. :(

chloe101 06-03-2017 11:09 AM

I was afraid of that. Thanks for replying :)

MarkFL 06-03-2017 12:55 PM

It may be possible to edit your "SHOWTHREAD" template for that style to add dummy span elements around the title to get it to work. :)

chloe101 06-04-2017 08:32 PM

Hah! I just logged in to ask you if you had any hints for a determined person who wanted to try on their dev site and you beat my question to it with an answer waiting. I'm going to try- expecting miracles but not holding my breath since this really isn't my forte ;)

Thank you Mark!

scottkoz20 06-06-2017 10:20 PM

hey Mark - is there a time limit before threads are automatically cleared? I have noticed that threads will delete (I am checking other settings / users that might be playing with the mod)

MarkFL 06-06-2017 11:09 PM

Thread stay in the featured threads list until either a manager removes them or the thread gets deleted. :)

The Realist 07-20-2017 11:41 AM

This might sound a sill question but how do you nominate a thread?

Installed fine but I don't see as admin any option.


All times are GMT. The time now is 07:38 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.01564 seconds
  • Memory Usage 1,871KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (29)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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