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
Forum Sideblock - Recent Posts (with BBCodes parsed) Details »»
Forum Sideblock - Recent Posts (with BBCodes parsed)
Version: 1.3, by MarkFL MarkFL is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Category: vBulletin Forum Sideblocks - Version: 4.2.x Rating:
Released: 02-23-2016 Last Update: 01-05-2017 Installs: 14
DB Changes Uses Plugins Auto-Templates
Translations  
No support by the author.

Overview:

This product, upon installation, creates a new forum block that will display the most recent posts (the entire content in a scrollable block) with BBCodes parsed, and gives you settings to control several aspects of this new forum block. The settings are divided into 3 main groups:

Forum Block Settings:

Maximum Height Of Forum Block: This allows you to set a maximum height for the total inner block content containing all of the posts. A vertical scrollbars is added as needed. The default value is 450.

Block Title: This allows you to set the displayed title of the forum block, without having to edit the forum block itself. It is recommended that you do not edit the title of the forum block in the Forum Block Manager because the uninstall code depends on the title being its original value in order to remove it. You may include the number of posts shown and the value of a defined phrase to be in the block title. For example, if I want the title of the block to be "MHB's 5 Most Recent Posts" (and I have chosen to display all of the most recent posts) then I would enter in this setting:

MHB's [POSTS] [PHRASE]

where "[POSTS]" will be replaced by the number of posts being displayed, and [PHRASE] will be replaced by either $vbphrase['markfl_recentposts_title'], which is set to "Most Recent Posts" or $vbphrase['markfl_recentpostsperthread_title'], which is set to "Most Recent Posts/Thread".

The default is "[POSTS] [PHRASE]".

Block Title CSS: This setting allows you to apply additional CSS to the forum block title. For example, if you wish for the title to be 25% larger and in red, you would enter:

font-size: 125%; color red

The default is blank.

If you wish to change any other aspect of the forum block (other than the title), then use the "Forum Block Manager" to do so.

Posts Settings:

Posts To Display: This setting allows you to decide whether all of the most recent posts (the number of which you set) will be displayed, or only the most recent post per thread. The default is "Only Most Recent Post Per Thread". If you change this setting once you have the product running, then I recommend you clear the system cache each time you change it.

Number Of Posts To Display: This allows you to decide how many posts will be displayed in the forum block, chosen as per the setting above. The default is 5 posts.

Maximum Height Of Posts: This allows you to set the maximum height (in px) of the post content block before a vertical scrollbar is introduced. The default is 120 px.

Thread Title Settings:

Maximum Thread Title Length: This allows you to set the maximum number of characters from the thread title that will be displayed.

Display Thread Icons?: Allows you to set whether thread icons will be displayed.

Display Thread Prefixes?: Allows you to set whether thread prefixes will be displayed.

Thread Title CSS: Allows you to apply additional CSS to the thread titles.

Each post consists of a header containing the post author's avatar on the left (links to their profile), and a link to the post within its thread (with a tooltip stating which forum the thread is in) with the date/time of the post beneath the link. Both the tooltip and the timestamp use phrasing. Below this header is the block containing the entire post content, with BBCodes parsed.



Updates:

Version 1.01:
  • Attempt to address reported db error.

Version 1.02:
  • Fixed error where height of block was hard-coded.

Version 1.1:
  • Combined queries.
  • Custom templates used to render output.
  • All CSS stored in template.
  • Fixed error causing block not to be removed upon uninstall.

Note: To update to version 1.1, please uninstall any previous versions first and remove any forum blocks left behind, and then install version 1.1.

Version 1.2:
  • All templates cached.

Version 1.3:
  • Block PHP restored.

Compatibility:

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

Backup/Warning:

This product does not 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:
  • Download and extract the attached .zip file.
  • Follow AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product.
  • Click on "Choose File" and browse to the product .xml file that was packaged in the .zip file.
  • Click "Import."
  • Configure the settings to your liking. Each setting has a detailed explanation of its use.



Support for this product can be found here:

Download Now

File Type: zip MarkFL - Recent Posts Forum Block v1.3.zip (7.3 KB, 35 views)

Screenshots

File Type: png markfl_rpfb_forumblock.png (29.1 KB, 0 views)
File Type: jpg markfl_rpfb_acp.jpg (133.7 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 02-25-2016, 03:10 AM
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 Max Taxable View Post
I don't see this Mod working on the site in your signature. Is that the site?
I have it working on our dev site, on the same server. I have brought this mod to the attention of my fellow staff there, and am waiting for a general consensus before going live with it.
Reply With Quote
  #23  
Old 02-25-2016, 03:13 AM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
There's only 1 query:

PHP Code:
$recent_posts $vbulletin->db->query_read("
    SELECT post.*, thread.title, thread.forumid, thread.prefixid, thread.iconid
    FROM " 
TABLE_PREFIX "post AS post
    INNER JOIN " 
TABLE_PREFIX "thread AS thread
    ON thread.threadid = post.threadid
    ORDER BY post.dateline DESC
"
); 
Information about the posts as well as the threads they inhabit are needed. If anyone sees how to make that query more efficient, I'm all ears.
NOT the queries of the mod itself, the amount of queries the server has to do in order to create the executable file for the page source. For whatever reason, this mod greatly increases it.
Quote:
I have it working on our dev site, on the same server.
Would you mind sending me that link via PM?

Meanwhile, i can turn this back on at my live site, and you can go there and see what kind of "lag" you get, significant or not.
Reply With Quote
  #24  
Old 02-25-2016, 03:25 AM
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 Max Taxable View Post
NOT the queries of the mod itself, the amount of queries the server has to do in order to create the executable file for the page source. For whatever reason, this mod greatly increases it.
Hmmm...okay, perhaps I should look into rendering the HTML via a custom template rather than storing it all in the returned value of the eval'd code. I thought about that, but decided against it since it seemed to work. I appreciate all of your feedback, and I will render the output via a custom block template instead.

Quote:
Originally Posted by Max Taxable View Post
Would you mind sending me that link via PM?
Sorry, we only allow senior staff on our site access to our dev site. If it were my decision alone, I would have no hesitation, but it's not solely up to me.

Quote:
Originally Posted by Max Taxable View Post
Meanwhile, i can turn this back on at my live site, and you can go there and see what kind of "lag" you get, significant or not.
I will be glad to check, but I am hoping using a custom template will fix the FBT issue...I should be able to complete this within 24 hours.

And again, thank you for your testing and feedback, it is greatly appreciated and valuable! :up:
Reply With Quote
  #25  
Old 02-25-2016, 03:27 AM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
I will be glad to check, but I am hoping using a custom template will fix the FBT issue...I should be able to complete this within 24 hours.

And again, thank you for your testing and feedback, it is greatly appreciated and valuable! :up:
Okay check it right quick - your mod is the only forum block i have running.

http://dallascowboysuniverse.com
Reply With Quote
  #26  
Old 02-25-2016, 03:34 AM
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 Max Taxable View Post
Okay check it right quick - your mod is the only forum block i have running.

http://dallascowboysuniverse.com
Yes, I counted a 16 second load time after the initial load and I refreshed the page.

It will be interesting to see if the custom template makes a positive difference.
Reply With Quote
  #27  
Old 02-25-2016, 03:35 AM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay I have set the default block active, yours back off.

Glad to be of help.
Reply With Quote
  #28  
Old 02-25-2016, 07:08 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Update - Version 1.1:
  • Combined queries.
  • Custom templates used to render output.
  • All CSS stored in template.
  • Fixed error causing block not to be removed upon uninstall.
Reply With Quote
  #29  
Old 02-25-2016, 11:08 AM
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Location: Inside A Blade Server
Posts: 840
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The block is displaying twice with version 1.1.

Easily remedied by removing one of the blocks in the Forum Blocks Manager.

Page still loads excessively slowly.
Reply With Quote
  #30  
Old 02-25-2016, 02:17 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 ProSportsForums View Post
The block is displaying twice with version 1.1.

Easily remedied by removing one of the blocks in the Forum Blocks Manager.

Page still loads excessively slowly.
I had an error in previous versions where the block wasn't removed from the db when you uninstall, so installing version 1.1 after uninstalling a previous version requires you to remove any remaining blocks that were installed. That's fixed now.

Please make sure you removed the old block instead of the new one.
Reply With Quote
  #31  
Old 02-25-2016, 03:13 PM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay to just upload the XML to overwrite?
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 06:00 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.05849 seconds
  • Memory Usage 2,360KB
  • Queries Executed 27 (?)
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_php
  • (9)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
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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