View Full Version : VB Blogs Module
ericgtr
08-31-2007, 08:35 PM
It's been a while since I have done anything for vbadvanced so if you guys have a better way, feel free to use this code to get started. This will display the last 5 blogs and who posted them.
Stilgar
08-31-2007, 08:46 PM
Looks great!
I will install it and use it for sure.
Thanks!
RaceJunkie
08-31-2007, 08:56 PM
Thanks
ericgtr
08-31-2007, 09:07 PM
Thanks
Sure, hopefully this one will work for you :)
RaceJunkie
08-31-2007, 09:08 PM
Sure, hopefully this one will work for you :)
LOL.. Works great, and thanks for your help on .org
ericgtr
08-31-2007, 09:21 PM
BTW if you want a smaller font you can replace the entire contents of the adv_portal_vb_blogs template with this:
<tr>
<td class="smallfont"</td>$spitblogs</td><br />
</tr>
The Black Poet
09-01-2007, 01:20 AM
I guess i need Blog installed to run this mod.....??
lostintexas
09-01-2007, 10:00 AM
Black poet. yes, you will need the blog package.
My forum is located in a subdirectory while vbadvanced is located in the public_html directory. When I select a link on vbadvanced it gives me a 404, page not found error. It is trying to find blog.php in the public directory. where can I edit the path to blog.php to correct this.
Thanks for the mod. It works fine other than this small problem.
ericgtr
09-01-2007, 10:19 AM
You can change that in the Module settings. Admin CP > vBa CMPS > Edit Modules > [vb_blogs] scroll down and find Module Link.
indie
09-02-2007, 03:35 AM
Thanks for this.
PS. The default file is blog.php for the header link, not blogs.php.
ericgtr
09-02-2007, 12:02 PM
Thanks for this.
PS. The default file is blog.php for the header link, not blogs.php.
Thanks for pointing that out, I've updated the module.
indie
09-02-2007, 02:56 PM
Problem. It's showing private/hidden blogs in the titles, it's okay when you click though, you get a no permission message. Can you fix that?
K D Umbaugh
09-02-2007, 09:04 PM
I could not get the module to load, database errors
nostalgia
09-03-2007, 12:47 PM
Thanks!!
But Your original file has some error.
Then, I created new module from your source.
Thanks. :)
DeMiNe0
09-03-2007, 07:40 PM
BTW if you want a smaller font you can replace the entire contents of the adv_portal_vb_blogs template with this:
<tr>
<td class="smallfont"</td>$spitblogs</td><br />
</tr>
Something like this would be much cleaner:
<tr>
<td class="$bgclass">
<span class="smallfont">$spitblogs</span><br />
</td>
</tr>
Joe Blow
09-03-2007, 10:00 PM
Anyone know how to get the 'Blogs' link to show up on the Vbadvanced home page? :confused:
Joe Blow
09-03-2007, 10:24 PM
Anyone know how to get the 'Blogs' link to show up on the Vbadvanced home page? :confused:
Sorry, I should have been more specific. I'm not currently using this addon module (am thinking about it) but have just installed Vb Blogs and the 'Blogs' link in the navbar shows up everywhere except on the Vbadvanced front page.
Can anyone help? :confused:
indie
09-04-2007, 03:25 AM
Sorry, I should have been more specific. I'm not currently using this addon module (am thinking about it) but have just installed Vb Blogs and the 'Blogs' link in the navbar shows up everywhere except on the Vbadvanced front page.
Can anyone help? :confused:
Wrong thread, but in the CMPS setting Portal Output Global Variables put template_hook.
indie
09-04-2007, 03:44 PM
This mod shows deleted blogs.
indie
09-04-2007, 04:19 PM
Since it shows private and deleted blog entries, I'm removing. Hope it can be fixed.
Stilgar
09-04-2007, 06:01 PM
Yes, uninstalled here as well.
Great idea, just needs some work.
trana
09-05-2007, 02:30 PM
How about a module showing thumbnailed images from the most recent blog posts? Either the image from the blog post or the avatar of the blog owner.
That would be awesome.
nymyth
09-06-2007, 04:45 PM
^^agreed, something similar to the GARS module would be great
Gulganei
09-08-2007, 07:17 PM
I modified modules/vb_blogs.php to ignore deleted blogs:
$latestblogs = $db->query("
SELECT blogid, blog.title, blog_user.title AS blogname, username, dateline, userid, views
FROM " . TABLE_PREFIX . "blog
LEFT JOIN blog_user ON blog_user.bloguserid=blog.userid
WHERE blog_user.deleted=0
ORDER BY dateline DESC
LIMIT 5
");
I also added the blogname in the SELECT as well.
Hope this helps!
->Dan
x YNWA x
09-08-2007, 09:32 PM
hi getting this error
Warning: require_once(./global.php) [function.require-once]: failed to open stream: No such file or directory in /home/nickc25/public_html/blog.php on line 174
Fatal error: require_once() [function.require]: Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nickc25/public_html/blog.php on line 174
its because the blog link on the navbar when i click it is going to www.pesforum.co.uk/blog.php instead of www.pesforum.co.uk/forum/blog.php but ive tried everything and cant figure out at all how to fix it, can someone please help
x YNWA x
09-09-2007, 06:06 PM
cany any pleae help?
Loco Macheen
09-09-2007, 08:18 PM
Thanks!!
But Your original file has some error.
Then, I created new module from your source.
Thanks. :)
thanks, this one worked for me :)
manuelsechi
09-10-2007, 09:45 AM
how to install? i tryed from http://www.mysite.it/admincp/vba_cmps_admin.php?do=download but I got an error:
"The file you have uploaded is not a valid module file."
can anyone please help me?
thanx
Loco Macheen
09-10-2007, 11:52 PM
did you try the 2nd one ?
manuelsechi
09-11-2007, 03:46 AM
did you try the 2nd one ?
no sorry :(
now I tried and it works fine
thank u
FearlessNinja
09-11-2007, 09:53 PM
Anyone release a cleaned up version of the blog?
jimjam
09-12-2007, 05:37 AM
I can't find the file to download, is this mod working?
jimjam
09-18-2007, 10:45 AM
Obviously Not!
nymyth
09-18-2007, 01:03 PM
its working fine for me:
www.nysports365.com - It's under recent threads
jimjam
09-18-2007, 06:11 PM
its working fine for me:
www.nysports365.com - It's under recent threads
Well done- but where is it to download, its not here
towermatt
09-18-2007, 06:16 PM
The actual hack can be downloaded from vbulletin.org I believe.
kirkus-tat
09-18-2007, 10:14 PM
It also lists titles of drafts.
Bergman
09-23-2007, 12:18 PM
I have now implemented this on http://www.fiskesnack.com and changed some things in the query.
Modifications:
- Added comments_visible
- Changed the WHERE part to only show "Visible" blog entrys. No drafts, pending or deleted blog entrys will show up
SELECT blogid, blog.title, blog_user.title AS blogname, comments_visible, username, dateline, userid, views
FROM " . TABLE_PREFIX . "blog
LEFT JOIN blog_user ON blog_user.bloguserid=blog.userid
WHERE blog.state='visible' and blog.pending=0
ORDER BY dateline DESC
LIMIT 5
trana
09-24-2007, 02:44 AM
Not working 100% for me. My links are formatted /forum\blogs.php?xxxxx. When the links are clicked on it takes you to the blog page but no images show up, they point to the root of my site instead of /forum.
Any idea what I have to do to fix this?
Thanks!
kirkus-tat
09-26-2007, 01:18 AM
I have now implemented this on http://www.fiskesnack.com and changed some things in the query.
Modifications:
- Added comments_visible
- Changed the WHERE part to only show "Visible" blog entrys. No drafts, pending or deleted blog entrys will show up
SELECT blogid, blog.title, blog_user.title AS blogname, comments_visible, username, dateline, userid, views
FROM " . TABLE_PREFIX . "blog
LEFT JOIN blog_user ON blog_user.bloguserid=blog.userid
WHERE blog.state='visible' and blog.pending=0
ORDER BY dateline DESC
LIMIT 5
I'm still getting drafts.
But thanks for sharing anyway, Bergman.
This thing will eventually evolve into a really nice module.
Bergman
09-29-2007, 06:02 AM
I'm still getting drafts.
But thanks for sharing anyway, Bergman.
This thing will eventually evolve into a really nice module.
Hmm, it should not show drafts ... this part should sort them away.
WHERE blog.state='visible'
A draft should have blog.state='draft'
I have found one more issue and that is that "private" blog entries still shows up. Dont know wich table that value is in. :(
Pingu
09-30-2007, 05:20 PM
I've taken Guganei's query to skip deleted blogs, and added a bit to only use blogs that are visible for everyone. Small change. I'm sure the entire module can be a lot more mature and intelligent but for now this works for me:
$latestblogs = $db->query("
SELECT blogid, blog.title, blog_user.title AS blogname, username, dateline, userid, views
FROM " . TABLE_PREFIX . "blog
LEFT JOIN blog_user ON blog_user.bloguserid=blog.userid
WHERE blog_user.deleted=0 AND blog_user.options_everyone=3
ORDER BY dateline DESC
LIMIT 5
trana
10-01-2007, 01:52 PM
Not working 100% for me. My links are formatted /forum\blogs.php?xxxxx. When the links are clicked on it takes you to the blog page but no images show up, they point to the root of my site instead of /forum.
Any idea what I have to do to fix this?
Thanks!
Any ideas?
Pingu
10-02-2007, 04:08 AM
Change the path to blog.php in the blog_navbar_link template.
I got this error:
Database error in vBulletin 3.6.8:
Invalid SQL:
### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO adv_modules
(`0`, `active`, `userperms`)
VALUES
('', '1', '4,6,8,9,7,2,5,1,3');
MySQL Error : Unknown column '0' in 'field list'
Error Number : 1054
Bergman
10-11-2007, 05:12 PM
I had missed the "private entry" part in the last query. The following works perfect for me.
SELECT blogid, blog.title, blog_user.title AS blogname, comments_visible, username, dateline, userid, views
FROM " . TABLE_PREFIX . "blog
LEFT JOIN blog_user ON blog_user.bloguserid=blog.userid
WHERE blog.state='visible' and blog.pending=0 and blog_user.options_everyone=3
ORDER BY dateline DESC
LIMIT 3
I dont think that the "blog_user.deleted=0" posted above is a safe way to filter deleted blog posts. Use "blog.state='visible' and blog.pending=0 and blog_user.options_everyone=3" instead.
Hope that it works for you also. :)
imprezion
10-17-2007, 11:14 PM
can any help? how to install the module file?
enteens
10-18-2007, 04:35 AM
Thanks!!
But Your original file has some error.
Then, I created new module from your source.
Thanks. :)
Yes it had some error , yours is working nostalgia
Thanks
enteens
10-18-2007, 04:38 AM
hai gorp , i had the same error
install nostalgias module its working
imprezion --> to install module , goto admincp > vba cmps > Download / Upload Module
PoetJC
10-30-2007, 05:53 AM
weird:
The file you have uploaded is not a valid module file.
Any suggestions?
Thanx,
Jacquii.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.