Status
Not open for further replies.

janslu

Customer
Hi,
Since version 1.0.1 came out I'm getting closer and closer to actually launching dbseo on my production site. But When I went through all the different scripts I found out there's one feature I need and I'm not sure if it's there. I'm using an external script to generate links for specific forums (they are changing quite often and this process cannot be handled by hand). The whole script resides outside vbulletin - I query the database by hand and get forumid. Then with vbseo I could use the following function:

Code:
			include_once 'forum/vbseo/includes/functions_vbseo.php';	
			vbseo_get_options();
			vbseo_prepare_seo_replace();
			vbseo_get_forum_info();
			$result .= 'Forum: <a href="http://www.domain.com/forum/'.vbseo_forum_url($forumid).'">'.$title.'</a>';

As you can see, with the include I could actually use a function to get URL of a specific forum by id. There were other functions available also, but this one is still being used on my installation. Is this possible with dbseo?
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
The equivalent code would be this:
PHP:
if (!class_exists('DBSEO'))
{
	// Set important constants
	define('DBSEO_CWD', 	'/path/to/forum');

	// Make sure we nab this class
	require_once(DBSEO_CWD . '/dbtech/dbseo/includes/class_core.php');

	// Init DBSEO
	DBSEO::init(true);
}

$result .= 'Forum: <a href="http://www.domain.com/forum/' . DBSEO::createUrl('Forum_Forum', array('forumid' => $forumid)) . '">' . $title . '</a>';

Do be aware this is entirely untested.
 
It was working OK until 1.1.1 - after upgrading to 1.1.1 I always get Access denied error. Any way to enable these functions outside vbulletin?
 
Just to clarify - i'm using these functions to get proper urls to specific forums (I keep an array of related forums to create menus outside of vbulletin).
 
I've added
Code:
 if(!defined('IN_DBSEO')) define ('IN_DBSEO', 'IN_DBSEO');
before the previous code and it works fine...
 
The correct code would be
PHP:
if(!defined('IN_DBSEO'))
{
	define ('IN_DBSEO', true);
}

But otherwise, that is indeed needed in order to work the new changes.
 
Status
Not open for further replies.
Back
Top