Mkippen Posted January 12, 2008 Share Posted January 12, 2008 Well, i have this problem, and i joined up to this site to see if i can get some help with this stuff. I run a couple of sites, and my history is in ASP.net/SQL and html, but more recently i have grown to learn php and mysql, and really loving the scripting ability of the language... Even between the work i have done in the past, i have never had to do something like this, so i really dont know the standard way that this gets done. anyways, my site is about cars and photography, and i am doing a page for feature cars / articles. so its going to contain several photos, and a full article, stuff like that. Basically, i have an admin page thta allows me to upload the photos i need, upload the title, and a complete article - about 3-5 paragraphs worth. From there, i am building templates that we can use to format the page in an organized fasion (mostly with the photos) and have the text flow fluidly through the page. Here is the page that i have created so far. http://www.snapriot.com/mk_feature.php?action=showitem&featureid=21 as you can see i have "some" text, but those are different fields. http://www.snapriot.com/lightbox/gallery/Private/MKippen/wesfeature.jpg Basically, i want to be able to write a function to get the entire feature article (all 5 paragraphs worth) and print this text directly onto the page between the photos. As you can see in this photograph here, this is the way i want the text from this one field in the database to flow... http://www.snapriot.com/images/textflow.JPG From the Red, to the Blue, to the Green, and to work with the client size text size, font, etc... How is this possible, how is this done typically? if i could create 3 separate DIV's and flow the text from one to the other dynamically, this would be perfect!! Anyone who can help, that would be awesome! Quote Link to comment https://forums.phpfreaks.com/topic/85623-displaying-fluid-text-throughout-layout/ Share on other sites More sharing options...
Mkippen Posted January 18, 2008 Author Share Posted January 18, 2008 I'm sad, can Anyone help me with this PLEASE!!!! :'( Quote Link to comment https://forums.phpfreaks.com/topic/85623-displaying-fluid-text-throughout-layout/#findComment-442427 Share on other sites More sharing options...
trq Posted January 18, 2008 Share Posted January 18, 2008 Once your data has been pulled from the database, split it into three parts and echo the results. Post your current code if you need more help. Quote Link to comment https://forums.phpfreaks.com/topic/85623-displaying-fluid-text-throughout-layout/#findComment-442433 Share on other sites More sharing options...
Mkippen Posted January 18, 2008 Author Share Posted January 18, 2008 split it into 3 based upon what? how would i detect how much each section needs to be? Quote Link to comment https://forums.phpfreaks.com/topic/85623-displaying-fluid-text-throughout-layout/#findComment-442444 Share on other sites More sharing options...
yaz Posted January 18, 2008 Share Posted January 18, 2008 You have a fixed layout, play with the truncate value until it fits in each box. You might have to create a 4th field to display whatever is left out at the bottom (not fixed hight like your first 3 boxes). Quote Link to comment https://forums.phpfreaks.com/topic/85623-displaying-fluid-text-throughout-layout/#findComment-442450 Share on other sites More sharing options...
Mkippen Posted January 18, 2008 Author Share Posted January 18, 2008 is that how it is typically done? how would i create a single box that can vary in size and still display the pictures like i have them on the site now? Quote Link to comment https://forums.phpfreaks.com/topic/85623-displaying-fluid-text-throughout-layout/#findComment-442477 Share on other sites More sharing options...
yaz Posted January 18, 2008 Share Posted January 18, 2008 Well, the problem is that you have a lot of content in between the boxes and pictures and stuff. I would not put a continuing paragraph in 3/4 different spots. I would put the text all in one place, mostly because its easier visual flow. For example, I'm not entirely sure where the article starts, so you might have to add some visual clues... or just add facts/snippets on the top boxes, put the entire article in one box. But if I were to do what you are asking, I would split the text in 3 places. Play with the number of characters that could fit in each... Quote Link to comment https://forums.phpfreaks.com/topic/85623-displaying-fluid-text-throughout-layout/#findComment-442485 Share on other sites More sharing options...
Mkippen Posted January 18, 2008 Author Share Posted January 18, 2008 interesting, i hear what you are saying. my objective was to come up with a several different "templates" that we can use for different features. this would allow us to give a fresh feel with the same context. i'll give it some tries, but i think the base of it is just that i have to devide it up and determine somehow the amount of text that will fit in each. Quote Link to comment https://forums.phpfreaks.com/topic/85623-displaying-fluid-text-throughout-layout/#findComment-442488 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.