PDA

View Full Version : Solved Additional langtitle parsing issue



moman
22-05-10, 23:46
Using vbSEO. Screenshot attached.

http://www.pentaxforums.com/forums/members/adam-albums-website-news-screenshots-picture5413-a.gif

I will find a fix for this in the vBSEO function that handles this.

moman
23-05-10, 01:27
In functions_vbseo_vb.php:

find


vbseo_thread_seotitle($getnextoldest);

replace


vbseo_thread_seotitle($getnextoldest);
if (strpos($getnextoldest['title'], '[/langtitle]')) {
require_once('vbenterprisetranslator_functions_bbcode.php');
$getnextoldest['title'] = vbet_parseTitle($getnextoldest['title']);
}
$vbseo_gcache['thread'][$getnextoldest['threadid']] = $getnextoldest;

vBET
23-05-10, 17:36
This should be not necessary. Did you integrated vBET with vBSEO like it is described in readme.html file? Which version of vBET are you using? Last one have global langtitle parsing functionality.

moman
24-05-10, 04:08
Yes and I'm using the latest version, 3.3.3.

vBET
24-05-10, 19:30
Strange. Please tell us how to reproduce the issue - we will work on more elegant solution which will not require additional vBSEO files change.

Can you reproduce it on out server? I.e. in test messages area?

moman
25-05-10, 19:22
No, this cannot be demonstrated here, because you don't use the vBSEO option to include thread titles in next/previous links (those shown directly below the quick reply editor). You'd first need to enable the option.

vBET
25-05-10, 21:01
OK so - we know now how to reproduce it. We will check it on our test instance and seek for other solution. Great thanks! :)

kamilkurczak
01-06-10, 22:00
Sorry, but we can't reproduce this problem.
We tested it on 3.5.0 vBSEO and 3.3.3 vBET. Which versions do you have?

Please make sure you have installed the latest version vbet (if you used it)

what about update product_vbenterprisetranslator.xml from do-not-upload folder?

moman
02-06-10, 09:43
I'm using vBET 3.3.3 and vBSEO 3.3.2. My langtitle tags aren't being parsed in the profile statistics page either now, it seems. Quite strange!

moman
02-06-10, 10:09
To fix the parsing of langtitle under the profile "statistics" tab (where it says "last post: ..."), I made this change in class_userprofile.php:

Find:

$this->prepared['lastposttitle'] = $getlastpost['title'];

Replace:


$this->prepared['lastposttitle'] = $getlastpost['title'];
if (strpos($this->prepared['lastposttitle'], '[/langtitle]'))
{
require_once('vbenterprisetranslator_functions_bbcode.php');
$this->prepared['lastposttitle'] = vbet_parseTitle($this->prepared['lastposttitle']);
}

There's no way the tags are being globally parsed, as otherwise this change wouldn't be needed. There are also no hooks in that class file.

vBET
02-06-10, 11:53
Please PM access details to FTP, Admin CP and vBSEO CP. Since we are not able to reproduce it on our side we have to check it on our server.

Please undo your changes before you give us access details (we need to see the issue to diagnose it) - you can made copies of files to easily bring it back again.

As I wrote vBET 3.3.3 should parse langtitle globally, at this moment I'm not able to tell does it is some bug, conflict with other plugin, or wrong vBET update.

moman
03-06-10, 07:48
I'm traveling abroad this week, and will not be available to handle any backend website issues apart from those posted here on the forum.

Could you show me where in the code the tag is globally parsed? I can then take a look and let you know if I can see why it's missing certain areas.

vBET
03-06-10, 12:09
open file: /includes/vbenterprisetranslator_functions_hooks.php

and look for vbet_global_complete there is used function vbet_parseTitleGlobally (from /includes/vbenterprisetranslator_functions_bbcode.php)

moman
04-06-10, 03:07
Thanks! I will investigate this.

moman
09-06-10, 16:09
I've found a few more in the navbits on inlinemod.php and postings.php.

Can you reproduce this behavior on this site, i.e. when editing a translated thread?

http://img267.imageshack.us/img267/3663/96513903.gif

http://img121.imageshack.us/img121/6716/90955400.gif

vBET
09-06-10, 17:22
During edition it is OK to leave it. You need to see original text to be able to edit it. That is why parsing is disabled on edition page. It should work this way and it is harmful - Google and other visitors see approved text, not during edition :)

vBET
10-06-10, 15:37
Does the issue still exists? What it the status?

We are preparing for new release and want to solve all issues. If you found that it was some conflict - please confirm. If you cannot handle it - please PM access details, so we will be able to check it and in case of bug include solution in next release.

moman
13-06-10, 14:17
I've added the parsing manually to the locations listed in this thread. There are no more visible parsing problems.

moman
14-06-10, 14:54
Nevermind- found another: translated PM titles aren't parsed in the page titles on private.php

Fixed by adding a plugin at private_complete:


if (strpos($pagetitle, '[/langtitle]')) {
require_once(DIR. '/includes/vbenterprisetranslator_functions_bbcode.php');
$pagetitle = vbet_parseTitle($pagetitle);
}

moman
14-06-10, 16:09
And another:

http://img63.imageshack.us/img63/4445/26859648.gif

I couldn't find a way to fix this via plugins. Instead, I added this code to usercp.php:


if (strpos($reputation['title'], '[/langtitle]')) {

require_once(DIR. '/includes/vbenterprisetranslator_functions_bbcode.php');

$reputation['title'] = vbet_parseTitle($reputation['title']);

} Directly below



$reputation['timeline'] = vbdate($vbulletin->options['timeformat'], $reputation['dateline']);

$reputation['dateline'] = vbdate($vbulletin->options['dateformat'], $reputation['dateline']);

$reputation['reason'] = $bbcode_parser->parse($reputation['reason']);

vBET
14-06-10, 23:47
Nevermind- found another: translated PM titles aren't parsed in the page titles on private.php

Fixed by adding a plugin at private_complete:


if (strpos($pagetitle, '[/langtitle]')) {
require_once(DIR. '/includes/vbenterprisetranslator_functions_bbcode.php');
$pagetitle = vbet_parseTitle($pagetitle);
}


I really cannot reproduce this issue on our server. I suspect that you do not have installed appropriately vBET 3.3.3 - please check it. We had many times issue that our clients just uploaded new files and forgot to import new product file or the opposite. Did you checked does execution of function vbet_global_complete exist in described place? (http://www.vbenterprisetranslator.com/forum/bug-reporting/702-additional-langtitle-parsing-issue-2.html#post3137)

Also we are running our forums now on vBET 3.3.4 beta version, so it can be that bug exist in 3.3.3 and we already fixed it (do not remember that). Still -please confirm that your actual installation is OK - best made update to 3.3.3 again.

vBET
14-06-10, 23:50
And another:

http://img63.imageshack.us/img63/4445/26859648.gif

I couldn't find a way to fix this via plugins. Instead, I added this code to usercp.php:


if (strpos($reputation['title'], '[/langtitle]')) {

require_once(DIR. '/includes/vbenterprisetranslator_functions_bbcode.php');

$reputation['title'] = vbet_parseTitle($reputation['title']);

} Directly below



$reputation['timeline'] = vbdate($vbulletin->options['timeformat'], $reputation['dateline']);

$reputation['dateline'] = vbdate($vbulletin->options['dateformat'], $reputation['dateline']);

$reputation['reason'] = $bbcode_parser->parse($reputation['reason']);

If this page is using global_complete hook then it should be handled in vBET 3.3.3 - please see previous response about that. If global_complete is not used - then such file change will be necessary or you can add it to some hook if there exist some on this page.

moman
18-06-10, 15:52
My product file and all the PHP files are showing up as v3.3.3, as they should be. However, I have modified many files and have quite a few plugins installed on my forum, so it's somewhat likely that there may be a conflict.

I've noticed that the execution time on the global_complete hook is 1000. Shouldn't this be higher to avoid conflicting with other plugins?

moman
18-06-10, 15:56
I've confirmed the presence of the global parsing function. I very carefully upgraded to 3.3.3, so I doubt that file contents can be an issue here. However, I see no further bugs, so I think I'm good for the time-being.

I'm also happy to say that vBET's performance hit on my server is negligible, so I may not be upgrading past 3.3.3 due to the high number of customizations/working fixes I've implemented on my own. With 800 online, I've had server loads below 1.00, and with 1,200 online, they were around 3.00. Not bad for a dual hex-core Xeon server, I think!

vBET
18-06-10, 20:26
I think too! :)

So - getting back to the issue. vBET should handle automatically those cut langtitle (with ...) - we are not able to reproduce it on our forums and want to made new release soon. It would be great if we could find the reason of this and fix it if it is on our side. If you can PM access detail to your forum, or even your test instance where those things happen we could to that - we could fix it :)

At this moment without possibility to reproduce we even cannot be sure does it is really vBET bug (not some conflict with other mod or configuration issue). So we are in dead point now in this area. Once again - we would gladly solve this issue on your side if you will. There is possibility that new vBET release will be this weekend - would be great to close all issues before :)

vBET
05-07-10, 07:44
I found that we really had a bug there. Global langtitle parsing was inside of unnecessary condition so it not always was evaluated. This is already corrected and will be included in next release.

moman
04-08-10, 18:57
Could you please post a quick fix for that? I can't upgrade to 3.3.4 right now :(

I'm guessing that the unnecessary condition is the one below:

function vbet_parseTitleGlobally(&$title, $removeNotTranslateSection = false) {

if ($_GET['do'] != 'postthread' && $_GET['do'] != 'comment' && 0!==strpos($_GET['do'], 'edit') && 0!==strpos($_GET['do'], 'update')

&& strpos($title, '[langtitle=')) {

return vbet_parseTitleMultiple($title, $removeNotTranslateSection);

}

vBET
06-08-10, 09:07
What hold you with update?

I will look in out SVN to check what changes was made to solve the issue, but still - you will need last release first to be able to made quick fix if we publish it.

moman
06-08-10, 09:13
I've made several modifications to the code over time, and I've forgotten where and why. I don't want to be breaking things that already work!

vBET
06-08-10, 09:30
Please note that we are not responsible for code changed by our clients - we are simple not able to do that. If your changes was according to our quick fixes then you can be calm - those will be included in next release so everything will be OK. If you made some other code changes, then we advice to write some document which will guide you about your personal additional steps during updates - otherwise you will stay with old vBET version, because you o not know what and what for you changed.

Please note that I found what changes are necessary to solve this issue, but I cannot publish quik fix on forum (because it includes broken bbcode inside). So pelase ask about it by email (contact@vbenterprisetranslator.com) and I will send it to you there.

moman
06-08-10, 18:40
I agree- life would be easier if I had documented the changes. As far as I recall, they were all bug fixes, and not new features, etc.

E-mail sent! Thanks!

vBET
07-08-10, 10:46
Replied by email :)

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
vBET 4.10.1 supports automatic translations