PDA

View Full Version : Solved vBAdvanced CMPS issues



Smaug
24-09-10, 15:12
My forum lives in /forums/, my vBAdvanced is in the root of the domain.

I've added the global statements as directed in another post on your forum and I use "custom" placement for the flags and entered $vbenterprisetranslatorflags only once in my template. On my home page I see (I use an "if" statement so only admins see the flags) the squares for the flags put twice below the navbar. I do not see the flag pictures even though I put copies of them in /images/vbet/flags.

When the flag squares are clicked, the site translates however I get sent to /forums/ but would like the user to stay on the home page when they click a flag. I run NginX and here are my current rewrites for your product. I do not use the SEO option in vbet settings.

# Start translation

location ~* /forums/.*\.(jpg|jpeg|gif|css|png|js) {
root /var/www/htdocs/wizard;
}

location /forums/ {
root /xxx/www/htdocs/wizard;

rewrite ^/forums/(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)/$ /forums/vbenterprisetranslator_seo.php?vbet_lang=$1 last;
rewrite ^/forums/(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)/(.*)?$ /forums/vbenterprisetranslator_seo.php?vbet_lang=$1 last;

if (!-e $request_filename) {
rewrite ^/forums/(.*)$ /forums/vbenterprisetranslator_seo.php last;
}

fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /xxx/www/htdocs/wizard$fastcgi_script_name;
include fastcgi_params;

# Resolve some FastCGI errors, with more tolerant buffers and timeouts
fastcgi_connect_timeout 120;
fastcgi_send_timeout 60;
fastcgi_read_timeout 120;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;

}

# Stop translation

1. Why a double set of flags?
2. If I have the images in the correct path, what would stop them from displaying?
3. Do you know what I would need to add to my nginx cfg file to allow a user to click a flag on my home page and not get sent to the forums?

Thank you

vBET
24-09-10, 15:51
It is hard to imagine what you are describing. Can you create test account for us, using which we will be able to see that you describe? Please PM access details.

If you are using vBS dynamics - then you need to use also this mod: http://www.vbenterprisetranslator.com/forum/vbet-integration-other-plugins/99-vbadvanced-dynamics-integration.html

Also I do not know which post you are writing about:

I've added the global statements as directed in another post
So please give exact URL so we will know which hits you fallowed.

To integrate translation of content outside forum directory you have to fallow this instructions: http://www.vbenterprisetranslator.com/forum/troubleshooting/6-faq-2.html#post54

Those was general information. Now answering your exact questions:
1. Do not know now. Need to see html output for hints. Also - what changes you made in templates? And are you sure that flags place is set as custom?
2. Probably lack of styles. Please note that vBET is using now 1 image for all flags and display those using css spite. It would be good If I will be able to see what you are writing about, it could help to find source of issue. Now I need to guess.
3. Yes. See here: http://www.vbenterprisetranslator.com/forum/troubleshooting/6-faq-2.html#post54 just adopt rules for nginx

Smaug
24-09-10, 16:20
It is hard to imagine what you are describing. Can you create test account for us, using which we will be able to see that you describe? Please PM access details.

I am all set with the duplicate flags issues. Silly mistake on my part.



To integrate translation of content outside forum directory you have to fallow this instructions: http://www.vbenterprisetranslator.com/forum/troubleshooting/6-faq-2.html#post54

I am aware of that post, however I am running NGinX which does not use .htaccess. I included my rewrite section for your mod in my original post. What do I need to add or change?



Those was general information. Now answering your exact questions:
1. Do not know now. Need to see html output for hints. Also - what changes you made in templates? And are you sure that flags place is set as custom?


It's a non issue now.



2. Probably lack of styles. Please note that vBET is using now 1 image for all flags and display those using css spite. It would be good If I will be able to see what you are writing about, it could help to find source of issue. Now I need to guess.

I will look at the stylesheet in the flags dir


3. Yes. See here: http://www.vbenterprisetranslator.com/forum/troubleshooting/6-faq-2.html#post54 just adopt rules for nginx
You told me in pre-sales that you already have.


Thank you for your time

vBET
24-09-10, 18:22
Yes - we already have rules for vBET and NGinX - you can find it in vBET package do-no-upload/tools/redirecting-rules/nginx.txt. Still rules for specific integrations are ready in .htaccess form. It is easy to adopt those.

So those .htaccess rules:


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]


Adopts to those:


rewrite ^/?(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 last;
rewrite ^/?(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 last;


This:


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

to this:


if (!($query_string ~* 'vbet_outside=true')){
rewrite ^(.*)$ $1?vbet_outside=true last;
}


Please note that those were not tested. It is advised to backup your rules before changes, so in case of issues you will be able to undo the changes.

Smaug
24-09-10, 18:36
Thank you, I will give it a shot.

vBET
24-09-10, 18:41
Please give feedback. We will work on it till done :) Also please remember that you also have to change vBET configuration. See carefully on instructions http://www.vbenterprisetranslator.com/forum/troubleshooting/6-faq-2.html#post54

Smaug
25-09-10, 19:10
Please give feedback. We will work on it till done :) Also please remember that you also have to change vBET configuration. See carefully on instructions http://www.vbenterprisetranslator.com/forum/troubleshooting/6-faq-2.html#post54

I must be adding the rules incorrectly for nginx and vbacmps. I tried to follow your directions for the rules you sent me, but I just keep killing the site.

My only issue is the url the flags show on the CMPS homepage.

"http://www.***********.com/forums/?language=fr"

On the forums the link looks like:

"http://www.***********.com/forums/index.php?language=fr"

Like I said, they both work, however the cmps flag links redirect the user to the forums, I would like them to stay on the page they clicked the flag on.

Thank you for your help

Edit

This is the error I get when trying to use the rules mentioned above:

[root@smaug ~]# /etc/init.d/nginx reload
[emerg]: invalid condition "!($query_string" in /usr/local/nginx/conf/nginx.conf:103
configuration file /usr/local/nginx/conf/nginx.conf test failed

Smaug
26-09-10, 20:21
25 hour bump

vBET
27-09-10, 07:40
Did you set in vBET option to track translations outside forum folder?

Also if it is set and still going back to forum, then something is wrong with additional rules (vbet_outside=true is not added). Please note that we are experts in .htaccess configuration, but will find also solution here. I need some additional info - please tell are you using only one rewrite configuration, or it is split like it should be in case of .htaccess? If it is not split, then additional rules will have to be modified, so NGinX will know which directory those rules are about (.htaccess works contextually - for directory in which it exists).

Smaug
27-09-10, 15:58
Did you set in vBET option to track translations outside forum folder?

Also if it is set and still going back to forum, then something is wrong with additional rules (vbet_outside=true is not added). Please note that we are experts in .htaccess configuration, but will find also solution here. I need some additional info - please tell are you using only one rewrite configuration, or it is split like it should be in case of .htaccess? If it is not split, then additional rules will have to be modified, so NGinX will know which directory those rules are about (.htaccess works contextually - for directory in which it exists).

Yes, it's set in options and split here as it needs to be. Here is the code block with a changed query_string that nginx allows, however I get an internal server error when this is uncommented.


location / {
root /var/www/htdocs/wizard;
index index.php index.html index.htm;

# Translate for root
# rewrite ^/?(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 last;
# rewrite ^/?(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 last;
#
# if ($query_string !~* 'vbet_outside=true') {
# rewrite ^(.*)$ $1?vbet_outside=true last;
# }
# Translate for root
}

Smaug
28-09-10, 22:26
Help please? Thanks

vBET
29-09-10, 18:37
I need to analyze it again. I will let you know when I find something.

Smaug
29-09-10, 19:01
I need to analyze it again. I will let you know when I find something.

NVM on this, I paid someone to fix it.

vBET
29-09-10, 19:19
Was it some typo in rule?

Smaug
30-09-10, 02:09
Was it some typo in rule?

No, you gave the wrong syntax for the query_string directive.

On a different but similar issue, I have mediawiki integrated with the site logins, I would like the translation to carry over.

Would I just apply the same logic I used for CMPS?

Thank you

vBET
30-09-10, 13:50
If it's using URL's outside forum directory, then yes.

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Languages translations supported by vBET 4.10.1