Important: This page is using cookies (cookies). Using this website without turning off cookies in browser, means that you agree for using it.
Buy Now! Features Downloads

Earn with us!

If you would like to start earning money with vBET join to Affiliate Program.
Results 1 to 10 of 10

Thread: Integrating with reviewpost (same as photopost)

  1. #1
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default Integrating with reviewpost (same as photopost)

    Hi,

    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:
    http://www.vbenterprisetranslator.co....html#post1795

    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:

    Code:
    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:

    Code:
    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?

  2. #2
    vBulletin Enterprise Translator (vBET) Staff
    Join Date
    May 2010
    Posts
    1,000

    Default

    hello

    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.

  3. #3
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    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.

  4. #4
    vBulletin Enterprise Translator (vBET) Staff
    Join Date
    May 2010
    Posts
    1,000

    Default

    please check this steps one more time:
    http://www.vbenterprisetranslator.co....html#post1795

    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.

    Thanks

  5. #5
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    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?

  6. #6
    vBulletin Enterprise Translator (vBET) Staff
    Join Date
    May 2010
    Posts
    1,000

    Default

    I am looking for solution for you. If you have any idea and informations, please write here - will be helpfully

  7. #7
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    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:

    Code:
    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:

    PHP Code:
    if(@include_once(DIR '/includes/vbenterprisetranslator_functions_hooks.php'))
    {
    vbet_global_complete($output);

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

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

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

    added the following function to URL generation:

    PHP Code:
    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

  8. #8
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    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?

  9. #9
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    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).

  10. #10
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •