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

Reply
 
Thread Tools
New Blogs/Comments in Forum Search Results Details »»
New Blogs/Comments in Forum Search Results
Version: 0.0.11, by dartho dartho is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Category: vBulletin Blog - Version: 3.7.x Rating:
Released: 06-15-2008 Last Update: 08-16-2009 Installs: 55
Uses Plugins Template Edits
Re-useable Code Is in Beta Stage  
No support by the author.

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 :erm:
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 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 by entertain
0.0.11 - Fixed bug where pending blogs were being displayed as per this 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 of this thread

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

Supporters / CoAuthors

Show Your Support

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

Comments
  #82  
Old 12-23-2008, 09:47 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To make this show on Forumhome rather than in search results:
1. Install product
2. Edit the Add Blogs to Search Page plugin and change it's Hook Location from search_start to forumhome_start
3. Edit your FORUMHOME template and insert the text $blogsinsrch where you want the blogs search results to show. (probably just before <!-- what's going on box -->or after <!-- end what's going on box -->)

that's it. If you wish it to show in search results AND FORUMHOME, you will need to create a new plugin on forumhome_start with teh same contents as the Add Blogs to Search Page plugin

Hope this helps
Reply With Quote
  #83  
Old 01-01-2009, 04:27 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please consider to make this into a vbadvanced module, so that we are able to display latest blogs/comments on vbadvanced pages.
Reply With Quote
  #84  
Old 01-02-2009, 02:39 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alfa1 View Post
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...
Reply With Quote
  #85  
Old 01-02-2009, 02:27 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works like a charm. Many thanks! This really adds to the integration of the blog with the rest of my site.
I wish we had the same for group comments. Would you consider looking into this?
Reply With Quote
  #86  
Old 01-02-2009, 03:14 PM
edytwinky edytwinky is offline
 
Join Date: Aug 2007
Posts: 512
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Received the same database error with vb 3.7.4
Reply With Quote
  #87  
Old 01-04-2009, 12:54 AM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/images/buttons/lastpost.gif should be the full url, otherwise it will not display on pages located outside the /forum/ directory.

I edited the plugin myself, but thought this might be useful for others.
Reply With Quote
  #88  
Old 01-04-2009, 06:07 PM
edytwinky edytwinky is offline
 
Join Date: Aug 2007
Posts: 512
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any information on why I received a database error when I went to hit new posts?

I'm currently using vb 3.7.4

PHP Code:
Database error in vBulletin 3.7.4:

Invalid SQL:

SELECT blog_text.dateline AS datelineblog_text.blogidblog_text.stateblog_text.blogtextidblog_text.usernameblog_text.useriddateFROM_UNIXTIMEblog_text.dateline ) ) AS datetimeFROM_UNIXTIMEblog_text.dateline ) ) AS timeblogtitle.userid AS authoridblogtitle.username AS authorblogtitle.views AS viewspagetextblogtitle.title AS titleblog_text.title AS text_title
FROM xxxblog_text 
AS blog_text
INNER JOIN 
(
SELECT maxblogtextid ) AS blogtextid
FROM xxxblog_text 
AS blog_text
GROUP BY blogid
)blogtextids ON blog_text.blogtextid blogtextids.blogtextid
INNER JOIN xxxblog 
AS blogtitle ON blogtitle.blogid blog_text.blogid
WHERE blog_text
.dateline >=1230494900
AND blogtitle.state 'visible'
ORDER BY blog_text.dateline DESC
LIMIT 5
;

MySQL Error   You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '( FROM_UNIXTIME( blog_text.dateline ) ) AS date, time( FROM_UNI
Error Number  : 1064
Request Date  : Sunday, January 4th 2009 @ 03:08:20 PM
Error Date    : Sunday, January 4th 2009 @ 03:08:21 PM
Script        : http://forums.xxx.com/search.php?do=getnew
Referrer      : http://forums.xxx.com/index.php
IP Address    : 68.102.23.100
Username      : xxx
Classname     : vb_database
MySQL Version : 4.0.20-standard 
Reply With Quote
  #89  
Old 01-07-2009, 05:15 PM
edytwinky edytwinky is offline
 
Join Date: Aug 2007
Posts: 512
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any assistance?
Reply With Quote
  #90  
Old 01-08-2009, 08:42 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

could be a MYSQL version issue - 4.0.20 is a bit out of date ....
Reply With Quote
  #91  
Old 01-08-2009, 02:31 PM
edytwinky edytwinky is offline
 
Join Date: Aug 2007
Posts: 512
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dartho View Post
could be a MYSQL version issue - 4.0.20 is a bit out of date ....
Thanks I didn't realize mine was old. Contact my host server and upgraded. Everything works out perfectly now.

Thanks again
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 01:34 AM.


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.07156 seconds
  • Memory Usage 2,324KB
  • 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
  • (2)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)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
  • (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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete