Installing SAPE on vBulletin 4.0.x + vBSEO


This article will help you install the SAPE code on the vBulletin 4 line forum.

Adding a module:
1. Enter the Admin Center - "Module management". Next, we add a module with the following dаta:

Product: vBulletin
Module location: global_bootstrap_init_start
Title: sape
Order of execution: 5

define('_SAPE_USER', 'your_code');
require_once($_SERVER['DOCUMENT_ROOT'].'/forum/'._SAPE_USER.'/sape.php '); 
$o['host'] = 'your_domain';
//$o['force_show_code'] = true;
//$o['verbose'] = true; 
$sape = new SAPE_client($o); 
$sape1 = $sape->return_links(2); 
$sape2 = $sape->return_links(2); 
$sape3 = $sape->return_links(); 

$preRegister['sape1'] = $sape1; 
$preRegister['sape2'] = $sape2; 
$preRegister['sape3'] = $sape3; 
vB_Template::preRegister('footer', $preRegister); 

unset($o); 


Module Included: Yes

Save it.
Now for example for the FOOTER:

we insert the code in the right places: {vb:raw sape1}, {vb:raw sape2}, {vb:raw sape3}

Go to the host, delete the links file.db and update the file sape.php

Now we take the file .htaccess
We find it there and change it

RewriteRule ^(.+)$ vbseo.php [L,QSA] 


On
RewriteRule ^(.+)$ vbseo.php?vbseourl=$1&uri=%{REQUEST_URI} [L,QSA] 


P.S. Do not forget to prescribe variables {vb:raw sape.. - for each template, if you have more than one!

For those who have a forum on a subdomain:
replace

define('_SAPE_USER', 'your_code');
require_once($_SERVER['DOCUMENT_ROOT'].'/forum/'._SAPE_USER.'/sape.php '); 

on

define('_SAPE_USER', 'your_code');
require_once($_SERVER['DOCUMENT_ROOT'].'/'._SAPE_USER.'/sape.php ');  


Installation is complete!





Go back
17-11-2022, 15:14