PDA

View Full Version : vaultwiki integration



vBET
02-06-11, 22:37
This is special integration case only for vaultwiki. This is needed only because vaultwiki is not compatible to vBulletin in area of BBCodes and changes the API adding new parameter to BBCode parser functions. This is why normal integration with parsers for vBulletin is not working and gives warnings:


Warning: Missing argument 2 for vB_WikiCodeParser::handle_bbcode_code(), called in /includes/vbenterprisetranslator_functions_bbcode.php on line 25 and defined in /vault/class/bbcode.php on line 1488

Warning: Missing argument 2 for vB_WikiCodeParser::handle_bbcode_html(), called in /includes/vbenterprisetranslator_functions_bbcode.php on line 28 and defined in /vault/class/bbcode.php on line 1506

Warning: Missing argument 2 for vB_WikiCodeParser::handle_bbcode_php(), called in /includes/vbenterprisetranslator_functions_bbcode.php on line 22 and defined in /vault/class/bbcode.php on line 1470

To solve the issue you have to do few simple steps. You will have to repeat it after each vBET update.

Integration steps:
1. Open /includes/vbenterprisetranslator_functions_bbcode.php
2. Find:

function vbet_handle_bbcode_php(&$parser, &$value) {
3. Add AFTER:

if($parser instanceof vB_WikiCodeParser) {
return '<!--vBET_SNTA-->' . $parser->handle_bbcode_php(0, $value) .'<!--vBET_ENTA-->';
}
4. Find:

function vbet_handle_bbcode_code(&$parser, &$value) {
5. Add AFTER:

if($parser instanceof vB_WikiCodeParser) {
return '<!--vBET_SNTA-->' . $parser->handle_bbcode_code(0,$value) .'<!--vBET_ENTA-->';
}
6. Find:

function vbet_handle_bbcode_html(&$parser, &$value) {
7. Add AFTER:

if($parser instanceof vB_WikiCodeParser) {
return '<!--vBET_SNTA-->' . $parser->handle_bbcode_html(0,$value) .'<!--vBET_ENTA-->';
}

Next steps are OPTIONAL - use it only if you are using virtual directory which is redirected by .htaccess to showwiki_proxy.php file and only when you are using vBET SEO links:
1. Open file showwiki_proxy.php
2. Find:

define('VAULT_FRIENDLY_ENTRY', 1);
3. Add AFTER:

if ($_REQUEST['language']) {
$_SERVER['REQUEST_URI'] = str_replace('/'.$_REQUEST['language'].'/', '/', $_SERVER['REQUEST_URI']);
}
4. Open .htaccess file
5. BEFORE wiki rules add this rule:

RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/YOUR_WIKI_DIRECTORY(.*)?$ YOUR_WIKI_DIRECTORY$2?language=$1 [QSA]

6. Change in the rule YOUR_WIKI_DIRECTORY to your virtual wiki directory (in booth places)

basketmen
09-01-12, 17:40
I just upgraded vbet from 3.3.6, to 3.5.3


after that, suddenly i cannot create new page in vaultwiki, get this error message after clicking 'Post New Article' button :


Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 131072 bytes) in /home/username/public_html/vault/class/revision.php on line 33

Nb.
- I cant create vaultwiki new page and get above error message, but i am still can editing vaultwiki message with no problem
- If i disabled vbenterprisetranslator product, i can create new page in vaultwiki again
- i already tried add this line in vault/class/revision.php file, after the beginning <?php, but still same :
ini_set('memory_limit','1024M');
- I am using vaultwiki 3.0.13
- I already create a thread in vaultwiki forum too https://www.vaultwiki.org/threads/5265/ , if they can help or give clue from they side, so now i am asking if there is some hotfix from vbet side first about this. This can help other member that using vbenterprisetranslator mod with vaultwiki too






regrads
richie

r.dziadusz
09-01-12, 23:27
Have you tried to increase you memory limit to whole your server, just make this setting global?

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Translations by vBET Translator PRODUCER_PRODUCT_VERSION