Front Office Football Central  

Go Back   Front Office Football Central > Main Forums > Off Topic
Register FAQ Members List Calendar Mark Forums Read Statistics

Reply
 
Thread Tools
Old 01-16-2017, 12:08 PM   #1
Ben E Lou
Morgado's Favorite Forum Fascist
 
Join Date: Oct 2000
Location: Greensboro, NC
HTML Help

I'm trying to determine a better way to output FOF rookie bars to a forum. Right now, I'm doing it the "easy" way, but it's taking up a ton of room. Need 75 grey bars? Output 75 instances of a 1-pixel wide grey bar. But I've determined that I can save a ton of room in the database if I can figure out how to reduce it to background elements or something. I've tried divs, but they want to take me to another line.

2039 Draft Thread - Page 5

I've just got two variables: $bluestart (length of the initial grey bar) and $blue (length of the blue bar.) So right now, it's a couple of for loops:

PHP Code:
FOR ($counter=1;$counter<=$bluestart;$counter += 1)
            {
            IF (
$counter==25 OR $counter==50 OR $counter==75) {$bars.= "<img src = \"{$leagueurl}blackpic.png\">";}
                ELSE {
$bars.= "<img src = \"{$leagueurl}greypic.png\">";}    
            }
FOR (
$counter=1;$counter<=$blue;$counter += 1)
            {
            IF (
$counter+$bluestart==25 OR $counter+$bluestart==50 OR $counter+$bluestart==75) {$bars.= "<img src = \"{$leagueurl}blackpic.png\">";}
                ELSE {
$bars.= "<img src = \"{$leagueurl}bluepic.png\">";}    
            }
            
$bars.="</td><td><font face = \"Verdana\" color = \"#{$dark}\" size = \"1\" ><b>{$row29['lowbar']}<->{$row29['highbar']}</td></tr>"

Maybe I was doing something wrong with the way I was trying to do it with a div. I tried this:

PHP Code:
$bars.="<td><div>.<div style=\"width: {$greyone}; background-color: #888888\">.</div><div style=\"width: {$blue}; background-color: #AAAAFF\">.</div><div style=\"width: {$greytwo}; background-color: #888888\">.</div></div></td>"

The periods are in there because if I put nothing, I get nothing. But with any text in there (like the period) I get this:

http://www.fof-ihof.com/write_pick_test.php

Ideas? I *know* there's got to be a way to do this.
__________________
The media don't understand the kinds of problems and pressures 54 million come wit'!


Last edited by Ben E Lou : 01-16-2017 at 12:09 PM.
Ben E Lou is offline   Reply With Quote
Old 01-17-2017, 03:23 PM   #2
Ben E Lou
Morgado's Favorite Forum Fascist
 
Join Date: Oct 2000
Location: Greensboro, NC
Bump for the work-week crowd...
__________________
The media don't understand the kinds of problems and pressures 54 million come wit'!
Ben E Lou is offline   Reply With Quote
Old 01-17-2017, 04:35 PM   #3
chinaski
College Prospect
 
Join Date: Nov 2003
Location: Portland, Oregon
Since its just a 1px solid color png, why not just use the img width=x? At least that way it wont be repeating.
chinaski is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT -5. The time now is 08:04 PM.



Powered by vBulletin Version 3.6.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.