PDA

View Full Version : vBulletin Blog - New Blogs/Comments in Forum Search Results


dartho
06-15-2008, 10:00 PM
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 (https://vborg.vbsupport.ru/showthread.php?p=1675586#post1675586) 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 (https://vborg.vbsupport.ru/showthread.php?p=1769586#post1769586) by entertain
0.0.11 - Fixed bug where pending blogs were being displayed as per this (https://vborg.vbsupport.ru/showpost.php?p=1868859&postcount=108) 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:

<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:

<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 (https://vborg.vbsupport.ru/showpost.php?p=1568559&postcount=41) of this thread

For a vBAdvanced module of this add-on, see Post Number 83 (https://vborg.vbsupport.ru/showpost.php?p=1698974&postcount=83)

Nikke
06-16-2008, 05:00 AM
Great man! Will install!

Baldilocks
06-16-2008, 06:05 AM
This caused a database error on my board that took me an hour to get fixed.

dartho
06-16-2008, 07:09 AM
Do you use table prefixes in your DB? After reading your post I see that I have forgotten to include that in the query. New version up shortly.

As it only does a DB read query - I can't imagine anything would have been damaged, just a db error which should have gone away with the product being uninstalled... Many apologies!

Baldilocks
06-16-2008, 07:12 AM
Yes, once I was finally able to get back into the adminCP i just unistaled the plug-in.

dartho
06-16-2008, 07:19 AM
Just uploaded 0.0.2 which should resolve any issues.

Alfa1
06-16-2008, 12:21 PM
Does this include blog entries in new posts?

dartho
06-16-2008, 12:42 PM
Yep - new posts, todays posts and searches - all search screens

Alfa1
06-16-2008, 01:14 PM
I bow to you oh holy Dartho! ;)

Thanx!

dartho
06-16-2008, 01:48 PM
Thanks, but no bowing please. As with all my other addons/style - this is simply something I needed for my own site which I managed to work out, and thought I'd share here.

bertwrld
06-16-2008, 05:39 PM
Would it be possible to get something like this, but for the new posts in social groups?

PtitLu
06-17-2008, 08:23 AM
Just uploaded 0.0.2 which should resolve any issues.

Same problem for me : dB error

Database error in vBulletin 3.7.1:

Invalid SQL:
SELECT blog_text.state, blog_text.blogid, blog_text.username,blog_text.userid, date(FROM_UNIXTIME(blog_text.dateline)) as date, time(FROM_UNIXTIME(blog_text.dateline)) as time, blogtitle.userid as authorid, blogtitle.username as author, blogtitle.views as views ,pagetext,blogtitle.title as title FROM vb_`blog_text` INNER JOIN blog as blogtitle on blogtitle.blogid = blog_text.blogid WHERE blog_text.dateline >=1213089690 AND blog_text.state = 'visible' ORDER by blog_text.dateline DESC LIMIT 5;

MySQL Error : Table 'forums.vb_' doesn't exist

Product deactivated.

dartho
06-17-2008, 10:41 AM
Thanks for reporting that PtitLu - however that error doesn't seem to make sense to me - although that doesn't necessarily mean much..

It did however make me look at the query again and I saw that I was missing the TABLE_PREFIX variable on the join which I have rectified and uploaded a new version.

Thanks

Koroku
06-17-2008, 07:25 PM
Database error in vBulletin 3.7.1:

Invalid SQL:
SELECT blog_text.state, blog_text.blogid, blog_text.username,blog_text.userid, date(FROM_UNIXTIME(blog_text.dateline)) as date, time(FROM_UNIXTIME(blog_text.dateline)) as time, blogtitle.userid as authorid, blogtitle.username as author, blogtitle.views as views ,pagetext,blogtitle.title as title FROM forum_`blog_text` INNER JOIN blog as blogtitle on blogtitle.blogid = blog_text.blogid WHERE blog_text.dateline >=1213129466 AND blog_text.state = 'visible' ORDER by blog_text.dateline DESC LIMIT 5;

MySQL Error : Table 'dats_forums.forum_' doesn't exist
Error Number : 1146
Request Date : Tuesday, June 17th 2008 @ 03:24:26 PM
Error Date : Tuesday, June 17th 2008 @ 03:24:26 PM
Script : http://forums.dats.us/search.php?do=getnew
Referrer : http://forums.dats.us/
IP Address : 75.168.72.16
Username : Boy 412
Classname : vB_Database
MySQL Version : 5.0.45-community-log:/

Still having problems with the 3rd version.

BigDog56
06-17-2008, 07:40 PM
Same here.

Database error in vBulletin 3.7.1:

Invalid SQL:
SELECT blog_text.state, blog_text.blogid, blog_text.username,blog_text.userid, date(FROM_UNIXTIME(blog_text.dateline)) as date, time(FROM_UNIXTIME(blog_text.dateline)) as time, blogtitle.userid as authorid, blogtitle.username as author, blogtitle.views as views ,pagetext,blogtitle.title as title FROM ravensfo_`blog_text` INNER JOIN blog as blogtitle on blogtitle.blogid = blog_text.blogid WHERE blog_text.dateline >=1213130405 AND blog_text.state = 'visible' ORDER by blog_text.dateline DESC LIMIT 5;

MySQL Error : Table 'ravensfo_forums.ravensfo_' doesn't exist
Error Number : 1146
Request Date : Tuesday, June 17th 2008 @ 02:40:05 PM
Error Date : Tuesday, June 17th 2008 @ 02:40:06 PM
Script : http://ravensforums.com/forums/search.php?do=getdaily
Referrer : http://ravensforums.com/forums/blog.php?u=468
IP Address : 76.11.133.237
Username : Jeff
Classname : vb_database
MySQL Version : 5.0.45-community-log

dartho
06-17-2008, 09:53 PM
I obviously have no idea how to query databases which use table prefixes .... :( Next version will fix it for you - promise ;)


[Edit: Just checked - the XML that was there was still 0.0.2. Have uploaded 0.0.3 (and changed its name so there can be no mistakes.

I've doubled checked and double checked again and 0.0.3 *should* be right.]

BigDog56
06-18-2008, 12:51 AM
I'll try it again! Be right back.

BigDog56
06-18-2008, 12:55 AM
Database error in vBulletin 3.7.1:

Invalid SQL:
SELECT blog_text.state, blog_text.blogid, blog_text.username,blog_text.userid, date(FROM_UNIXTIME(blog_text.dateline)) as date, time(FROM_UNIXTIME(blog_text.dateline)) as time, blogtitle.userid as authorid, blogtitle.username as author, blogtitle.views as views ,pagetext,blogtitle.title as title FROM xxxxx_blog_text INNER JOIN xxxxxxx_blog as blogtitle on blogtitle.blogid = blog_text.blogid WHERE blog_text.dateline >=1213149267 AND blog_text.state = 'visible' ORDER by blog_text.dateline DESC LIMIT 5;

MySQL Error : Unknown column 'blog_text.state' in 'field list'
Error Number : 1054
Request Date : Tuesday, June 17th 2008 @ 07:54:27 PM
Error Date : Tuesday, June 17th 2008 @ 07:54:27 PM
Script : http://ravensforums.com/forums/search.php?do=getnew
Referrer :
IP Address : 76.11.133.237
Username : Jeff
Classname : vb_database
MySQL Version : 5.0.45-community-log

dartho
06-18-2008, 01:15 AM
I obviously have no idea how to query databases which use table prefixes .... :(

Guess I was right on that part...

I've sought expert help to resolve this. I'll be back....

dartho
06-18-2008, 02:32 AM
0.0.4 up now - lets try this again... Thanks to Nexialys (https://vborg.vbsupport.ru/member.php?u=56130) for help on the query :up:

BigDog56
06-18-2008, 03:00 AM
off to try it now!

BigDog56
06-18-2008, 03:08 AM
BINGO! Works perfectly! Thank you for all your hard work!:up: Clicks "Installed!"

Brandon Sheley
06-18-2008, 03:31 AM
wooohoo

I'll hold off a day or two, but this is something I've been looking for :)

dartho
06-18-2008, 04:32 AM
BINGO! Works perfectly! Thank you for all your hard work!:up: Clicks "Installed!"

Thanks for you perseverance - glad it is working for everyone now!

Next up, I have to phrase it :erm:

PtitLu
06-18-2008, 06:49 AM
OK, it works now. By the way, how can i change the language to french (or another one) ? Is there a language file available ?
Thanks for your work.

dartho
06-18-2008, 07:19 AM
For now you will need to manually edit the templates... I will endeavour to phrase it so that it uses vBulletins default phrases and no translation will be required...

Baldilocks
06-18-2008, 07:46 AM
Works great now, thank you!!

dartho
06-18-2008, 07:54 AM
You're welcome, happy to hear it!

PtitLu
06-18-2008, 08:07 AM
I will endeavour to phrase it so that it uses vBulletins default phrases and no translation will be required...Thanks :)

For now you will need to manually edit the templates...OK, which ones should i edit ?

dartho
06-18-2008, 08:25 AM
bloginsrch and bloginsrch_bit

Brandon Sheley
06-18-2008, 03:09 PM
okay, I've added it
now to see if the members notice it down there.. it would be nice to get the blog post mixed in with the threads new post
btw..

* Brandon Sheley clicked install last night :D

Koroku
06-25-2008, 10:48 PM
Works wonderfully now!

Bravo :D

Alfa1
06-27-2008, 10:33 PM
Looks good.

Would it be possible to list every blog only once? Sometimes I get the same blog listed 6 times, because there where 6 comments.

Alfa1
06-29-2008, 02:05 PM
To place the latest blogs below the list of page numbers (so you don't have to scroll past it to click on the next page), do this:
Below:
<if condition="$pagenav">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:3px">
<tr valign="top">
<if condition="$pagenav"><td align="$stylevar[right]">$pagenav</td></if>
</tr>
</table>
</if>

Place:
<br />$blogsinsrch

Does anyone know the code to only show this on the first page of search results?

dartho
06-29-2008, 09:42 PM
Looks good.

Would it be possible to list every blog only once? Sometimes I get the same blog listed 6 times, because there where 6 comments.

I'll see what I can work out...

Alfa1
07-01-2008, 12:56 PM
I see that it shows moderated blogs, so when members click on the link the get a no permissions page.

Zweeper
07-01-2008, 02:03 PM
when i use the [font] bb code, then somethin goes wrong with the indexing?!

for example, post a blog like this:

[ FONT="Fixedsys"]

bla bla bla

[ /FONT]

Dabbi
07-06-2008, 08:11 PM
Thank you! :) This is wonderful and one of the things I was hoping for to get the blogs more visible. :cool:

Is there any way that when a member has read a blog or comment or marked as read under New Posts they could work in a similar manner as posts do?

dartho
07-06-2008, 09:44 PM
Alfa1 - does the standard Blogs page show moderated blogs?
Zweeper - do you have an example?
Dabbi - there may be a way, but I wanted to give the blogs more attention

When I next do some tweaks/updates to my site I'll have another look at this add-on

Dabbi
07-06-2008, 09:51 PM
Thanks Dartho!

I want them to get attention as well which is why I really like this mod, but if a member has read them already it would be handy if they would disappear until a "New Post" or Comment were added like posts do when using New Posts. I'm concerned that if they see the same thing each time they may mentally ignore that area which sort of defeats the purpose of getting them more visible I would think. :)

dartho
07-06-2008, 11:45 PM
I haven;t tested this, but you could edit the "Add Blogs to Search Page" plugin, search for

if ($datecut == "") {


and replace it with


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...

Dabbi
07-07-2008, 12:09 AM
Thank you so much, that looks like it did the trick. :)

dartho
07-07-2008, 12:36 AM
No worries, Dabbi :up:

when i use the [font] bb code, then somethin goes wrong with the indexing?!
for example, post a blog like this:
[ FONT="Fixedsys"]
bla bla bla
[ /FONT]

BTW - I just tested this Zweeper - didn't see anything unusual?

Zweeper
07-07-2008, 07:07 AM
hm you are right, i had this error only once... so it's ok. sorry ;)

Zweeper
07-15-2008, 06:37 AM
post a blog like this and look in your search:






Jetzt ist der Angelurlaub also vorbei.

http://img410.imageshack.us/img410/4203/imgp0462bx9.jpg (http://img410.imageshack.us/img410/4203/imgp0462bx9.jpg)

Nach einer kaffeelastigen Gewaltaktion gestern Nacht,
w?hrend der wir den Fischen nur 2,5 Stunden Ruhe geg?nnt hatten, steht die Bilanz:
10 Schleien,
1 Rotauge (oder halt ein Fisch mit roten Augen und gr?nem Fell) und
4 m?chtige Karpfen.

Die Karpfen haben wir auch direkt vor Ort geschlachtet und gegessen.
Ger?uchert und gegrillt, wobei mir gegrillt besser geschmeckt hatte.

Die anderen Fische wurden in einen anderen Weiher gebracht, damit sie sich dort einmal umschauen konnten.

Abgesehn von dem wahnsinnig entspannendem Ausblick dem man auf dem Steg, beim angeln hat, gab es auch sehr viele andere sch?ne Momente mit 9 jungen Enten, einem Eisvogelp?rchen, jungen Rotkehlchen und nem kleinem Hecht mit Fisch im Maul *orange*

http://img411.imageshack.us/img411/5635/imgp0465jj4.jpg (http://img411.imageshack.us/img411/5635/imgp0465jj4.jpg)

Bin trotzdem froh dass es jetzt vorbei ist, ich muss unbedingt mal wieder l?nger schlafen.
W?re mir die Katze heute Morgen nicht unsanft ins Gesicht gesprungen w?re ich vermutlich immer noch schlafen... >:(

http://img147.imageshack.us/img147/7964/imgp0449wt4.jpg (http://img147.imageshack.us/img147/7964/imgp0449wt4.jpg)

Meine Hoffnung ist, dass, wenn meine H?nde nicht mehr nach Fisch riechen auch die Hunde und Katzen aufh?ren an mir herum zu lecken und sich daf?r meine Freundin mal wieder Blicken l?sst *orange*

http://img521.imageshack.us/img521/1483/imgp0454uo5.jpg (http://img521.imageshack.us/img521/1483/imgp0454uo5.jpg)

dartho
07-16-2008, 07:05 AM
oops... I think if you edit the blogsinsrch template and remove the 2 occurrences of title="$blogsrch[pagetext]" that should fix it until a new release is done.

Zweeper
07-16-2008, 08:48 AM
no, this dont works

dartho
07-16-2008, 01:55 PM
sorry - the blogsinsrch_bit template ...

I probably won't have time to have a good look till Friday

carrlos
07-21-2008, 03:28 AM
I've been waiting on this since......FOREVER!!!!!!!!!!

INSTALLED!!!!!

EvilJohn
08-11-2008, 08:47 AM
Thank you. Sharing FTW.

carrlos
09-01-2008, 05:12 PM
Can you make the links in the seach page go to the page of the blog comment? Each link goes to the first page of the blog. Thanks in advance! Great product!

dartho
09-02-2008, 07:09 AM
Just added this in 0.0.6 with minimal testing...

carrlos
09-02-2008, 03:26 PM
Thanks dartho! I'm hoping the link feature is working as you say! Thanks!

carrlos
09-02-2008, 06:16 PM
Here is an example of what is happening to me with 0.0.6.

http://www.maximus.ws/forum/files/maX/pictures/misc/blog_search.gif

I am running 3.7.3.

Edit: It appears that instead of forum/images/buttons/lastpost.gif, the link for the last post button is coming out forum/images/wf/buttons/lastpost.gif!!!

BTW, why didn't you integrate the modification that you wrote in post #41? It works really good!

carrlos
09-02-2008, 07:10 PM
Ok, I opened the product in Dreamweaver and removed the "wf" directory and added your mod from post #41. Everything is fine on that end but I don't know how to get rid of the "<" that appear!

dartho
09-02-2008, 09:48 PM
Oops... - Just fixed up the image path and errant "<" download latest 0.0.7 version

I didn't integrate the stuff in post #41 as I don't want it set up like that on my site and that's what I wrote this mod for :)

carrlos
09-02-2008, 10:47 PM
Downloading and installing!! :D

carrlos
09-03-2008, 02:29 AM
Perfect! The only other change that would be nice is for the "bold" to go away once the link has been accessed like the other search results! :)

JackFranklin
10-30-2008, 12:58 AM
Hey, in this post
https://vborg.vbsupport.ru/showpost.php?p=1568559&postcount=41

You say to edit the plugin but I am confused as to what file exactly to edit?

Thanks.

furst
10-30-2008, 01:54 AM
thanks for this mod

dartho
10-30-2008, 02:12 AM
Hey, in this post
https://vborg.vbsupport.ru/showpost.php?p=1568559&postcount=41

You say to edit the plugin but I am confused as to what file exactly to edit?

Thanks.

If you're unsure how to edit a plug-in, you could edit the product file and do the same search /replace before you install it...

bjkinzluvr
10-30-2008, 06:36 AM
I can't even figure out how to get the blog feature on my forum, let alone use your add-on to help integrate it. Can you help me with that? I know it's out of the scope of this, but I would apprecite it.

dartho
10-30-2008, 09:12 AM
blogs isn't a 'feature' per se, its an additional product you need to purchase from www.vBulletin.com

Hornstar
10-30-2008, 08:42 PM
I may give this a go shortly, just wondering has anyone used it with vb 3.8 and vblog 2 yet?

dartho
10-31-2008, 12:53 AM
I've not tested that scenario - I must say I'm suprised the VB team didn't integrate blogs and searches themselves in the latest versions?

Kalina
11-21-2008, 01:43 AM
Is there any way to stop the time stamp from showing in Military time and to appear in my forums time style instead... instead of 21:34:34 can it be 9:34pm... also, the time is showing as one hour earlier than the blog post/comment was made...

dartho
11-21-2008, 03:04 AM
Sorry - I'm not going to be doing any updates to this one (no time / motivation).

As such I've changed it's settings to "Not Supported" and "Re-usable Code" which means I'm not necessarily going to help, however anyone else can copy/use/enhance the existing code to create a new product which will hopefully be better than this one.

KrisP
11-30-2008, 05:01 AM
Seems blog drafts are showing up in search results - anybody got a fix for that?

KrisP
11-30-2008, 05:40 AM
Found it:

In plugin search_start change
. " AND blog_text.state = 'visible'"
TO
. " AND blogtitle.state = 'visible'"

Alfa1
11-30-2008, 02:02 PM
Thanks for the update.
Does anyone have a fix for blogs showing up multiple times, when there are multiple comments?

dartho
12-08-2008, 10:30 PM
I think I've worked out how to limit the results to only the latest comment for each blog... New version up in a minute

Alfa1
12-09-2008, 01:37 AM
Database error in vBulletin 3.7.4:

Invalid SQL:

SELECT blog_text.blogid, blog_text.state, blog_text.blogtextid, blog_text.username, blog_text.userid, date( FROM_UNIXTIME( blog_text.dateline ) ) AS date, time( FROM_UNIXTIME( blog_text.dateline ) ) AS time, blogtitle.userid AS authorid, blogtitle.username AS author, blogtitle.views AS views, pagetext, blogtitle.title AS title, blog_text.title AS text_title
FROM vb6_blog_text
INNER JOIN (
SELECT max( blogtextid ) AS blogtextid
FROM vb6_blog_text AS blog_text
GROUP BY blogid
)blogtextids ON blog_text.blogtextid = blogtextids.blogtextid
INNER JOIN vb6_blog AS blogtitle ON blogtitle.blogid = blog_text.blogid
WHERE blog_text.dateline >=1228188924
AND blogtitle.state = 'visible'
ORDER BY blog_text.dateline DESC
LIMIT 15;

MySQL Error : Unknown column 'blog_text.blogid' in 'field list'
Error Number : 1054
Request Date : Tuesday, December 9th 2008 @ 04:35:24 AM
Error Date : Tuesday, December 9th 2008 @ 04:35:24 AM
Script : http://www.mysite.com/forum/search.php?do=getnew

dartho
12-09-2008, 02:27 AM
Ah - I see the problem... just a sec, new version coming.\\

New version up 0.0.9a - problem will have only affected those with table prefixes

Alfa1
12-09-2008, 02:42 AM
Works great. Thanks!

dartho
12-09-2008, 03:03 AM
Is there any way to stop the time stamp from showing in Military time and to appear in my forums time style instead... instead of 21:34:34 can it be 9:34pm...

Just updated again - 0.0.9b - time/date disaply should be same as rest of forum now...

EvilJohn
12-15-2008, 07:15 PM
updated to 0.0.9b I am using 3.8.0 RC1 and vbblog 2.0 RC1 Everything working fine. I am also using the template change in post #41. Thank you for the update. :)

nonwa
12-21-2008, 05:04 AM
Please help
Please tell me How can I show this mod in Forum Home (No need to Search anything)
Thanks

dartho
12-21-2008, 06:02 AM
Shouldn't be too hard, I'll look into it...

Hugo Holbling
12-21-2008, 10:43 AM
I use this mod in combination with Blog Stats Forum Home (https://vborg.vbsupport.ru/showthread.php?t=184169) and they seem to do the job.

nonwa
12-22-2008, 09:22 AM
Shouldn't be too hard, I'll look into it...
Thank You very much. That's very kind of you.

dartho
12-23-2008, 09:47 AM
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

Alfa1
01-01-2009, 04:27 PM
Please consider to make this into a vbadvanced module, so that we are able to display latest blogs/comments on vbadvanced pages.

dartho
01-02-2009, 02:39 AM
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...

Alfa1
01-02-2009, 02:27 PM
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?

edytwinky
01-02-2009, 03:14 PM
Received the same database error with vb 3.7.4

Alfa1
01-04-2009, 12:54 AM
/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.

edytwinky
01-04-2009, 06:07 PM
Any information on why I received a database error when I went to hit new posts?

I'm currently using vb 3.7.4


Database error in vBulletin 3.7.4:

Invalid SQL:

SELECT blog_text.dateline AS dateline, blog_text.blogid, blog_text.state, blog_text.blogtextid, blog_text.username, blog_text.userid, date( FROM_UNIXTIME( blog_text.dateline ) ) AS date, time( FROM_UNIXTIME( blog_text.dateline ) ) AS time, blogtitle.userid AS authorid, blogtitle.username AS author, blogtitle.views AS views, pagetext, blogtitle.title AS title, blog_text.title AS text_title
FROM xxxblog_text AS blog_text
INNER JOIN (
SELECT max( blogtextid ) 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

edytwinky
01-07-2009, 05:15 PM
Any assistance?

dartho
01-08-2009, 08:42 AM
could be a MYSQL version issue - 4.0.20 is a bit out of date ....

edytwinky
01-08-2009, 02:31 PM
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

AzH
01-18-2009, 08:47 PM
Would be cool to get a 3.8 version of this. Crazy that they didn't add it as default.

PtitLu
01-18-2009, 09:22 PM
Would be cool to get a 3.8 version of this.It works on 3.8.0 ;)

AzH
01-18-2009, 10:26 PM
I put the code in the wrong place. Thanks for making me check it again.

edytwinky
01-24-2009, 08:34 PM
Not a big fan of this. It works weird. There has to be new posts for new blogs to show up.

Haenk
03-11-2009, 05:55 AM
Search doesn't find if i search for the title

mooncreek
03-15-2009, 11:25 AM
vb 3.81, vb blog 2.0.1 Patch Level 1

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

dartho
03-15-2009, 12:32 PM
vb 3.8.1 PL1, vbblog 2.0.0

working sweet!

Check you settings ...

entertain
03-16-2009, 12:43 PM
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)

entertain
03-16-2009, 12:54 PM
Fixed by changing
$numblogs = mysql_num_rows($result);
into
$numblogs = $db->num_rows($result);

mooncreek
03-16-2009, 07:38 PM
Fixed by changing
$numblogs = mysql_num_rows($result);
into
$numblogs = $db->num_rows($result);

I got the same error - is that code change in the same search_results template?

entertain
03-17-2009, 02:28 PM
No, you have to change this in the plug-in which is called "Add Blogs to Search Page" :)

dartho
03-17-2009, 08:53 PM
Thanks, entertain. Main product file updated. mooncreek, just re-install the latest version.

mooncreek
03-17-2009, 09:02 PM
Thanks - I made entertain's edit and it is working sweetly.

Hi5
03-27-2009, 05:00 PM
this is great

would love to see something like this for album comments!

cad2go
07-25-2009, 03:32 PM
3.8.3 Works a treat! ty

jibi
08-16-2009, 11:26 PM
Dartho, it appears that unpublished, pending blogs are also listed. Any way to fix this?

dartho
08-16-2009, 11:35 PM
I'll look into it...

jibi
08-17-2009, 02:22 AM
*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.

nascartr
08-17-2009, 04:09 PM
I haven;t tested this, but you could edit the "Add Blogs to Search Page" plugin, search for

if ($datecut == "") {
and replace it with


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...


Would it be possible to get this added into the next release? I have to edit the plugin with each upgrade.

Per1213
09-04-2009, 04:01 PM
Quick query.

New blogs/comments seem to disappear after a certain (and very short) period of time even if I haven't gone and seen the blog post/comment. It is almost as though if someone clicks the new blog then it disappears from the search results for the whole community and not just that one individual user.

kho91
10-21-2009, 11:28 PM
thank's so much, i love it!

install & nominate

cad2go
11-03-2009, 07:21 PM
It shows titles of entries that are marked private in the results and titles of entries from private blogs.

Cheers - Super mod

dartho
11-03-2009, 10:30 PM
Looks like you have installed version 0.0.10.

0.0.11 should fix this

inciarco
11-08-2009, 04:24 AM
Optional Template Edits for Right/Left Column on vBAdvanced CMPS Main Page:

Template "adv_portal_recentblogs"

Code:

$newblogs


and

Template: "adv_portal_recentblogs_bits"

Code:

<tr>

<td style="cursor: default;" class="alt1">

<div class="smallfont">

<a href="blog.php?$session[sessionurl]b=$blogsrch[blogid]" style="font-weight: bold;">$blogsrch[title]</a>

<br>

Author: <span style="cursor: pointer;" onclick="window.open('member.php?u=$blogsrch[authorid]', '_self')">$blogsrch[author]</span>

<br>

$blogsrch[date] <span class="time">$blogsrch[time]</span><br>

<if condition="$blog_comment"><a href="blog.php?$session[sessionurl]b=$blogsrch[blogid]#comment$blogsrch[blogtextid]"><else /><a href="blog.php?$session[sessionurl]b=$blogsrch[blogid]"></if> <img title="Last Comment" class="inlineimg" src="images/buttons/lastpost.gif" alt="Last Comment" border="0"></a> post by <a href="member.php?$session[sessionurl]u=$blogsrch[userid]" rel="nofollow">$blogsrch[username]</a>

<br>

Views: $blogsrch[views]

</div>

</td>

</tr>

<tr>

<td style="cursor: default;" class="alt2">

<div class="smallfont">

<a href="blog.php?$session[sessionurl]u=$blogsrch[authorid]">$blogsrch[author]'s Blog</a>

</div>

</td>

</tr>

My Best Regards.

:)