Back to vBulletin 3.7 Add-ons

New Blogs/Comments in Forum Search Results
Mod Version: 0.0.11, by dartho

This modification is in the archives.
vB Version: 3.7.x Rating: (10 votes - 4.50 average) Installs: 55
Released: 16 Jun 2008 Last Update: 17 Aug 2009 Downloads: 439
Not Supported Uses Plugins Template Edits Re-usable Code Is in Beta Stage  

This add-on will include recent blogs and blog comments in your forums search results - This includes "New Posts" and "Today's Posts" results...

Options
Maximum number of search results to return
Maximum age of comments/blogs to be included in search results

Limitations
There is no tracking of if a blog has been read or not - if a blog/comment fits in with the above criteria it will be displayed in the search results whether it has been read or not. This can probably be coded in by a more experienced coder than myself - any assistance appreciated. Although I like the extra exposure the blogs get from this so it is not an issue for me.

Version History
0.0.1 - Initial release - marked beta until I get some feedback.
0.0.2 - added table prefixes to query
0.0.3 - added table prefixes to query - again
0.0.4 - fixed the query causing issues on DBs with table prefixes (Confirmed working now)
0.0.5 - removed title tags from listings till I get time to fix issue with title breaking display
0.0.6 - fixed links in results to link to blogs/blogs/comments in the same way search results link to forums/threads/posts
0.0.7 - fixed broken image link, removed errant "<"
0.0.8 - Added fix where blog drafts were showing up in searches as per this post

Spoiler (click to open)


Seems blog drafts are showing up in search results - anybody got a fix for that?

Close
by KrisP
0.0.9 - Now only shows the latest comment from each blog
0.0.9a - Fixed but in 0.0.9
0.0.9b - Fixed date time display to be consistent with rest of forum
0.0.10 - Fixed small bug which sjhows on some systems as per this post

Spoiler (click to open)


I get the following error at the top of the search page:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in [path]/search.php(1939) : eval()'d code (Line 26)

Close
by entertain
0.0.11 - Fixed bug where pending blogs were being displayed as per this

Spoiler (click to open)


*EDIT: Disregard my previous response in case you received it via email notification.

In your Product XML file, find the following:
AND blogtitle.state = 'visible'

Add below it:
AND blogtitle.pending = '0'

This should take care of pending blog entries (that are likely currently scheduled but not published).

Also, be sure to update the version number in the XML. It appears the 0.0.10 version still reflects 0.0.9b.

Close
post by jibi
Dependencies
You must have vBulletin Blogs Installed

Installation Instructions
1. Install Product File
2. Add a single line to your search_results template as below:
Edit your "search_results" template
search for:
Code:
<tr>
	<td class="tfoot" colspan="$threadcolspan" align="$stylevar[right]">
		<if condition="$show['results']">
		<span class="smallfont"><phrase 1="$first" 2="$last" 3="$numitems">$vbphrase[showing_results_x_to_y_of_z]</phrase></span>
		<else />
		&nbsp;
		</if>
	</td>
</tr>
</table>
add the following immediately below:
Code:
<br />$blogsinsrch
Other Modifications
There is another work around HERE which offers an alternative way to integrate blogs with Forum search results...

Extra Notes
To only show new blogs/comment since last visit (in much teh same way as "New Posts" works) see Post Number 41

Spoiler (click to open)


I haven;t tested this, but you could edit the "Add Blogs to Search Page" plugin, search for
Code:
if ($datecut == "") {
and replace it with

Code:
if ($vbulletin->userinfo['lastvisit'] != 0) {
$datecut = $vbulletin->userinfo['lastvisit'];
}
else {
This should then only show the new blogs/comments since the last visit - much the same way as a "New Posts" search does...

Let me know how it goes...

Close
of this thread

For a vBAdvanced module of this add-on, see Post Number 83

Spoiler (click to open)


Quote by Alfa1
Please consider to make this into a vbadvanced module, so that we are able to display latest blogs/comments on vbadvanced pages.
Try the attached module (it needs this addon installed also to get the number and time cut offs)

Let me know how it goes...
Attached Files
File Type: zip vbadvancedrecentblogs.zip (1.4 KB, 23 views)

Close

Download

This modification is archived, downloads are still allowed.

File Type: %1$s product-blogsinsrch-0.0.5.xml (5.5 KB, 58 downloads)
File Type: %1$s product-blogsinsrch-0.0.7.xml (5.9 KB, 80 downloads)
File Type: %1$s product-blogsinsrch-0.0.8.xml (5.9 KB, 30 downloads)
File Type: %1$s product-blogsinsrch-0.0.9a.xml (6.1 KB, 24 downloads)
File Type: %1$s product-blogsinsrch-0.0.9b.xml (6.3 KB, 86 downloads)
File Type: %1$s product-blogsinsrch-0.0.10.xml (6.3 KB, 67 downloads)
File Type: %1$s product-blogsinsrch-0.0.11.xml (6.4 KB, 71 downloads)

Supporters / CoAuthors

  • entertain
  • jibi
  • KrisP

Screenshots

Click image for larger version
Name:	blogsinsrch.jpg
Views:	1110
Size:	78.9 KB
ID:	82369  


vblts.ru supports vBulletin®, 2022-2024