Jump to content

redbullmarky

Staff Alumni
  • Posts

    2,863
  • Joined

  • Last visited

    Never

Everything posted by redbullmarky

  1. yeah that's the ticket! cheers!
  2. lol the term "can't please everybody" springs to mind. Count yourself lucky. With Microsoft behind the Xbox/Xbox360, you'd be totally in the dump by now :) however - admins/phpfreak (or anyone else that knows anyway), if you can tell me what the $_SERVER vars are for a PS3, that'd be good. i'm working on an Input class for my framework which deals with different browsers (including mobiles/handheld PC's) so to cover PS's for the (odd) occasion a user browses my site would be great. (PS - fert, was that a dig at the thousands of people that waited in queue's for a PS3, stating quite clearly that you have a PS3 :) - if i was you, i'd already be selling it on eBay)
  3. [quote author=businessman332211 link=topic=115249.msg469684#msg469684 date=1163787883] Why the hell do you people think I am some sort of damn joke. [/quote] you're not unique, lad - everyone's a joke when they put there head on the block and don't back up their claims/goals, in ANY walk of life. we've heard countless stuff from you, all promising big things and claims to know this and that, yet you have nothing to back up your claims and your own personal site still whiffs a bit of cheap aftershave masking a sloppy fart. the advice and opinions you've had on it so far have been enough to turn your site into a multi award winning example of Web genius and the site that everyone says 'look, go here - its a great example of how things should be done!', only most of that advice has been pushed aside. and then you say that those game sites are easy to copy their functionality - whiffs a bit of sarcasm. you wanted advice, you got it. if you dont want the hard advice too, or you want people to be nicey nicey and give you false encouragement/hope, go to Bebo or something. otherwise, take it on the chin, laugh it off and [b]proove us wrong, please!![/b]
  4. let me get this right. this project is not only the biggest project you've ever done, but unlike anything the gaming community has ever seen, yet: 1) you're doing it for fun on the side in your spare time 2) by asking about those other 3 sites, you dont know what your site will be/look like well, i say good luck to you. i'd personally try concentrating on your own site first and make sure you get that right, considering it's your "showcase", and then try and take on something like this. the term "biting off more than you can chew" springs to mind right now. as for your question, i personally dislike the style of most gaming sites (the first and third being good examples of such) but the second (gamefaqs) does look good, IMO.
  5. the TDGW/RDGW make sense, but still doesnt solve my issue of cross table joins. lets say you repeated your class above, for 'Comments'. you specified in your Posts object that it 'hasMany' Comments. as it's the Comments object that's responsible for dealing with all things comments, how do you link the two objects together to form the 'LEFT JOIN' part of the query, as Rails/Cake/PHPonTrax seem to do it? surely, for it to properly obey the correct oop rules, the Posts model would not just make assumtions of what the Comments table looks/acts like.
  6. agreed with everyone. i did door-to-door sales which not only gives you good communication skills, it gives you a tough skin.
  7. ok thanks for clearing that up, I often saw this type of practice mentioned in the same breath as active record so hence my assumption. either way, i'm gonna be delving into stuff that doesnt exactly simplify things - ie, no laymans. Taking into account my example, what is the best way to allow these two seperate models to work together? using two models in this fashion is totally new to me and I get lost in the logic...
  8. hmmm i'll try and be clearer: [code] <?php class Model {   // id of the DB record   public $id = null;   public $hasMany = array();   public $belongsTo = array();   // finds all records based on conditions   function findAll($conditions ...)   {   } } ?> [/code] [code] <?php class Post extends Model {   public $hasMany = array('Comment');      } class Comment extends Model {   public $belongsTo = array('Post'); } ?> [/code] now - i have two objects descending from model. if i use: [code] <?php $post = new Post(); $post->findAll('title LIKE 'test%' AND published = 'y'); ?> [/code] i want a structure returned that contains all the posts with the title starting with 'test' and that have been specified as publish. in addition (and this is where my problem is - getting this done correctly) I want to somehow link the Post and Comment objects together so that: a) valid SQL is generated, handling the joins between tables b) the matching posts AND the comments that belong to those posts are returned in some form. hope that makes sense Cheers Mark
  9. Hi all After playing around with Rails a bit to see what all the fuss is about, as well as CakePHP and PHPonTrax, I've come across something pretty interesting that I'd like to incorporate in my new framework, however due to how it works, is a little beyond me at the moment. Active Record. I can get something similar working with one table (using a single model). However, I'm not sure how to go about the whole 'hasmany', 'hasone', 'belongsto', etc, as I can't get my head around the code. Can anyone give me an idea of how I might put something similar together? I'm pretty sure that it doesnt need to be as complex as the other frameworks. My confusion lies in when two models, each representing a database table, are pulled together to form the table 'JOIN's. Any ideas of simpler/alternative ways of doing this? Cheers Mark
  10. look for a dedicated server. if you're a little bit short on the $$$, then a VPS (virtual private server) will offer a nice alternative. tis what i use, and includes all the above. mine: http://www.webfusion.co.uk/vps - prob not ideal for you (UK based) but will give you a rundown on what to expect from a VPS.
  11. as Jenk says. I'm relatively new to OOP in PHP, but essentially a class COULD very well be a function on speed. moreso, an object's entire behaviour can be changed on the fly. a good example i've seen in the past was an 'Output' class - whereby giving it a little tweak, it could handle output to the screen, printer, plain text, etc. Sure, you could do that with a function - passing it a parameter, etc - but what happens to all your code when you decide to change the type/amount of parameters the function requires? yup - broken. you can probably achieve much the same in terms of the final output with either OOP or FOP, but in terms of the 4 areas Jenk mentioned, it's OOP all the way. cheers Mark
  12. hmm it's not terrible. however (based on your homepage): 1, far too much whitespace at the top of your main content area. you need to bring the title, date and author name closer together. 2, your gradients look a little cheap. unless you really know what you're doing with gradients, it will always look that way. 3, Comic Sans. It's a personal dislike of mine, but it's not a great font, TBH. There's even a website called [url=http://bancomicsans.com/home.html]Ban Comic Sans[/url] which kinda explains all my reasons plus more. 4, Gamers is a broad term, covering many areas of computer games and other things too. What is your site about specifically? What are people to expect? What can they do? you need to make your goal it a little more obvious.
  13. lol i'm 126lb and 5'11 and wouldnt change it for all the big macs in the world
  14. try the code on this site: http://www.massassi.com/php/articles/template_engines/ it's absolutely tiny but does the same thing, and doesnt require learning new syntax. lets you just use basic php in your template files. my current template is  pretty much totally based on that,altho now with tonnes of extra features i've added along the way. it was actually that article that got me used to  the whole idea of seperation, albeit just seperating my application from my templates. the MVC theory came after, and to be honest came quite easily due to having a basic understanding of templating to seperate from main PHP code. in all, i'm probably quite new to PHP compared to yourself, but it only took about week to make the transition from Dreamweaver templates (HTML files with all its PHP code at the top, much of it auto-generated by DW itself) to a "proper" template  driven site. Afterwards, I moved on to the idea of routing everyhting through one single file (index.php) and basing the page on $_GET requests (such as ?action=post&topic=114286) just like this forum does, and the rest is a synch after that (or at least enough to get you getting things done). at first i thought it was unnecessary to have a PHP file and a template file, possibly other files, just to render one page - but going back into the site and making changes is a doddle. i find myself able to redo a site in a few days whereas before it'd take me a week or two. it's not even just the practice/style of coding, it's more the rules/discipline it kinda imposes on you that make you work a little more efficiently and smarter. IMO, of course.
  15. agreed. if you're new to OOP, then download a copy of phpBB (www.phpbb.com). the classes for each DB tech (MySQL, MSSQL, etc) are quite similar to yours so should be easy enough to understand, only it allows (via a change in its settings) to switch seamlessly between each one if required. helped me loads when i first moved away from Dreamweaver's built in stuff.
  16. Hi all Could anyone point me in the direction of a decent SVN tutorial for dummies? I have a Virtual Private Server with about 3 or 4 domains going to it. I've installed SVN, etc, but thats about as far as i've gotten. I want to be able to set something up like: http://svn.mysite.com/project_name http://svn.mysite.com/another_project_name but the configuration to do such a thing kinda confuses me a little, as i dont touch Apache config too often. Anyone that can either help or drop me a decent link? laymans only, please :) Cheers Mark
  17. all of the above, plus more. keeping your content relevent to page title/keywords, rather than making up random keywords that dont have anything to do with the content, is also important.
  18. yeah i agree. there are a fair few popping up now like it, too, and just arent really that funny in comparision.  Borat is hilarious, but that joke's been done now. it doesnt [i]look[/i] too bad, however.
  19. the resources at the top of the App design forum will probably explain it better than I can, but MVC = Model/View/Controller. As you've got access to the dealings here, it's probably better to look at SMF as an example, as you probably understand it. The model would generally be dealing with the database. The view would deal with all things template, etc. The controller would deal with user requests. So a simple controller might be: [code] <?php $request = $_GET['page']; switch($request) {   case 'home':       include('home.php');       break;   case 'post':       include('post.php');       break; } ?> [/code] a View would be dealing with the output - so the template engine, and templates, would form part of the view. the model - getting users/posts/threads, etc, from the DB. generally dealing with data. the point of MVC is to encourage seperation. your Views (templates) dont get littered with business logic code, your main code doesnt get littered with HTML, etc. when you need to make changes to the main application, you can leave your HTML well alone, and vice versa. as you have models to deal with your databases, you can write much of your application code without considering how/why the data is retrieved. i'm sure i've simplified it quite a bit, but it doesnt need to be massively complex. if you've used a template engine before, you've probably already got the basic understanding of seperation you need, and already understand the benefits. seperating your app even more just takes that one step further.
  20. actually, it's not bad. I'm a little stuck for time so didnt get to look in detail, but a couple of things that hit me immediately, regarding your entry/splash screen 1, what's the point, really? a logo, and underneath some text that tells user to click on the logo. Would be good if the user was saved this trouble, and just went to the site. 2, "THIS SITE IS BEST VIEWED USING INTERNET EXPLORER WITH A MINIMUM SCREEN RESOLUTION OF 1024 X 768". One of my pet hates, to go with many other pet hates, and it's because of perception. a) it reminds me of the 90's, which were dark days for web design, b) You never see 'big' companies with stuff like that (except Microsoft, who for some reason have problems with me viewing their MSDN site fully with other browsers) c) unless your site is ridiculously complicated, it's not [i]that[/i] tricky to get it to work on FF, Safari, Opera, etc (which are ALL more standards compliant than IE). I'm on Safari here, for example - and in good ole Safari tradition, it looks loads better on this than it does when I had a quick peek using IE6 and 7.
  21. ProjectFeat - var $value will work on both PHP4 and 5, but strictly, the correct way is to declare a var/function within a class is either public/private/protected which is the way PHP5 utilises. someone correct me if i'm wrong, but i'm pretty sure using 'var' in PHP5 throws a notice as deprecated.
  22. checking [url=http://uk2.php.net/manual/en/function.mysql-num-rows.php]mysql_num_rows[/url] will tell you how many results are found [code] <?php if (mysql_num_rows($duperesult) == 0) {   // no results } ?> [/code]
  23. took me a while. can see the colours but wasnt aware it was a custom message and even when pointed out took a while to see it lol
  24. this should help you, as it's where i picked up the code i based mine on originally: http://www.paypal.com/cgi-bin/webscr?cmd=p/pdn/ipn-codesamples-pop-outside this would code in the return file (ie, the one you tell paypal to return back to once a customer has paid) and is basically responsible for posting back the info to paypal to make sure all is in check. there are a few variables you need to make sure are in your <form> code. i cant remember the ins and outs, but the following is very similar to what i use: [code] <form action="https://www.paypal.com/cgi-bin/webscr" method="post">   <input type="hidden" name="cmd" value="_xclick" />   <input type="hidden" name="business" value="paypayemail@whatever.com" />   <input type="hidden" name="item_name" value="item description goes here" />   <input type="hidden" name="currency_code" value="GBP" />   <input type="hidden" name="amount" value="10.00" />   <input type="hidden" name="no_shipping" value="1" />   <input type="hidden" name="return" value="http://www.mysite.com/paid.php" />   <input type="hidden" name="custom" value="user id or anything can go here - anything you like" />   <input type="hidden" name="rm" value="2" />   <input type="image" src="/images/paypal/x-click-but5.gif" name="submit" alt="" /> </form> [/code] hope that helps cheers Mark
  25. once you've got the basics down, and the basic scripts to handle IPN, it's really really not hard at all. I spend hours sussing it out, yet for the code I was left with left me thinking "they should have just told me that in the first place!!!" One of my old posts here was about paypal and IPN, and included the scripts i used - modified a bit from the paypal developer site. Unfortunately I cannot find it (maybe an admin can help here? it was quite a while back). If not, i'll try dig up the stuff. There's one page in particular on the paypal dev site that literally has all the info you need in one summary. Again, if I manage to dig up the link, i'll pass it on.
×
×
  • 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.