View Full Version : Solved Integrating with reviewpost (same as photopost)

18-03-11, 07:49

I am trying to integrate vbet with reviewpost. First, I tried simply doing a vBetTranslatePage call on the page output, but that didn't work due to redirection.

I then followed the instructions here, step by step:

However, I'm still getting the redirection errors. I've tried this before for photoplog and also wasn't successful. Since my htaccess modifications failed, could you give me some pointers?

Root htaccess:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.pentaxforums\.com
RewriteRule (.*) http://www.pentaxforums.com/$1 [R=301,L]

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{Script_FILENAME} !-f
RewriteRule ^(.*)$ index.php?a=$1 [L]

reviewpost htaccess:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.pentaxforums\.com
RewriteRule (.*) http://www.pentaxforums.com/lensreviews/$1 [L,R=301]

RewriteCond %{QUERY_STRING} !vbseourl=
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /forums/vbseo.php?vbseourl=$1&vbseorelpath=../lensreviews/&%{QUERY_STRING} [L]

I tried putting the htaccess additions both before and after the vbseo rule, but it had no effect. Any ideas?

21-03-11, 22:37

are you sure that this mod use a global_complete and global_start hook?

You can give me an url to the page with this mod and I can install it on my test forum and check.

30-03-11, 19:35
No, it omits the vbulletin hook system entirely and essentially only parses header, headinclude, and footer, then does its own thing.

When I tried doing a manual call to translate the page or followed the front_controller integration instructions, the page just started redirecting infinitely.

The mod is found at reviewpost.com. The majority of the codebase/design is based on photopost pro.

03-04-11, 09:58
please check this steps one more time:

secondly, please give me an url to your page with this mod. I will check it.
Is this mod free or not? if free - please give an url to the pack of this mod.


05-04-11, 08:12
No, it's not free, but design-wise it uses the same backend as photopost.

I checked again and it looks like I will need to alter the root htaccess as well. Keep in mind that I've tried all of this before to no avail- but I will try again once I have some more free time.

Any other common issues with photopost integration you may know of?

06-04-11, 19:12
I am looking for solution for you. If you have any idea and informations, please write here - will be helpfully

09-07-11, 00:09
Ok, I have finally figured this one out. I deviated a bit from the posted instructions, but it worked like a charm:

1. Added this to htaccess:

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)/$ index.php?language=$1 [L,QSA]
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)/(.*)?$ $2?language=$1 [L,QSA]

2. Added this function call to the end of reviewpost execution:

if(@include_once(DIR . '/includes/vbenterprisetranslator_functions_hooks.php'))

3. edited vbenterprisetranslator_functions_redirect.php and disabled redirection for custom directory:

foreach (explode("\n",$vbulletin->options['vbet_outside_dirs']) AS $folder)
$folder = trim($folder);
if (stripos($url, $folder) !== false)


4. to change /da/lensreviews/ to /lensreviews/da/, and to fix flag URLs

added the following function to URL generation:

function vbet_externalConsensus($address, $language)
global $vbulletin;
foreach (explode("\n",$vbulletin->options['vbet_outside_dirs']) AS $folder)
$folder = trim($folder);
if (stripos($address, $folder) !== false)
$address = str_replace(array('/forums/',"/{$_REQUEST['language']}/"),array('/','/'), $address);
return str_replace("/$folder/","/$folder/$language/", $address);

return false;

There is probably a more clever way to do #4, but this worked! I'm very happy, as the review sections get almost 1,000,000 pageviews a month, and translations will drive even more visitors.

Demo: Pentax Anmeldelser - Pentax Lens Anmeldelser og omfattende database (http://www.pentaxforums.com/lensreviews/da/)

09-07-11, 21:39
You answered after long time period for thread which was marked as solved. I didn't realize that the issue was still on. Do you need any more help here or it is finally solved? :)

10-07-11, 21:26
I've finally figured it out! But it might be worth it to make this type of integration easier in future versions of vbet, as I tried all the .htaccess modifications in the FAQ and it did not work.

Currently, in forum threads your URL is /forums/{language code}/content. For folders outside the main directory, the same should apply (i.e. /gallery/{language code}/ instead of /{langauge code}/gallery/) because it will simplify the required htaccess modifications greatly and make integration much easier, especially when the mod already calls global_complete (in this case I am referring to photoplog pro).

11-07-11, 01:57
Please open new feature request for that :) I see how it will make such integration easier - it wouldn't require changes in main .htaccess file - only in the one from mod directory.

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
vBET 4.9.99 brings automatic translations