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.
Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: vBGallery integration problems.

  1. #1
    Senior Member
    Join Date
    May 2010
    Posts
    257

    Default vBGallery integration problems.

    I followed the integration options here:

    http://www.vbenterprisetranslator.co....html#post1787

    This is my Custom Rewrite Rules:

    Code:
    'gallery/index\.php$' => 'gallery/'
    'browseimages\.php\?do=favorites$' => 'favorites.html'
    'browseimages\.php\?do=subscriptions$' => 'subscriptions.html'
    'browseimages\.php\?do=member&imageuser=(\d+)$' => 'imageuser-$1.html'
    'browseimages\.php\?c=(\d+)$' => 'browse-$1.html'
    'browseimages\.php\?c=(\d+)&page=(\d+)$' => 'browse-$1-$2.html'
    'browseimages\.php\?c=(\d+)&userid=$' => 'browse-$1-albums.html'
    'browseimages\.php\?c=(\d+)&userid=(\d+)$' => 'browse-$1-user$2.html'
    'browseimages\.php\?c=(\d+)&u=(\d+)$' => 'browse-$1-user$2.html'
    'browseimages\.php\?do=popimages$' => 'top.html'
    'browseimages\.php\?do=popimages&orderby=views' => 'topviews.html'
    'browseimages\.php\?do=popimages&orderby=rating' => 'toprated.html'
    'browseimages\.php\?do=popimages&orderby=posts' => 'toppost.html'
    'showimage\.php\?i=(\d+)&noignore=0&postid=(\d+)$' => 'image-$1-$2.html'
    'showimage\.php\?i=(\d+)&original=1.*$' => 'image-$1big.html'
    'showimage\.php\?i=(\d+).*$' => 'image-$1.html'
    Everything works great in default language.

    I added the integration into my main .htaccess file:
    Code:
    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.
    RewriteEngine On
    
    # Some servers require the Rewritebase directive to be
    # enabled (remove '#' at the beginning to activate)
    # Please note: when enabled, you must include the path
    # to your root vB folder (i.e. RewriteBase /forums/)
    #RewriteBase /
    
    RewriteCond %{HTTP_HOST} !^windows8theme\.org$
    RewriteRule ^(.*)$ http://windows8theme.org/$1 [L,R=301]
    
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)
    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)/gallery/(.*)?$ /gallery/$2?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)/$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/ [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)/(.*)?$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/$2 [L,QSA]
    
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|vbseo_sitemap/|cron)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbenterprisetranslator_seo.php [L,QSA]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule $ vbenterprisetranslator_seo.php [L,QSA]
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]
    
    # MONTH
    <FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|swf)$">
       Header set Cache-Control "max-age=2592000"
    </FilesMatch>
    
    # WEEK
    <FilesMatch "\.(js|css|pdf|txt)$">
       Header set Cache-Control "max-age=604800"
    </FilesMatch>
    
    # DAY
    <FilesMatch "\.(html|htm)$">
       Header set Cache-Control "max-age=43200"
    </FilesMatch>
    And this for my .htaccess in my gallery directory:

    Code:
    RewriteEngine On
    
    RewriteCond %{QUERY_STRING} !vbseourl=
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$  /vbseo.php?vbseourl=$1&vbseorelpath=./gallery/&%{QUERY_STRING} [QSA]
    RewriteCond %{REQUEST_FILENAME} !/
    RewriteRule ^(.*\.php)$ /vbseo.php?vbseourl=$1&vbseorelpath=./gallery/&%{QUERY_STRING} [QSA]
    
    RewriteCond %{QUERY_STRING} !redirected=
    RewriteCond %{QUERY_STRING} language=
    RewriteRule ^(.*)$ vbenterprisetranslator_front_controller.php?redirected=$1&vbet_outside=true [L,QSA]
    
    RewriteCond %{QUERY_STRING} !vbet_outside=true
    RewriteRule ^(.*)$ $1?vbet_outside=true [L,QSA]
    However, whenever I attempt to translate any page inside the gallery, I get this on my browser:



    Please help. Thanks.

  2. #2
    Senior Member
    Join Date
    May 2010
    Posts
    257

    Default

    When I am on an image page within vBGallery, and I click a flag to change the language, I get this:

    Warning: include(/home/windows/public_html/gallery//vbseo.php) [function.include]: failed to open stream: No such file or directory in /home/windows/public_html/gallery/vbenterprisetranslator_front_controller.php on line 35

    Warning: include() [function.include]: Failed opening '/home/windows/public_html/gallery//vbseo.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/windows/public_html/gallery/vbenterprisetranslator_front_controller.php on line 35

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

    Default

    Looks like some rules are broken. I see double / in file path, also vbseo.php file is looked in gallery directory what is obviously wrong.

    This is because you mixed normal .htaccess rules with internal vbseo rules. And inside of gallery folder your rules are not relative (like usually is) but absolute.

    So possible solutions:
    1. Quit vbseo redirections and do it all in .htaccess - this will be better for your performance and this is tested way to integrate vBET with mod having it's own directory.
    2. Edit vBET front controller.

    For 2nd solutions please (not tested):
    1. Open file /gallery/vbenterprisetranslator_front_controller.php
    2. Replace each dirname(__FILE__) (there are 2 of those) with VBET_FORUMDIR

    Please give us your feedback.

  4. #4
    Senior Member
    Join Date
    May 2010
    Posts
    257

    Default

    I tried the second solution, but got this:


    Warning: include(/home/windows/index.php) [function.include]: failed to open stream: No such file or directory in /home/windows/public_html/gallery/vbenterprisetranslator_front_controller.php on line 35

    Warning: include() [function.include]: Failed opening '/home/windows/index.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/windows/public_html/gallery/vbenterprisetranslator_front_controller.php on line 35

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

    Default

    You replaced SET_HERE_FULL_FORUM_DIRECTORY_PATH to wrong value in front controller. Please set it appropriately. This is first line of front controller code:
    PHP Code:
    define('VBET_FORUMDIR''SET_HERE_FULL_FORUM_DIRECTORY_PATH'); 
    You can find appropriate value by using actualdirectory.php script from tools directory. All details are included in instructions under the link you gave in first post.

  6. #6
    Senior Member
    Join Date
    May 2010
    Posts
    257

    Default

    Quote Originally Posted by vBET View Post
    You replaced SET_HERE_FULL_FORUM_DIRECTORY_PATH to wrong value in front controller. Please set it appropriately. This is first line of front controller code:
    PHP Code:
    define('VBET_FORUMDIR''SET_HERE_FULL_FORUM_DIRECTORY_PATH'); 
    You can find appropriate value by using actualdirectory.php script from tools directory. All details are included in instructions under the link you gave in first post.
    This is what it is replaced with:

    /home/windows/public_html

    exactly as I got it from the actualdirectory.php

    Or should it be for the gallery directory?
    Last edited by Taurus; 11-07-11 at 14:50.

  7. #7
    Senior Member
    Join Date
    May 2010
    Posts
    257

    Default

    When I change it to:

    /home/windows/public_html/gallery

    Then I get this:


    Warning: require_once(/home/windows/public_html/gallery/includes/vbenterprisetranslator_functions.php) [function.require-once]: failed to open stream: No such file or directory in /home/windows/public_html/gallery/vbenterprisetranslator_front_controller.php on line 29

    Fatal error: require_once() [function.require]: Failed opening required '/home/windows/public_html/gallery/includes/vbenterprisetranslator_functions.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/windows/public_html/gallery/vbenterprisetranslator_front_controller.php on line 29
    Last edited by Taurus; 11-07-11 at 14:50.

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

    Default

    Quote Originally Posted by Taurus View Post
    This is what it is replaced with:

    /home/windows/public_html

    exactly as I got it from the actualdirectory.php

    Or should it be for the gallery directory?
    So this is appropriate value - just as instructions says - value from actualdirectory.php - nothing else.

    I do not understand why your errors says that index.php was looked in /home/windows not in /home/windows/public_html
    If you made changes as was described then it should be looked in /home/windows/public_html - please PM me access details to your FTP - I will check what exactly do you have in your files right now.
    Last edited by vBET; 12-07-11 at 15:44.

  9. #9
    Senior Member
    Join Date
    May 2010
    Posts
    257

    Default

    Details PM'd. Thanks.

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

    Default

    Thanks for access. First thing I saw is wrong - you suppose to replace dirname(__FILE__) to VBET_FORUMDIR as was described in one of my previous posts. But instead you replaced it to dirname(VBET_FORUMDIR). Please correct this and check is it working.

    Also as I see your rules in gallery .htaccess are to /vbseo.php - as I wrote before usually rules in directory are relative not absolute. This can also be an issue, because vBET already adds to path '/'. So if after correcting, it is still not working then please try to replace (in 2 places):
    PHP Code:
    .'/'.$_GET['redirected'
    to:
    PHP Code:
    .$_GET['redirected'
    But do it only if it will be necessary - so if doube // will be wrong for your system. So do it if you will see errors like:
    Code:
    Warning: include(/home/windows/public_html//vbseo.php) ...
    Please tell did it help.

Page 1 of 3 123 LastLast

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
  •