Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
Starred Posts Details »»
Starred Posts
Version: 1.6.2, by MarkFL MarkFL is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Category: End-User Options - Version: 4.2.x Rating:
Released: 07-20-2016 Last Update: 03-31-2017 Installs: 30
DB Changes Uses Plugins Auto-Templates
Additional Files Translations  
No support by the author.

Overview:

This product is designed to give your users the ability to create/manage a list of starred/favorite posts so they can easily locate them in the future. Some users may have limited time when browsing your site, and wish to earmark posts to which they will want to reply later when they have more time. This product will allow them to tag these posts and easily find them later.

Upon installing the product a new table is added to your database to store the data pertaining to the user lists, and a new column is added to your user table to store the number of posts in each user's list.

Users with permission to use the system will see a star icon in the postbits just above the signature and to the far right that allows them to add the posts to their list. Once a post has been added, a checkmark appears next to the star icon to indicate that that post is already on their list, and if this is clicked the post is removed from the list. The icons have tooltips to indicate what will happen upon clicking them, as do all buttons and checkboxes used by the system.



In the search results and forum thread listings, an icon is shown to users to indicate which threads have posts in their starred list, and the icon has a tooltip indicates how many posts in the thread are in the user's starred list.



Under the "Quick Links" menu, users who have permission to use the system, will find a link titled "My Starred Posts" which will take them to a custom page which displays their starred posts and allow for posts to be removed. Each post has detailed information regarding the post, with links to the forum, thread and to the post itself. There are controls that allow the user to select posts for removal from the list, and to expand the post content so they can review the entire post(s) right there and to reply to the post with a quote. Post content can be expanded/collapsed one a per post basis, or all at once. Each postbit can be collapsed as well.



Users who have a limit imposed on the number of posts in their list will be shown additional information in the redirect messages that tell them how many additional posts they can add to their list. Once a user has added the maximum number of posts in their list, they will no longer see the star icon in the postbits with threads to add posts...they will only see the icon fro removing posts from their list.

In the product settings, you may select the usergroups that have permission to use the system, set a limit to the number of posts a user may have in their list, excempt usergroups from this limit, give limits based on usergroups, and set the persistence of user lists so that users who are inactive for longer than the number of days you have set will have their list removed from the database via a daily cron job. You may also set the maximum height of the elements containing the list of posts, and the post content within each list postbit.



This product is fully phrased, and stylevars are used so that the CSS for the custom page can be customized per style.

Updates:

Version 1.1:
  • Added reply button.
  • Online location processed.

Version 1.2:
  • Fixed issue with postbit star icon not displaying.
  • Added icon to threadbits to show users which threads haev posts in the starred list.

Version 1.3:

Version 1.3.1:
  • Fixed Thread/Post authors in postbits.

Version 1.4:
  • Deleted posts removed from the lists of all users.
  • Posts moved to areas where users do not have permission to view are removed from the lists of those users.
  • User lists are updated when posts/threads are merged.
  • Unapproved posts and posts within unapproved threads are removed from the lists of users who are not moderators of the forum in which the affected posts reside.
  • Stylevar added for the margins of the postbit icon.

Version 1.5:
  • Usernames escaped to avoid db errors.
  • Postbit icon now appears at the lower right of the post content element when using legacy postbit, regardless of the post length.
  • Postbit icon CSS moved to template.

Version 1.6:
  • Added setting to allow for limits per usergroup.

Version 1.6.1:
  • Guests shown no permission message if trying to access the external script.

Version 1.6.2:
  • Users not part of the allowed usergroups shown no permission message if trying to access the external script.

Compatibility:

Tested and working on VB 4.2.x and may work on all 4.x versions of vBulletin.

Backup/Warning:

This product does alter your database, however it is always good practice to make regular backups and you should make a backup before installing ANY new mod.

As always, products are USE AT YOUR OWN RISK. I will provide support and do my best to help but no absolute guarantee is offered.

To Install:
  1. Download and extract the attached .zip file.
  2. Upload the files from the "upload" folder to your root folder on your server.
  3. Follow AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product.
  4. Click on "Choose File" and browse to the product .xml file that was packaged in the .zip file.
  5. Click "Import."
  6. You MUST enable the product in the settings before it will function.
  7. Configure the remaining settings to your liking. Each setting has a detailed explanation of its use.

Special acknowledgement goes to the administrators of Christianity Haven for the general idea of this product and for their feedback and testing through all phases of development. :up:

Support for this product can be found here:

Download Now

File Type: zip MarkFL - Star Posts v1.6.2.zip (25.0 KB, 48 views)

Screenshots

File Type: png markfl_sp_postbiticon.png (8.5 KB, 0 views)
File Type: png markfl_sp_list.png (40.3 KB, 0 views)
File Type: png markfl_sp_threadbiticon.png (13.3 KB, 0 views)
File Type: jpg markfl_sp_acp.jpg (96.2 KB, 0 views)

Show Your Support

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

Comments
  #82  
Old 08-19-2017, 09:20 AM
IggyP IggyP is offline
 
Join Date: May 2012
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed and thank you...

my only thought was the the quick links can be easily overlooked for some....if it was in profile section with tags, quotes, likes etc....would be a better order....

not sure how difficult but just an idea
Reply With Quote
  #83  
Old 10-22-2017, 10:43 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was experiencing intermittent very slow posting and double posting after transfer to a new VPS.

We were able to identify some problem plugins in investigating this and it turns out this was one of them.

From the host tech support:

Quote:
It looks like there's a specific query being ran that's really slowing down your server.


Code:
SELECT * FROM `filedata`;
# Time: 171007 13:22:30
# User@Host: ###### @ localhost []
# Thread_id: 318579  Schema: #####  QC_hit: No
# Query_time: 7.152743  Lock_time: 0.000120  Rows_sent: 31  Rows_examined: 558
# Rows_affected: 0
SET timestamp=1507396950;
SELECT  post.pagetext AS preview,
                        thread.threadid, thread.title AS threadtitle, thread.forumid, thread.pollid, thread.open, thread.postusername, thread.$
                        thread.dateline, thread.notes, thread.visible, thread.sticky, thread.votetotal, thread.attach, thread.lastpost, thread$
                        thread.prefixid, thread.taglist, thread.hiddencount, thread.deletedcount, user.userid,
                        user.membergroupids, user.infractiongroupids, user.usergroupid, user.homepage, user.options AS useroptions, IF(userlis$
                        user.lastactivity, user.lastvisit, IF(user.options & 512, 1, 0) AS invisible


                        , (SELECT COUNT(*) FROM starposts AS starposts WHERE starposts.userid = 0 AND starposts.threadid = thread.threadid) $
                FROM thread AS thread
                        LEFT JOIN user AS user ON (user.userid = thread.lastposterid)
                        LEFT JOIN userlist AS userlist ON (userlist.relationid = user.userid AND userlist.type = 'buddy' AND userlist.userid$


                        LEFT JOIN post AS post ON(post.postid = thread.firstpostid)

                WHERE thread.threadid IN (0,32490,26504,31904,31744,31657,31635,31567,27852,31374,31276,27962,31157,30175,29848,29692,29680,29$
                ORDER BY thread.sticky DESC, lastpost DESC;
The reason it's taking so long, is that it's using LEFT JOIN commands that will take information from a previous query, and use it into that specific query which can really slow your server down.
Reply With Quote
  #84  
Old 10-22-2017, 11:24 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In that particular query, my product is not adding any LEFT JOIN commands. If the problems began after moving to a new host, I would think that's where the issue really is, although host techs, from what I've read at least, are notorious for trying to lay blame on scripts. I have run this product on multiple sites with no slowdown issues.
Reply With Quote
  #85  
Old 10-22-2017, 11:42 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So the LEFT JOIN parts are from something else? Meaning the part they quoted was from more than one database query?

And yes, the issues began after downsizing from a dedicated server to a VPS.
Reply With Quote
  #86  
Old 10-22-2017, 11:50 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, my product's contribution to that query can be found in the plugin hooked at "forumdisplay_query" which reads:

PHP Code:
global $vbulletin;

if (
$vbulletin->options['markfl_starpost_active'])
{
    
$hook_query_fields .= ', (SELECT COUNT(*) FROM ' TABLE_PREFIX 'starposts AS starposts WHERE starposts.userid = ' $vbulletin->userinfo['userid'] . ' AND starposts.threadid = thread.threadid) AS starcount';

The rest of the query (assuming no other products are adding to that query) can be found in the core vB script "forumdisplay.php" here:

PHP Code:
    ($hook vBulletinHook::fetch_hook('forumdisplay_query')) ? eval($hook) : false;

    
$threads $db->query_read_slave("
        SELECT 
$votequery $previewfield
            thread.threadid, thread.title AS threadtitle, thread.forumid, thread.pollid, thread.open, thread.postusername, thread.postuserid, thread.iconid AS threadiconid,
            thread.dateline, thread.notes, thread.visible, thread.sticky, thread.votetotal, thread.attach, 
$tachy_columns,
            thread.prefixid, thread.taglist, thread.hiddencount, thread.deletedcount, user.userid,
            user.membergroupids, user.infractiongroupids, user.usergroupid, user.homepage, user.options AS useroptions, IF(userlist.friend = 'yes', 1, 0) AS isfriend,
            user.lastactivity, user.lastvisit, IF(user.options & " 
$vbulletin->bf_misc_useroptions['invisible'] . ", 1, 0) AS invisible
            " 
. ($fetchavatar "
                ,avatar2.avatarpath AS api_avatarpath, NOT ISNULL(customavatar2.userid) AS api_hascustomavatar, customavatar2.dateline AS api_avatardateline, customavatar2.width AS api_avwidth, customavatar2.height AS api_avheight,
                user2.adminoptions AS api_adminoptions, user2.userid AS api_userid, user2.usergroupid AS api_usergroupid, user2.membergroupids AS api_membergroupids, user2.infractiongroupids AS api_infractiongroupids, user2.avatarrevision AS api_avatarrevision
            " 
"") . "
            " 
. (($vbulletin->options['threadsubscribed'] AND $vbulletin->userinfo['userid']) ? ", NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed" "") . "
            " 
. ($deljoin ", deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason" "") . "
            " 
. (($vbulletin->userinfo['userid']) ? ", threadread.readtime AS threadread" "") . "
            " 
. ($redirectjoin ", threadredirect.expires" "") . "
            
$hook_query_fields
        FROM " 
TABLE_PREFIX "thread AS thread
            LEFT JOIN " 
TABLE_PREFIX "user AS user ON (user.userid = thread.lastposterid)
            LEFT JOIN " 
TABLE_PREFIX "userlist AS userlist ON (userlist.relationid = user.userid AND userlist.type = 'buddy' AND userlist.userid = " $vbulletin->userinfo['userid'] . ")
            " 
. ($fetchavatar "
                LEFT JOIN " 
TABLE_PREFIX "user AS user2 ON (thread.postuserid = user2.userid)
                LEFT JOIN " 
TABLE_PREFIX "avatar AS avatar2 ON(avatar2.avatarid = user2.avatarid)
                LEFT JOIN " 
TABLE_PREFIX "customavatar AS customavatar2 ON(customavatar2.userid = user2.userid)
            " 
"") . "
            
$deljoin
            " 
. (($vbulletin->options['threadsubscribed'] AND $vbulletin->userinfo['userid']) ?  " LEFT JOIN " TABLE_PREFIX "subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = " $vbulletin->userinfo['userid'] . " AND canview = 1)" "") . "
            " 
. (($vbulletin->userinfo['userid']) ? " LEFT JOIN " TABLE_PREFIX "threadread AS threadread ON (threadread.threadid = thread.threadid AND threadread.userid = " $vbulletin->userinfo['userid'] . ")" "") . "
            
$previewjoin
            
$tachyjoin
            
$redirectjoin
            
$hook_query_joins
        WHERE thread.threadid IN (0
$ids$hook_query_where
        ORDER BY thread.sticky DESC, 
$sqlsortfield $sqlsortorder. (!empty($sqlsortfield2) ? ", $sqlsortfield2 $sqlsortorder'') . "
    "
); 
Reply With Quote
  #87  
Old 10-22-2017, 11:56 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It does appear that this plugin does not need to run except when a registered user is browsing the site, so I will update this product at the designated support sites.
Reply With Quote
  #88  
Old 10-23-2017, 01:59 AM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, MarkFL.
Reply With Quote
  #89  
Old 08-13-2019, 10:18 AM
Mike-D Mike-D is offline
 
Join Date: Jan 2006
Location: Cologne / Germany
Posts: 270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent work :up:

That's what I've been looking for a long time. Keep it up, Mark
Reply With Quote
Благодарность от:
MarkFL
Reply

Thread Tools

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 09:05 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07069 seconds
  • Memory Usage 2,367KB
  • Queries Executed 26 (?)
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
  • (1)bbcode_code
  • (2)bbcode_php
  • (1)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
  • (2)pagenav_pagelink
  • (9)post_thanks_box
  • (2)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (5)postbit_attachment
  • (9)postbit_onlinestatus
  • (9)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