http___www.vbenterprisetranslator.com_forum_ga_archive_t-233.html_1.xml
1.1 2.1 2.2 3.1 3.2 4.1 6.1 7.1 7.2 8.1 10.1 11.1 11.2 12.1 12.2 12.3 13.1 15.1 16.1 16.2 16.3 16.4 16.5 17.1 17.2 17.3 17.4 18.1 19.1 20.1 21.1 22.1 23.1 24.1 25.1 26.1 27.1 28.1 29.1 30.1 31.1 34.1 35.1 36.1 36.2 37.1 37.2 37.3 38.1 38.2 39.1
View Full Version : Solved If thread title is exceeded by insertion of langtitle things break I noticed that if someone posts a thread in another language that is just under the min characters for thread title, and the langtitle tags go over this limit, this screws up the display of the thread in forumdisplay, search results, and on the thread page itself. The same goes if a thread title is translated, someone replies to the thread, and 'Re:' sends the post title over its character limit. I can't show an example of this because I had to fix it on my forum. I'm sure if can be replicated here if you enter a title just under the thread title character limit that is translated from the default language. r.dziadusz Could you please show us a problem, because i can hardly understand when the problem appears The problem is when 'langtitle' is inserted into the thread title, it is not recognizing the thread title character limit. If the tag gets cut off and isn't closed properly, it breaks the page where the title appears. r.dziadusz Ok, but i cannot reproduce this problem on my test forum, my [ langtitle] is never cut. Could you please send me detailed information about this problem. What is your langtitle lenght limit, and how long the tittle supposed to be(in what language) to break the line? my title length limit was 85, but I increased it to 100. So, for example, if the user inserted a title that was 95 characters, then then langtitle tags would send it over the limit. The system truncated the closing langtitle tag which results in breaking the layout. r.dziadusz Ok we were able to reproduce this problem, and now we are working on it I was able to reproduce it. It was really hard to reproduce and I made it accidentally working on something else. It was hard, because it is vBulletin bug. vBET uses vBulletin function vbchop, which suppose to cut string according to desired length in safe way (keeping in mind encoded characters). Unfortunately vBulletin has bug there and for messages which are encoded to safe UTF-8 (characters like &#CODE;) gives wrong results. We send bug report to vBulletin (vBulletin bug (http://tracker.vbulletin.com/browse/VBIV-13177)) and created quick fix on vBET side. So right now vBET detects if vbchop returned longer result and cuts it to desired one. Also we have simple detection to check does letter encoded in format &#CODE; was not cut in the middle and if yes, then last word is also cut (simply by finding last space). Please see quick fix below. Quick Fix: Open /includes/vbenterprisetranslator_functions_detection.php Find: $title = vbchop($title, $vbulletin->options['titlemaxchars'] - 12).'[/langtitle]'; Replace by: $desiredLength = $vbulletin->options['titlemaxchars'] - 12; $title = vbchop($title, $desiredLength); if (strlen($title) > $desiredLength) { $title = substr($title, 0, $desiredLength); $lastOpen = strrpos($title,'&'); $lastSpace = strrpos($title, ' '); $lastClose = strrpos($title,';'); if ($lastOpen!==false && $lastSpace!==false && $lastClose!==false && ($lastSpace   $lastClose)) { $title = substr($title, 0, $lastSpace); $title .= '[/langtitle]'; This will be included in next release. Please note that previous post was edited to provide more sophisticated quick fix (solving issue of cut in the middle letter in format &#CODE;). So if you already apply previous solution you can consider to use actual one, or just wait for new release :) Thanks Michal - I knew something was up. Does the quick fix also account for replies as well? Sometimes the 're:' sent it over the limit. We didn't check it. If you will find that issue still exists in such case, please contact us here and we will handle this :) Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.
1.1 2.1 2.2 2.3 2.4 3.1 3.2 4.1 5.1 6.1 7.1 9.1 9.2 9.3 9.4 10.1 11.1 12.1 13.1 13.2
View Full Version: fadhbanna le Snáitheanna an breiseán Sidebar IS DÉANAÍ Dia duit, Tá fadhb leis an mbreiseán Sidebar Lastest Snáitheanna - vBulletin.org Fóram (http://www.vbulletin.org/forum/showthread.php?t=204659&highlight=Sidebar+Lastest+Threads). Nach bhfuil aistrithe an teideal an phoist agus tags. Níorbh fhéidir leat a shocrú sé ar bhealach? Go raibh maith agat. Tá sé seo le haghaidh gnáth mods nach bhfuil comhtháite agus nach bhfuil sé ar ár bug - is é toisc nach bhfuil a bhfuil tú ag baint úsáide as mod comhtháite go fóill. Gach a bhfuil ag teastáil é a fheiceáil teidil aistrithe é a úsáid vbet_parseTitle fheidhm (THE_TITLE) ó / n-áirítear / vbenterprisetranslator_functions_bbcode.php. Mar sin, mar shampla, má tá teideal ag an athróg a shealbhú ainmnithe $ teideal ansin is féidir leat a chur an chuid seo den chód: if (strpos($title, '[/langtitle]')) { require_once(DIR. '/includes/vbenterprisetranslator_functions_bbcode.php'); $title = vbet_parseTitle($title); Téigh i dteagmháil údar mod agus iarr ina bhfuil an áit le haghaidh an cód. Is féidir linn cabhrú leat le comhtháthú, ach beidh sé seo tar éis scaoileadh vBET 4.0. Till an am seo ní mór dúinn i ndáiríre lán de na tascanna eile. Cuir in iúl dúinn raibh a láimhseáil tú é seo:) Mé leis go díreach laistigh de cheann de na forlíontáin, hasn't sé messed suas ar an gcóras plocóidí agus beidh mé ag PM tú an cód iomlán a fheiceáil má tá sé vbet ceart:) Automatic Translations (Powered by Google, Microsoft®, Yandex , SDL Language Cloud and Apertium): Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.