View Full Version : Force templates to behave the same in browsers
March 16th, 2012, 10:05 AM
Latest versions of all browsers
View this page (http://www.gottapixel.net/gallery/mye-de-leon/p286638-cube.html) in Firefox, IE then Chrome. The right hand column is what is being shoved off the edge.
For Firefox, it wraps the text where in Chrome and IE it does not. Is this in the Photopost templates and can it be fixed?
March 16th, 2012, 10:45 AM
Personally if you ask me it might be whatever extra information your entering like kit info thats not part a normal photopost that is causing your issue.
March 16th, 2012, 11:01 AM
It's a URL. Not something that is unusual. Doesn't matter if it were a url or a really long word. Firefox handles it just fine. IE and Chrome does not. If there isn't a way to force the code to be handled the same, then so be it.
March 16th, 2012, 11:19 AM
Right but the real issue here is the data and not being wrapped.
Maybe these lines in showphoto.php
$extra1 = convert_markups($extra1);
$extra2 = convert_markups($extra2);
$extra3 = convert_markups($extra3);
$extra4 = convert_markups($extra4);
$extra5 = convert_markups($extra5);
$extra6 = convert_markups($extra6);
change to this
$extra1 = convert_markups(convert_returns($extra1));
$extra2 = convert_markups(convert_returns($extra2));
$extra3 = convert_markups(convert_returns($extra3));
$extra4 = convert_markups(convert_returns($extra4));
$extra5 = convert_markups(convert_returns($extra5));
$extra6 = convert_markups(convert_returns($extra6));
March 16th, 2012, 11:34 AM
That did not fix it.
March 16th, 2012, 11:49 AM
Yeah not really sure I could tell you how to fix the browser issue. It is not software related.
You could maybe try using php wordwrap function on whatever variable you are using for that.
PHP: wordwrap - Manual (http://www.php.net/manual/en/function.wordwrap.php)
Usually though browser issues have to be addressed in the browser.
Usually what I tell most people that try and enter one huge long string is do not do it. Because your not really talking about software here. Your talking about a browser issue as different browsers may operate differently on how they handle that. Normally if you print one huge long thing it is going to wrap at the first space it finds which means on most browsers its going to cause a breakout.
March 16th, 2012, 11:53 AM
Wouldn't it just be an issue of parsing the links like vBulletin does? That's not a browser thing... but a software thing.
March 16th, 2012, 12:25 PM
parsing links how vb does it is what convert_markups does and is already called but again not sure how your doing your field as you have not told me so not sure how to respond. You never told me what variable the field is when I asked so I assumed maybe one of the regular category extra fields.
Maybe let me take another guess custom fields line 270 of showphoto.php try making it this
$customboxes['value'][$numcustom] = convert_markups(convert_returns($extrasel));
March 16th, 2012, 12:50 PM
Made that change, that did not work.
You'll have to forgive me, I'm not seeing where you originally asked what variable the field is. We are using the extra fields, text boxes.
One thing to notice. It's not an issue of just long URLs.
Keywords: mdlmkfaad mdlmkfaadcf mdlmkfaadhpb mdllayeritvol3tp
In FF, it wraps after the 2nd word.
In IE & Chrome it wraps after the 3rd word.
So, it's wrapping, but it's wrapping after to many characters.
March 16th, 2012, 02:37 PM
wordwrapping is handled by browser I see many threads on the internet about this and IE9
It is a browser bug nothing I have said works those real long urls of yours are simply not going to break in IE9.
I have tried PHP wordwrap and even a CSS word-wrap: break-word; statement in your body of the page and no matter what IE9 is bad so this is as I said a browser bug. The browser is not following the php coding or the css coding.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.