Jump to content

tibberous

Members
  • Posts

    1,187
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by tibberous

  1. Here is what I have so far: http://www.trenttompkins.com/layout.png Basically the site is going to have reviews of flash games and articles. It has a tag system, that I would like to incorporate, but an not quite sure where. It also has featured games, so I need to make a featured games section. I was thinking about adding a section for the most played games. I also planning on adding a 'similar games' features - so if you are reading a review for tetris, it will recommend a couple other high ranked puzzle games, preferably with similar keywords as tetris. I am mostly just looking to see what you guys think, and if there is anything you would change. I am thinking the article titles on the left side nav might need changed, and was thinking about making the links black instead of blue, but am not really sure. Oppinions?
  2. It's an ascii arrow. In C++, it was use to reference a property of a class you had a pointer to, in PHP, it is just used for objects properties.
  3. This works: <?php $arr = array('panels/DC_air & space #2.jpg', 'panels/DC_air & space #3.jpg', 'panels/DC_air & space.jpg'); function alter(&$arr_item){ $arr_item = htmlentities($arr_item); } array_walk($arr, 'alter'); print_r($arr); ?>
  4. I think your problem is that htmlentities doesn't change the string it returns it. You aply the function to every member in the array, but the function doesn't change anything.
  5. !!! Damn it! Thats it... I thought I was missing something fundamental with subqueries, here it was just something stupid. Thanks a ton.
  6. I have two tables, games and categories. Each game have a category field, which holds the id of the category it belongs to. Each category keeps track of how many games are in it, and records it in the gamecount field. Is there a way to set categorie's gamecount field to the number of games with a certain category, all in a single query? select count(*) from games where category=1 returns a 4. And... update categories set gamecount='4' where id='1' But update categories set gamecount='(select count(*) from games where category=1)' where id='1' Doesn't do anything. Anyone know why?
  7. At the bottom it says: Powered by SMF 1.1.1 http://www.simplemachines.org/ From working with the code, I will say it pretty shitty to mod in some places. This site looks a lot like PHPBB's default skin, so you might be thinking that. Ikon board was always my favorite, but it is written in Perl, and pretty unsupported nowadays I think.
  8. If you have two conditions in a where clause, how do you separate them? select id from `gametags` where `gameid`='$gameid', `tagid`='$tagid'
  9. I'd tell them to piss off - or switch to switch to a VPS. My site runs on a VPS and it works fine.
  10. Are you trying to do it when the form is submitted, or when it is changed with javascript? If you make a lookup array you don't actually need an if either way you write it.
  11. Suckerfish makes an AWESOME drop down menu: http://www.htmldog.com/articles/suckerfish/dropdowns/ I have been working with these for the last couple days and still couldn't quite tell you how they work, but they are GREAT. Most drop down menus take a ton of code and suck, these take almost no code - there all CSS powered and they work great after some screwing around.
  12. I have several arrays. I want to put them all into a single array. How can I do that?
  13. Yeah, it is on submit. I got it working for one and two end-lines, but I can't seem to get it to work for three. If my input is something like: Hello There I was the output to be: <p>Hello</p> <br> <p>There</p> Almost like if you types plain text into the WYSIWYG part of Frontpage / Dreamweaver, then went to view code. Here is what I have so far. I replace \r\n with \n, then replace \r with \n. That way I know \n is the only possible linebreak. function format($content){ $content = trim($content); if(strlen($content) == 0) return ""; $content = '<p>'.$content; $content = str_replace("\r\n", "\n", $content); $content = str_replace("\r", "\n", $content); $content = preg_replace("/\n{2}/", "</p>\n\n", $content); $content = preg_replace("/\n{2}/", "\n\n<p>", $content); $content = preg_replace("/[^\n]{1}\n{1}[^\n]{1}/", "<br>\n", $content); return $content.'</p>'; }
  14. I have a textarea, and am trying to add paragraphs and line breaks to it. Since the paragraphs have a set style in the CSS, I want to use paragraphs for all the main text, and only use line breaks if there are several spaces between a paragraph. Does anyone know how to do this?
  15. I am trying to make a nice function to do a mysql insert. Right now I have 13 values, which means using a huge mysql query string. I was hoping to make a function that would just take in 13 variables and perform the insert. The variables are all named the same thing as they are in the database. The biggest problem I am having that there doesn't seem to be a good way to get the variables name from the variable, if you are using get_func_args to retrieve it.
  16. Thats a neat idea, I didn't even know you could put %s in bookmarks.
  17. Agreed. There are really only three search engines you need to care about, and they'll find you if you are doing everything right. Besides, getting listed isn't the same as getting ranked - being on page 213 of some no name search engine isn't worth paying for. I'm #5 in google for "opensource flv player"
  18. This used to be really easy to do, and then they changed the Mozilla site around and messed it up. I didn't really think about it until my old teacher showed me this 'great' plugin he was using, that did the same thing as adding the search engine, except it required a new toolbar. Anyway - I made an XML file for it and put it on my site. One click to add it. http://www.trenttompkins.com/Articles/Add-PHP.net-Function-List-OpenSearch.html
  19. I have two tables, one named items and the other named categories. Categories has two columns, an id and a name. Ex: id name 1 Action 2 Classic 3 Adventure The items table has a field called category. This is a number, that represents the id in the other table. So, if the category value was 2, the category would be Classic. If I have an item in the items table, and want to get the text name of the category, how would I make the query? Basically I am doing a lookup table, but I forget how. Can anyone help me out? If I'm not being clear I'll explain better - it is kind of hard to say
  20. They might cause a performance hit, but so long as you initialize variables before you use them, there isn't anything wrong with register globals. Biggest reason not to use them is the fact that there off by default =(
  21. Might be register globals. Make sure dreamhost has them turned on.
  22. #743,156 - http://www.trenttompkins.com Anyone in the top 100k?
  23. It's finally finished, I completely scrapped what I had before. What do you guys think? http://www.trenttompkins.com/
×
×
  • 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.