Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Featured Threads Details »»
Featured Threads
Version: 1.9.7, by MarkFL MarkFL is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.x.x Rating:
Released: 09-30-2015 Last Update: 11-12-2015 Installs: 43
DB Changes Uses Plugins Auto-Templates
Additional Files Translations  
No support by the author.

Overview

This product is designed to allow for the creation, display and management of a list of threads that you wish to feature on your site. It gives you a convenient means of showcasing especially good thread content on your forum and give it the increased visibility to registered users and visitors alike that you likely already feel it so richly deserves. You will find that when the featured threads list is displayed on its static page, then the block element is not collapsible since it does not share space with any other content, otherwise it is collapsible so that users will not have to scroll past this list to get to other parts of the page it they wish not to. This is consistent with the behavior of other vBulletin elements.

You may choose to manage this list yourself, or allow others on your staff to share in or even take over the management duties. Some or all of your members may even be allowed and encouraged to be a part of the process by their nominations of threads for the list. You can choose to allow nominations via this product, or use vBulletin's intrinsic thread rating system, or use a combination of both systems. You may also choose to display the most replied threads as well. In this way you could elect to implement a threads of the week or month etc. by popular vote. This product makes all of this possible and easy to accomplish.

You will find that you have a great deal of flexibility in where and how the list is displayed. Those you designate as managers of the list can add, remove, and set the display order of the threads in the list. Also, you may choose to allow your managers to auto-create voting polls to narrow down the selection of nominated threads to be added as featured threads, which is posted to a forum of your choosing. This forum may be private so that only staff is involved in the final voting, or a public forum may be selected so that everyone may vote. All actions performed by users and managers are confirmed with a standard vBulletin redirect message.

Upon installation, two tables are added to your database, one to store the list of featured threads, and one to store the nominations data. Queries are joined so that the latest data for all threads is displayed in the lists and to minimize the redundancy of stored data. If the product is uninstalled, then naturally the two added tables are removed.

The product settings are conveniently sub-divided into the following six categories:

Location Of "Featured Threads" List



You may choose to have the featured threads list displayed on every page, either below the navbar or above the footer. You are given the option to exclude any scripts that you choose. For example you may not want the featured threads list to display on pages whose associated script names are inlinemod, member or online.

In addition to displaying the list on all pages, you may choose one or more of the following options:
  • Display the list on your forum home page, either above or below the forums.
  • Display the list on your forum display pages, either above or below the threads.
  • Display the list on your show thread pages, either above or below the posts.
Note, the above 3 options will be effectively disabled if you have chosen to display on all pages to prevent duplication of content, unless you have set them as excluded scripts for displaying on all pages. This gives you increased control over these 3 pages. For example, you may wish for the featured threads list to display at the top of the page everywhere except on your home page, and so you could have it displayed below the forums there instead.

In addition to, or instead of these options, you may choose to display the list on its own static page. If you have chosen to display on all pages, that will naturally be disabled on the static page to prevent duplication of content. You then have the option to either create your own link to the page using the "Navigation Manager" or you may opt to have a link to the page auto-added as either a navtab:



A navlink on the navbar:



Or as a link in either the "Community" or "Quick Links" drop-down menus on the navbar:





Appearance Of "Featured Threads" List



You may choose to give the "Featured Threads" list element a custom title. This title will be used in the header of the list element, as the link text to the static page on the nav bar, and as the page title for the static page.

You may set a maximum height for the list that applies when it shares space with other content, that is, when it is not on the static page. A vertical scroll-bar is introduced when the list is taller than the maximum height you set. This height does not inlude the header element, just the table of data.

You may set the left/right margins of the list element as a percentage of the parent element. For example, if you wish for the list element to be 75% as wide as the parent element, and centered, then you would enter 12.5 for both the left and right margins. If you want the element to still be 75% as wide as the parent, but all the way on the right, then you would enter 25 for the left margin and 0 for the right margin.

You may set the background color for the "Featured Threads" element, using an HTML color picker.

You may define the CSS for the borders of the list element. This includes both the outer border and the inner borders of the table containing the data. The table cells are only given borders on the right.

You are given an HTML color picker for the color of the Forum/Thread links in the list, as well as the option to give any additional CSS for these links. You may also set the alignment for the thread links (left/center/right).

You may choose how the featured threads are sorted (by Thread Id/Thread Title/Date/Time Added To List/Thread Author User Id) and whether to sort in ascending or descending order. Note that when one of your managers imposes an order for the threads, then that ordering will take precedence.

You may chose to include optional thread information to be displayed, including Replies, Views, Last Poster, Forum, and Prefixes. Thread authors and titles are always displayed. The thread author has a tooltip showing when they created the thread. The replies has a tooltip giving a breakdown of everyone who posted in the thread, sorted in descending order by the number of posts, and then by user id in the case of ties in the number of posts. The last poster has a tooltip that shows when they posted that last post. All usernames in both lists (featured threads and nominated threads) are shown using their current HTML markup. And finally the thread has a tooltip showing a preview of the content of the first post. The number of characters is that which you have set in the AdminCP's general settings.

You can set the maximum number of characters of each thread's forum name to be displayed since these can be long and take up a lot of space. To display the complete forum names, set this maximum to zero. All forum titles that are truncated will have a tooltip that shows the complete forum name on mouse hover.

You are given the option to have an alternating row background color be given to the rows (in all thread tables) to make reading each row easier. You may choose either not to have the alternating backgrounds at all, to have them only for your managers who will benefit more from them because of thread selections while managing the list, and for everyone to see them. An HTML color piker allows you to choose this alternate background color.



"Featured Threads" Icon



You may choose to display an image icon for the featured threads in several places. You are given a choice of 5 included icons, or you may upload your own and give its filename in the settings. You must upload your custom icon to the "markfl_featuredthreads/icons" folder. The icons are appropriately sized depending on the location they are displayed.

If you choose to use an icon, then they are displayed in the thread listing when viewing forums, to the immediate right of the thread titles for those threads in the featured threads list.



Support for this product can be found here:

(continued in post #2)

Download Now

File Type: zip MarkFL - Featured Threads v1.9.7.zip (1.17 MB, 236 views)

Screenshots

File Type: jpg markfl_ft_navbartab.jpg (15.7 KB, 0 views)
File Type: jpg markfl_ft_navbarlink.jpg (15.3 KB, 0 views)
File Type: png markfl_ft_navbarcommunity.png (16.5 KB, 0 views)
File Type: png markfl_ft_navbarquicklinks.png (23.4 KB, 0 views)
File Type: jpg markfl_ft_listuser.jpg (54.4 KB, 0 views)
File Type: jpg markfl_ft_forumdisplay.jpg (79.2 KB, 0 views)
File Type: jpg markfl_ft_acp_section1.jpg (133.8 KB, 0 views)
File Type: jpg markfl_ft_acp_section2.jpg (107.7 KB, 0 views)
File Type: png markfl_ft_acp_section3.png (75.7 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
6 благодарности(ей) от:
bosanci28, ikopylov, RichieBoy67, smirkley, TheLastSuperman, vze2yqtm

Comments
  #82  
Old 01-19-2016, 10:22 AM
hazem_aliraqi's Avatar
hazem_aliraqi hazem_aliraqi is offline
 
Join Date: Oct 2010
Location: iraq
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank u mark that was awesome installed and 5 stars

Q \ can i get the number (count) of the Featured Threads for each user ?

and add the count to postbit ?
Reply With Quote
  #83  
Old 01-19-2016, 02:56 PM
jagtpf jagtpf is offline
 
Join Date: Mar 2015
Location: Scotland
Posts: 176
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jagtpf View Post
Line 1394 seems to be pointing at the 'if statement'.

The database in config.php is set to mysql - and everything else, Live and Test are running OK with this setting.

just discovered through diagnostics that vBulletin (admincp) has advised :
class_core.php
Quote:
File does not contain expected contents!
Reply With Quote
  #84  
Old 01-19-2016, 05:45 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jagtpf View Post
just discovered through diagnostics that vBulletin (admincp) has advised :
class_core.php
Did you upload a fresh version of that file and now everything works?
Reply With Quote
  #85  
Old 01-19-2016, 05:47 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hazem_aliraqi View Post
thank u mark that was awesome installed and 5 stars


Q \ can i get the number (count) of the Featured Threads for each user ?

and add the count to postbit ?
I sort of already have this, if you set "Recognize "Featured Threads" Authors In Postbits/Profiles" to "Yes" in the "Icons" section of the settings. The icon has a tooltip that indicates how many "Featured Threads" the user has authored.
Reply With Quote
Благодарность от:
hazem_aliraqi
  #86  
Old 01-19-2016, 06:34 PM
ikopylov's Avatar
ikopylov ikopylov is offline
 
Join Date: Aug 2010
Location: Russia
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Mark!
Minor bugs in mod Featured Threads v1.9.7

1
Replase all phrases to {vb:rawphrase vb_standart_phrase}

This is for non English forums

2
Find and replase

<br> ==> <br />
<img src="' . $icon . '">'; ==> <img src="' . $icon . '" alt="" />';
<input bla-bla-bla> ==> <input bla-bla-bla />
<hr></hr> ==> <hr />


3
This is for forums with UTF8:


Code:
$preview = substr($firstpost['pagetext'], 0, $vbulletin->options['threadpreview']);
==>
Code:
$preview = iconv_substr($firstpost['pagetext'], 0, $vbulletin->options['threadpreview'], 'UTF-8');
next

Code:
$forum_trunc = strlen($forum_name) > $forum_length ? substr($forum_name,0,$forum_length) . "...": $forum_name;
==>
Code:
$forum_trunc = strlen($forum_name) > $forum_length ? iconv_substr($forum_name,0,$forum_length, 'UTF-8') . "...": $forum_name;

4
Some forums have a short URL:

Member, Forum, Thread

Code:
return '<a title="' . $title . '" href="member.php?' . $user_name['userid'] . '-' . $user_name['username'] . '" target="_blank">' . $open_tag . $user_name['username'] . $close_tag . '</a>';
==>
Code:
return '<a title="' . $title . '" href="member.php?u=' . $user_name['userid'] . '" target="_blank">' . $open_tag . $user_name['username'] . $close_tag . '</a>';
next

Code:
$thread .= '<a title="' . get_thread_preview($threadinfo['firstpostid']) . '" style="color: ' . $vbulletin->options['markfl_ft_linkcolor'] . '; ' . $vbulletin->options['markfl_ft_linkformat'] .'" href="showthread.php?' . $threadinfo['threadid'] . '-' . str_replace(' ', '-', $threadinfo['title']) . '">' . $threadinfo['title'] . '</a>';
==>
Code:
$thread .= '<a title="' . get_thread_preview($threadinfo['firstpostid']) . '" style="color: ' . $vbulletin->options['markfl_ft_linkcolor'] . '; ' . $vbulletin->options['markfl_ft_linkformat'] .'" href="showthread.php?t=' . $threadinfo['threadid'] . '">' . $threadinfo['title'] . '</a>';
next

Code:
return '<td style="border-right: ' . $vbulletin->options['markfl_ft_border'] . '"><a title="' . $ftitle . '" style="color: ' . $vbulletin->options['markfl_ft_linkcolor'] . '; ' . $vbulletin->options['markfl_ft_linkformat'] .'" href="forumdisplay.php?' . $ftthread['forumid'] . '-' . str_replace(' ', '-', $vbulletin->forumcache[$ftthread['forumid']]['title'])  . '">' . $forum_trunc . '</a></td>';
==>
Code:
return '<td style="border-right: ' . $vbulletin->options['markfl_ft_border'] . '"><a title="' . $ftitle . '" style="color: ' . $vbulletin->options['markfl_ft_linkcolor'] . '; ' . $vbulletin->options['markfl_ft_linkformat'] .'" href="forumdisplay.php?f=' . $thread['forumid'] . '">' . $forum_trunc . '</a></td>';
Reply With Quote
2 благодарности(ей) от:
MarkFL, mathforum
  #87  
Old 01-19-2016, 07:18 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ikopylov View Post
Hi Mark!
Minor bugs in mod Featured Threads v1.9.7

1
Replase all phrases to {vb:rawphrase vb_standart_phrase}

This is for non English forums

2
Find and replase

<br> ==> <br />
<img src="' . $icon . '">'; ==> <img src="' . $icon . '" alt="" />';
<input bla-bla-bla> ==> <input bla-bla-bla />
<hr></hr> ==> <hr />


3
This is for forums with UTF8:


Code:
$preview = substr($firstpost['pagetext'], 0, $vbulletin->options['threadpreview']);
==>
Code:
$preview = iconv_substr($firstpost['pagetext'], 0, $vbulletin->options['threadpreview'], 'UTF-8');
next

Code:
$forum_trunc = strlen($forum_name) > $forum_length ? substr($forum_name,0,$forum_length) . "...": $forum_name;
==>
Code:
$forum_trunc = strlen($forum_name) > $forum_length ? iconv_substr($forum_name,0,$forum_length, 'UTF-8') . "...": $forum_name;

4
Some forums have a short URL:

Member, Forum, Thread

Code:
return '<a title="' . $title . '" href="member.php?' . $user_name['userid'] . '-' . $user_name['username'] . '" target="_blank">' . $open_tag . $user_name['username'] . $close_tag . '</a>';
==>
Code:
return '<a title="' . $title . '" href="member.php?u=' . $user_name['userid'] . '" target="_blank">' . $open_tag . $user_name['username'] . $close_tag . '</a>';
next

Code:
$thread .= '<a title="' . get_thread_preview($threadinfo['firstpostid']) . '" style="color: ' . $vbulletin->options['markfl_ft_linkcolor'] . '; ' . $vbulletin->options['markfl_ft_linkformat'] .'" href="showthread.php?' . $threadinfo['threadid'] . '-' . str_replace(' ', '-', $threadinfo['title']) . '">' . $threadinfo['title'] . '</a>';
==>
Code:
$thread .= '<a title="' . get_thread_preview($threadinfo['firstpostid']) . '" style="color: ' . $vbulletin->options['markfl_ft_linkcolor'] . '; ' . $vbulletin->options['markfl_ft_linkformat'] .'" href="showthread.php?t=' . $threadinfo['threadid'] . '">' . $threadinfo['title'] . '</a>';
next

Code:
return '<td style="border-right: ' . $vbulletin->options['markfl_ft_border'] . '"><a title="' . $ftitle . '" style="color: ' . $vbulletin->options['markfl_ft_linkcolor'] . '; ' . $vbulletin->options['markfl_ft_linkformat'] .'" href="forumdisplay.php?' . $ftthread['forumid'] . '-' . str_replace(' ', '-', $vbulletin->forumcache[$ftthread['forumid']]['title'])  . '">' . $forum_trunc . '</a></td>';
==>
Code:
return '<td style="border-right: ' . $vbulletin->options['markfl_ft_border'] . '"><a title="' . $ftitle . '" style="color: ' . $vbulletin->options['markfl_ft_linkcolor'] . '; ' . $vbulletin->options['markfl_ft_linkformat'] .'" href="forumdisplay.php?f=' . $thread['forumid'] . '">' . $forum_trunc . '</a></td>';
1.) Using phrasing (a HUGE task) is on my to-do list. It could be a while before I can get to it.

2.) Those slashes add no functionality to HTML and are not necessary.

3.) I will eventually look into adding UTF-8 encoding functionality. I'm learning as I go.

4.) I tried giving URLs that are the most standard, and play nicely with SEO mods.
Reply With Quote
  #88  
Old 01-20-2016, 07:18 AM
ikopylov's Avatar
ikopylov ikopylov is offline
 
Join Date: Aug 2010
Location: Russia
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1.
It is very necessary. Put it at 1st line in you TODO list. )))

2.
If we used the specification DOCTYPE HTML it would be appropriate to use <br>
But in VB we use specification DOCTYPE XHTML in this case it is necessary to use <br />, <hr />, <input />, <img /> and then the code is valid

3.
php substr() function with utf-8 leaves "�" marks at the end before "..."
I showed how to solve this little problem

4.
Maybe you can add settings option SEO link | Standard Link
Reply With Quote
  #89  
Old 01-20-2016, 08:08 AM
jagtpf jagtpf is offline
 
Join Date: Mar 2015
Location: Scotland
Posts: 176
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
Did you upload a fresh version of that file and now everything works?
To be honest, I haven't. Reason being that the Live and Test Forums run perfectly well with the file as it is.
Your Mod seems to be the first instance of something not totally right.

But I'll give it a try and, obviously, let you know.

Many thanks for your kind work and patience on helping.

One food for thought as an enhancement could be options to create more than one variety of nomination? Similar to DBTechs vBnominate...


EDIT : Sorry Mark - have updated the class_core.php file (test forum) - diagnostics clears as OK - but the error continues.
Reply With Quote
  #90  
Old 01-20-2016, 03:18 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jagtpf View Post
To be honest, I haven't. Reason being that the Live and Test Forums run perfectly well with the file as it is.
Your Mod seems to be the first instance of something not totally right.

But I'll give it a try and, obviously, let you know.

Many thanks for your kind work and patience on helping.

One food for thought as an enhancement could be options to create more than one variety of nomination? Similar to DBTechs vBnominate...


EDIT : Sorry Mark - have updated the class_core.php file (test forum) - diagnostics clears as OK - but the error continues.
From what I gather from the code you posted, the error has to do with a query...but I don't know which one(s), as there are many queries in this product. What version of vB/PHP/MySQL are you running?
Reply With Quote
  #91  
Old 01-20-2016, 03:25 PM
jagtpf jagtpf is offline
 
Join Date: Mar 2015
Location: Scotland
Posts: 176
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
From what I gather from the code you posted, the error has to do with a query...but I don't know which one(s), as there are many queries in this product. What version of vB/PHP/MySQL are you running?

(Don't forget I'm only running (!) this on my test Forum via xampp; so there might - probably - possibly be fewer/no issues on the Live).

vB 4.2.3 C1

PC - test Forum
Server Type WINNT
Web Server Apache v2.4.17
PHP 5.6.15
MySQL Version 10.1.9-MariaDB
MySQL Packet Size 1.00 MB

Live Forum
Server Type Linux
Web Server Apache
PHP 5.6.16
MySQL Version 5.6.28
MySQL Packet Size 256.00 MB
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12: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.05844 seconds
  • Memory Usage 2,416KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (20)bbcode_code
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (9)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete