[previewbreak] for blog posts
This is my first attempt at making something for VB4, so be kind. Tips/tricks on how I could have done this better are most welcome...
The CMS has the code [prbreak] which allows you to specify exactly where you want the shortened version of an article to stop, after which you can hit the "read more" link to see the rest. The blog system doesn't have this functionality, so I hacked it in. There are two steps needed to make this work: STEP ONE: CREATE A [PREVIEWBREAK] BB CODE a) Goto Admin CP -> Custom BB Code -> BB Code Manager -> Add New BB Code b) Fill out the form as follows: Title: Preview Break (blog only)STEP TWO: EDIT THE BLOG BBCODE PARSER Sorry--I couldn't figure out a way to do this without editing source code. Anyway, we have to edit class_bbcode_blog.php (from the vBulletin "includes" directory) in three places: That's it! Now you can insert [previewbreak][/previewbreak] anywhere within your blog post to force the break at that spot. It even works if the forced spot occurs after the regular (non-forced) break would occur (i.e., you can lengthen a preview using this code). And with a little bit of reworking, it would be pretty straightforward to allow you to put text between the opening and closing previewbreak tags that is only shown on the preview page (e.g., "[previewbreak]Read on to find out why [subject of blog post] is so great.[/previewbreak]"). Since I doubt this will be a popular mod (I'll consider 2 installs, including me to be a huge success), and I have no use for that, I'll leave that to someone else. Download No files for download. |
Similar Mods
Add-On Releases dmActivityStream - Blog Posts and Blog Comments | vBulletin 4.x Add-ons |