Jump to content

gijew

Members
  • Posts

    240
  • Joined

  • Last visited

    Never

About gijew

  • Birthday 10/22/1977

Contact Methods

  • Website URL
    http://www.clcnationwide.com

Profile Information

  • Gender
    Male
  • Location
    California

gijew's Achievements

Member

Member (2/5)

0

Reputation

  1. Just an FYI but I think I found something I might be able to use in case anyone ever stumbles across this. http://manybooks.net/titles/anonetext91roget14.html It's Roget's Thesaurus and the only usable format was a .txt version but hopefully I can parse through it to make it usable to ME
  2. gijew

    IE9

    Oh, I DO agree that there are still quite a few computer illiterate people out there. It's just that now kids (20ish and below) have always had a computer in the house and were raised with them (for the most part). For the rest of us above that age marker, it's hit and miss but even my parents who still call marijuana "The Pot" use Firefox because they had too much trouble with IE in the past (I didn't even have to school them on the pitfalls of using IE to browse that new fangled interweb). Then again, it could be geographical as we're in Southern CA where people do whatever they see in Hollywood which would explain why you can't go into a Starbucks without seeing a Macbook haha.
  3. gijew

    IE9

    That's funny when you're using MS as the example. I like to think of them as the good looking rich kid with a huge trust fund that finds out one day they can't skate by on their good looks for the rest of their life and may have to work for a living. I was looking at the browser usage on our websites at work and it's always been around 80-90% IE users which hurts my soul when designing them (and for the record about 18% of that number still uses IE6 which downright kills my soul). In the past month or so the total number of IE users has dropped to around 68% which makes me happy. Generally speaking, people are becoming more computer literate. Spam and crap security holes are forcing people to be more conscious of how they use the internet and everyone has that one "geek" in the family or friend base and I'm sure everyone of them (us) has said at one point, "if you want your computer to be more secure don't use IE...". I think it's finally having an impact. Go Team! As to the point of this post. IE9 looks nice as a comparison to their predecessors but I still won't be using it =)
  4. Does anyone know of a thesaurus you can download to use in software? I tried finding something in XML as I found a protocol for an XML based thesaurus but the links were broken when I tried to get it. I'd prefer something in XML that I can read from so I can keep the app internalized and not have to make 1000 calls to an external server every time I needed a synonym =/ Everything else I've found so far is compiled into a VB app or not available in a usable format so I thought I'd ask in case someone has run across something in the past or knows how to use Google better than me!
  5. I just needed a break. I fixed it. Long story short is I just threw the output of the loop into an array and did a str_replace with the contents of the array.
  6. I'm writing a small template class. Easy - works. I decided to get tricky and add a modifier to the template variables. The whole thing is too much to get in to so I'll try and keep it small - hopefully someone can understand my ramblings Example tpl var ::content->linkset:: Example tpl var w/modifier ::content->linkset[5]:: Using the modifier I would get (x) amount of records from an array. That code all works too but before I continue I should add that once all of the template variables have been replaced it writes everything to a file for caching purposes. The problem is when the template contains more than one modifier it repeats the last one over and over again in the final output (and yes, it repeats the last one in the array). Experience has taught me that the solution would be to reset the counter before it loops again but for whatever reason it's not working. Here's some code to see if someone can spot the problem. I took out a few things but this should be the gist. Thanks in advance. <?php // read from tpl $file = $var['path'] . $var['themes'] . $tpl . '/' . $var['file_index']; $tplr = fopen($file, 'r'); $template = fread($tplr, filesize($file)); // special output if (preg_match_all('/(::content->linkset\\[([0-9]*)\\]::)/', $template, $results)) { // open file for writing $tplw = fopen($file, 'w'); // loop through results for ($i = 0; $i < count($results); $i++) { $output = fwrite($tplw, preg_replace('/(::content->links_body\\[([0-9]*)\\]::)/', $this->content_linkset('body', $results[2][$i]), $template)); } } ?> If for whatever reason you want to see the entire code I'll post it. It's not horribly long (48 lines) but I know how frustrating it is to sift through all that crap when you're trying to help
  7. This would probably be better handled by CSS but you could always use the wordwrap function. http://us.php.net/wordwrap
  8. You could use a JOIN to get the data in one query. So now the owner id would be associated with the horse. <?php $query = "SELECT * FROM horses LEFT JOIN owners ON horses.owner_id = owners.id"; ?>
  9. There's no 'WHERE' conditional in your query. WHERE student.StudentID = $_GET[id] Ex: www.site.com?id=2
  10. Try using the complete path and see if that works. Obviously it's not able to locate the file.
  11. Nothing is jumping out at me. Have you tried removing parts of the PHP to try and narrow down where the problem is? If my eyes can't catch the problem I'll just remove chunk by chunk to see where the issue is.
  12. You answered your own question kind of. The "No votes yet" is IN the loop. If you only want it once do something like... <?php if (mysql_num_records($sql) == 0) { echo 'no votes'; } else { while ($row = mysql_fetch_array($sql)) { ... } } ?>
  13. It's easier to code this than store it into a database. This is just pseudo code so it may need modifying to work but the basics are there. That and I'm mixing HTML with PHP but that's besides the point, it gets the basics out <?php $columns = 2; $total_records = 20; $column_split = ceil($total_records / $columns); echo '<table><tr>'; while ($row = mysql_fetch_array($sql)) { $count++; echo '<td>' . $row['tablerow'] . '</td>'; if ($count == $column_split) { echo '</tr><tr>'; $count = 0; } } echo '</tr></table>'; ?>
×
×
  • 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.