View Full Version : How to check if blog is installed?

07 Dec 2009, 07:35
Hi, i was wondering if there is a better way to check if blog (suite) is installed.

I'm doing an external userpage.. and want some links on that page..

example: if the site has suite installed, then add a link to users blog and users profile,
if the site has NOT blog installed then link only to users profile.
(I am not on a blog page.. so I cant do a THIS_SCRIPT check)

I thought of 2 ways of doing this...
1. check if file_exists blog.php, if yes then show the link, if no then not..

2. check if there are blog options in vbulletin->options:
if($vbulletin->options['blog_commentsperpage'] AND !empty($vbulletin->options['blog_commentsperpage']))

both seem to work but I personnally think both are not very elegant (second being a bit better, but i just chose that commentsperpage option randomly - didn't find any 'blog_active' option which would do the trick)..

Anybody have any ideas?

thanx in advance

PS: i only want to check if the site has suite installed and blog active.. not if the user has created his own blog..

07 Dec 2009, 22:24
Use $vbulletin->products['vbcms'] and $vbulletin->products['vbblog']

08 Dec 2009, 03:13
Thank you very much!