Text flow between multiple HTML boxes with PHP

Hi,
I have created three columns on my Freeway page and linked them so that text flows from the first>second>third ala newspaper style.

This works fine when I just type text in teh box but now I’ve made it dynamic, I read a value from a database and echo the statement in the first box with PHP, but only the first box grows, it never flows intot the other boxes.

Any ideas???

Thanks,

John


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi John,
Freeway’s linked text boxes exist only in the application and, as you may have found out, the text doesn’t dynamically flow between the boxes on the live web page. To do what you want I can suggest two options; CSS3 columns or splitting the text using PHP.

Using the CSS3 Columns Action (CSS3 Columns - ActionsForge) you can split a regular text box into three columns that, in a supporting browser, will do exactly what you want. The downside is that browsers that don’t support the CSS style will simply display your text in a single column.

The other option (and one I would personally choose) is to use the PHP you already have in your page to slice the text up into three blocks and store these in either three variables or an array. You can then echo these values to your text areas as the page renders. Depending on how precise you want to be with your splitting code you may want to split the text on full lines and also try to avoid widowed or orphaned text appearing at the top and bottom of your text areas.
Regards,
Tim.

On 18 May 2011, at 08:26, johnrob wrote:

I have created three columns on my Freeway page and linked them so that text flows from the first>second>third ala newspaper style.

This works fine when I just type text in teh box but now I’ve made it dynamic, I read a value from a database and echo the statement in the first box with PHP, but only the first box grows, it never flows intot the other boxes.


Tim Plumb
Creative Director
Softpress Systems

Follow us on Twitter: http://www.softpress.com/tny/064
Join us on Facebook: Redirecting...
Looking for a webhost? We love these guys: Softpress » Web Hosting Partners


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thank Tim. I had actually found the CSS3 Columns action and tried it. As you say, works fine in most browsers but non of the IE range 7,8 or 9.

Trouble with your 2nd option is that the text to display contains a lot of formating tags, as it’s an editable block using CKEDITOR. Thinks makes it hard to split the actually viewable text into 3 equal sections.

Any suggestions on how to get around this?

John


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi John,
A simple solution may be to split the editing down into three distinct editable regions within your CMS so the user knows what text will appear in what sections. The other simple option is to use a hidden comment ( for example) in a single edited text block, use PHP to explode this into an array and then echo each part of the array to each text area. The editor would have to manually insert the column breaks comment in the CMS but it should prove to be a simple way to get what you want.
Regards,
Tim.

On 18 May 2011, at 11:06, johnrob wrote:

Trouble with your 2nd option is that the text to display contains a lot of formating tags, as it’s an editable block using CKEDITOR. Thinks makes it hard to split the actually viewable text into 3 equal sections.

Any suggestions on how to get around this?


Tim Plumb
Creative Director
Softpress Systems

Follow us on Twitter: http://www.softpress.com/tny/064
Join us on Facebook: Redirecting...
Looking for a webhost? We love these guys: Softpress » Web Hosting Partners


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options