vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   How to check if blog is installed? (https://vborg.vbsupport.ru/showthread.php?t=229690)

derfelix 12-07-2009 05:35 AM

How to check if blog is installed?
 
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:
PHP Code:

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

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

ForumsMods 12-07-2009 08:24 PM

Use $vbulletin->products['vbcms'] and $vbulletin->products['vbblog']

derfelix 12-08-2009 01:13 AM

Thank you very much!
F.


All times are GMT. The time now is 01:38 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01836 seconds
  • Memory Usage 1,709KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete