Jump to content

Lyricsride

Members
  • Posts

    32
  • Joined

  • Last visited

    Never

About Lyricsride

  • Birthday 01/13/1987

Contact Methods

  • MSN
    jasonkuhrt@hotmail.com
  • Website URL
    http://www.vpv4.net

Profile Information

  • Gender
    Male
  • Location
    Quebec

Lyricsride's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the explanation Destruction, I've solved the issue by changing the design of the site, but thanks for telling me this, i never knew! Cheers
  2. the concept of having sticky forms, with values that remember the previous input if authentication fails. the usual way of echoing data into the value attribute of html does not work with file fields.
  3. I know that it's not straight forward as in "echo value into value attribute". But is there a function or SOMETHING to solve this issue? Is it utterely impossible? Thanks
  4. After several forums and people suggesting my idea was a little "out there" i finally got it (with a few suggestions from the OZZU forums) thanks for all your help guys. [code]$boxHeight = 247; while($stuffResult = mysqli_fetch_assoc($stuffGet)) { //(A) The # of characters in the entire blurb $charCount = strlen($stuffResult['text']); //(B) Divide (A) by 48, this tells us how many lines there are $lineCount = $charCount / 48; //(C) Round (B) up to get the actual # of lines (can't be a float!) $lineCount = ceil($lineCount); //(D) Multiply (C) by 13 b/c each line is 13px high $lineHeight = ($lineCount * 13); //(E) Substract the total box height by the line height of the blurb, the while loop slowly eats away at the box space until it is full! $boxHeight = $boxHeight - $lineHeight; //the the blurb is NOT the last one, take an additonal 26px off the box height, to account for spacing the posts apart if($boxHeight > 25) { //subtract 26px b/c this blurb has space at the bottom $boxHeight = ($boxHeight - 26); } if($boxHeight > 0) { //echo 'box px: '.$boxHeight.'<br />'; //echo 'blurb px'.$lineHeight.'<br />'; //echo 'blurb line'.$lineCount; //the actual blurb being displayed to the user echo '<div style="float:left;">'.$stuffResult['date'].'</div> <p style="margin-left:119px;margin-bottom:26px;">'.$stuffResult['text'].'</p> '; } }[/code]
  5. Thanks fert, that's something else i was thinking. The annoying problem with that is, there could be blurbs as little as one line. Each blurb would require margins on the top and bottom, of course. That means the worst-case scenario the box must be able to handle is the amount of characters that would be outputted if each post was only one line long. The chances of this are slim but can't be ignored to function properly. It ends up being a very crude and static measurement. I'm wondering if there can be a way to solve the problem using the GD library - albeit a convoluted one....
  6. The box will be a set size. I guess that helps a little, i'll be able to tell PHP exactly what size it should be limited to. At least i think that should make it easier.... ha. The current height in pixles is 285px. So that's the max size. I'm going to be using MySQL for databasing. I have access to GD 2.x. Big thanks for the help. I'll try to reply faster! :) edit: the width is also statically set at 355px. It's probably a given but just in case...
  7. Thanks a lot for the reply Little Guy. I considered something similar to your suggestion, but the problem is that 5 posts (LIMIT 5) may not fit into the box. If one of those 5 "blurbs" is considerably long, it would push others outside the box. On the flip side, if all 5 "blurbs" are considerably short, they won't fill the box. I do not want to use scrollbars either. Somehow PHP needs to dynamically detect how many "Blurbs" can really fit into the box, based on the size of those blurbs versus the size of the box. Am i making sense?
  8. hey folks, I have would like to implement a simple blurb sytstem. The only part confusing me is how i should have php detect when the box of news has been filled. http://codes.concordia.ca/help.png the image basically explains the concept. What php code/concepts/tutorials should i be looking for? Thanks for pointing me in the right direction!
  9. Thanks guys this is great! Is it better to use php or SQL to do this? I suppose it depends, in my case i probably want to go with speed right? So which should be faster?
  10. Hey there, this is a simple question but i can't seem to find the answer. Probably b/c i don't know what to specifically search for the answer. I want to query a subset of a text field. In my newsposts i want the "preview" of the text to be shown on an index page with all news posts. I'd rather do this than have to text fields (text_short, text_long). The concept would be: SELECT <field> FROM <table> WHERE <only first 30 words of the field> Simple, i think, what concept should i be searching out here? Thanks guys, really appreciate it.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.