PDA

View Full Version : Solved Photoplog issue



moman
03-10-10, 03:22
I followed the integration guide (added to the htaccess file) for my photoplog installation, but I can't get translations to work.

The gallery is in /gallery, while the forum is in /forums, so it's outside the forum directory. Anything else I need to do to get it to work?

moman
03-10-10, 04:04
Photoplog htaccess:


RewriteEngine On

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

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

RewriteCond %{QUERY_STRING} !vbet_outside=true
RewriteRule ^(.*)$ $1?vbet_outside=true [L,QSA]

Root htaccess:


Options All -Indexes
Options +FollowSymLinks

ErrorDocument 404 http://www.pentaxforums.com/404.php

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 [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)/$ index.php?language=$1&vbet_outside=true [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&vbet_outside=true [L,QSA]

vBET
03-10-10, 17:40
You didn't fallow instructions exactly. Instructions says that before rule cannot be any other rules ending with [L] and in such case [L] have to be removed. You have it in rule for vbseo, so vBET rule never takes place (L means last).

Please try this:


RewriteEngine On

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

RewriteCond %{QUERY_STRING} !vbet_outside=true
RewriteRule ^(.*)$ $1?vbet_outside=true [QSA]

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


This isn't exactly how it should be according to instructions. And it was not tested (only you can test it) - so please make copy before changes. If it will not work please try this:


RewriteEngine On

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

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

RewriteCond %{QUERY_STRING} !vbet_outside=true
RewriteRule ^(.*)$ $1?vbet_outside=true [L,QSA]

This one is according to instructions, but because of vbseo before I think that you should go first with first proposition.

moman
04-10-10, 15:21
gallery/pl/ is still 404ing, while /gallery/?language=pl isn't redirecting properly :(

moman
07-11-10, 06:14
Any ideas? I'd really like to get this to work. With all the other vBET bugs resolved, getting this to work would just be perfect!

To recap:

The forums are in ./forums
The photoplog installation is at ./gallery

My .htaccess files are posted in the first posts; your suggestions didn't work :(

vBET
08-11-10, 12:52
I'm just checking it - will answer you soon :)

vBET
08-11-10, 12:58
gallery/pl/ is still 404ing, while /gallery/?language=pl isn't redirecting properly :(

How did you got gallery/pl/ address? Is it generated by vBET? It should be /pl/gallery
Please give me exact URL which is under one of vBET flags.

moman
08-11-10, 19:15
Oops- I meant /pl/gallery/.

I guess that this might be caused by some of the homepage rewrite rules. Take a close look at the root htaccess, and see if it maybe conflicts with what we want.

Here's the url that should work: pl/gallery/ - Pentax News & Rumors - PentaxForums.com (http://www.pentaxforums.com/pl/gallery/)

vBET
08-11-10, 20:14
Perhups you have right. Please check this one for your main .htaccess


Options All -Indexes
Options +FollowSymLinks

ErrorDocument 404 http://www.pentaxforums.com/404.php

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


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&vbet_outside=true [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&vbet_outside=true [L,QSA]

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

moman
08-11-10, 20:23
I am making the edits now. Here are the old htaccess files


Options All -Indexes
Options +FollowSymLinks

ErrorDocument 404 http://www.pentaxforums.com/404.php

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 [QSA]



RewriteEngine On

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

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

RewriteCond %{QUERY_STRING} !vbet_outside=true
RewriteRule ^(.*)$ $1?vbet_outside=true [L,QSA]

moman
08-11-10, 20:27
New .htaccess seems to simply 301 /pl/gallery to /gallery.

I'm currently using your new root htaccess file, and have tried it with both of the gallery files you posted above. I left the latter of the two in there.

moman
09-11-10, 19:22
I put in this gallery htaccess, and the urls work now. However, no translations are actually carried out on the page. Any ideas?


RewriteEngine On

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

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

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&vbet_outside=true [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&vbet_outside=true [L,QSA]

I know that photoplog is fairly tightly integrated with vbulletin, but it might use it's own global_complete hook instead of vB's. Any ideas?

vBET
10-11-10, 17:14
Here you have instructions for integration: http://www.vbenterprisetranslator.com/forum/vbet-integration-other-plugins/489-vbet-integration-instructions.html
THere is described how to integrate with mods which doens't support global_complete hook. In example PhotoPost doesn't - I do not know how it is in case of Photoploq

Anyway I checked this URL: pl/gallery/ - Pentax News & Rumors - PentaxForums.com (http://www.pentaxforums.com/pl/gallery/) and it still doesn't work... You wrote that it is fine now, but as I see it isn't...
As I see changes you made are wrong. There is no instruction which describes to set rules with language codes inside of plugin directory.

Please try this set.
For main .htaccess:


Options All -Indexes
Options +FollowSymLinks

ErrorDocument 404 http://www.pentaxforums.com/404.php

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


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&vbet_outside=true [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&vbet_outside=true [QSA]

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


For gallery .htaccess:


RewriteEngine On

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

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

RewriteCond %{QUERY_STRING} !vbet_outside=true
RewriteRule ^(.*)$ $1?vbet_outside=true [L,QSA]


Or for for gallery .htaccess (not according to instructions - try it later):


RewriteEngine On

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

RewriteCond %{QUERY_STRING} !vbet_outside=true
RewriteRule ^(.*)$ $1?vbet_outside=true [QSA]

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


Please note that this doesn't cover case when global_complete is not supported, but first let just make translation links working appropriately and then check what is going on with translation.

Plrase try it with booth versions for gallery .htaccess. If still not working you can try also this for main .htaccess (with booth versions for gallery .htaccess):


Options All -Indexes
Options +FollowSymLinks

ErrorDocument 404 http://www.pentaxforums.com/404.php

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


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&vbet_outside=true [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&vbet_outside=true [L,QSA]

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


This is also modification because of your rule which maps everthing on index.php - I think that this is the reason why it doesn't work right now.

moman
10-11-10, 19:39
My htaccess file was actually incorrect (broke other folder paths), so I took it down.

Thanks for the suggestions- I'll try those shortly.

However, shouldn't the gallery path be /gallery/pl/ rather than /pl/gallery/? The forum structure is similar: /forums/pl/ rather than /pl/forums/

moman
13-11-10, 20:53
Looks like the second root htaccess works along with the first gallery htaccess!

Try Nature - Pentax User Photo Gallery (http://www.pentaxforums.com/da/gallery/nature/)

It 301's to the regular page, but I guess that's progress. Now we need to figure out how to get URL tracking and the actual translation to work. The 301 might be due to a vbseo 301, but assuming that'll be fixed, what are the next steps?

vBET
14-11-10, 05:00
My htaccess file was actually incorrect (broke other folder paths), so I took it down.

Thanks for the suggestions- I'll try those shortly.

However, shouldn't the gallery path be /gallery/pl/ rather than /pl/gallery/? The forum structure is similar: /forums/pl/ rather than /pl/forums/

Gallery is not in the forum that is why it have different URL structure.

vBET
14-11-10, 05:27
Looks like the second root htaccess works along with the first gallery htaccess!

Try Nature - Pentax User Photo Gallery (http://www.pentaxforums.com/da/gallery/nature/)

It 301's to the regular page, but I guess that's progress. Now we need to figure out how to get URL tracking and the actual translation to work. The 301 might be due to a vbseo 301, but assuming that'll be fixed, what are the next steps?

Yes I see this 301 redirect. It shouldn't happen and yes it is possible that it is made by vBSEO. First please make sure that you have turned on URL tracking outside forum directory in options in Admin CP
If still have redirect then please check how it will work with 2nd .htaccess for gallery.
If still have redirect please for a moment comment in gallery .htaccess rule to vBSEO and check does 301 still occurs there - we want to confirm does it is vBSEO fault. Also if it doesn't redirect then please tell does page is translated or not (we want also confirm does hook global_complete is used in your mod)

moman
14-11-10, 07:27
I will go ahead and check now. I'm pretty sure photoplog uses its own photoplog_global_complete hook, so we might have to add some function calls manually. I'll post an update on this shortly.

moman
14-11-10, 20:24
Still redirecting after I removed by custom redirects. What should our next step be?

vBET
23-11-10, 19:52
First of all - sorry for late answer. I miss your post and Mateusz just remind me about it.

Please PM access details for your Admin CP + FTP - we need to check it on your side. This redirect shouldn’t happen and with it we cannot determine what should be next step. In other words - next step is make this redirect disappears.

mateuszr
13-12-10, 10:34
Due to lack of answer, this thread is solved for now.
If you want to back it again to the life, just make a new post here, if issue still occurs.

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Translations delivered by vBET 4.9.2