scootstah
Staff Alumni-
Posts
3,858 -
Joined
-
Last visited
-
Days Won
29
Everything posted by scootstah
-
Why use constants as opposed to variables?
scootstah replied to Darkranger85's topic in Miscellaneous
Except that in this case we are talking about class constants. Oh, haha. That's what I get for skimming. -
Why use constants as opposed to variables?
scootstah replied to Darkranger85's topic in Miscellaneous
I don't see it mentioned here so I will. Constants also ignore scope and are globally available anywhere in your script. $foo = 'bar'; function blah() { echo $foo; } This does not work. But this does: define('FOO', 'bar'); function blah() { echo FOO; } -
Code?
-
That's why I use Firefox with BetterPrivacy and Ghostery.
-
That's where subtle variations come into play.
-
I was going to do that as well. The thing is though that I have a pretty specific niche and there isn't a whole lot of competition anyway. Plus, most of those services take a pretty hefty chunk of profit from sales. It's not to live off, just some disposable income on the side. If I made a couple sales a month I would be happy. I've never sold anything in this fashion before though, so I'm a little unsure how the process works ... like if I need any licenses or permits and such.
-
What do you develop with, Notepad? Any modern IDE/editor has syntax highlighting (and bracket matching), so I don't see why this would ever be a problem.
-
I've been toying with the idea of putting some stuff up for sale. Stuff like templates, random graphic design stuff (icons and such), and some of the projects I've been working on. Basically I would just throw this stuff up on some ecommerce platform and let people buy it and download it. They would have really lax licensing, so no recurring fees or limitations and such. They buy it and own it forever. So then my question is, is it a bad idea to just throw this up as "some guy selling some stuff on a website", or should I go through all the hassles with making a business name and all that jazz? I'm not 100% on how this stuff works. It would definitely be nothing on a large scale. I'd be doing excellent to get 5-10 things up. Or should I just stick to using services such as Themeforest to sell stuff?
-
Creating a secure login on public website domain..?
scootstah replied to Chud37's topic in Application Design
With a database, using hashed passwords with salts. -
Buy a reseller web hosting account.
-
So what's the problem?
-
thorpe already did just that - You simply pass a PHP array or object to json_encode, and it gives you JSON. There's nothing else to it.
-
The United States is not a continent.
-
Use a good IDE and it will help a lot. You will be able to see the parameters and such for external functions. And if you use PHPDoc comments you can see all that too.
-
You should be able to just replace $_POST['name_list'] with $_SESSION['planet']
-
Nobody is looking down upon "people like you". People have taken a lot of time on several of your threads to try to help you understand. If, at that point you still do not understand basic concepts then you really need to step up your own learning process. A good book or two is the first thing I would recommend.
-
<option value="-28800" <?php echo $user_timezone == '-28800' ? 'selected="selected"' : ''; ?>>(GMT -0800) Pacific Time </option> <option value="-25200" <?php echo $user_timezone == '-25200' ? 'selected="selected"' : ''; ?>>(GMT -0700) Mountain Time </option> <option value="-21600" <?php echo $user_timezone == '-21600' ? 'selected="selected"' : ''; ?>>(GMT -0600) Central Time</option> <option value="-18000" <?php echo $user_timezone == '-18000' ? 'selected="selected"' : ''; ?>>(GMT -0500) Eastern Time </option>
-
Sometimes I wonder if these guys even know what they are voting for or against. They probably saw "stops illegal downloading" and that was good enough for them.
-
I usually truncate the user agent into 100 or 150 characters. I don't think it is that pertinent to store the entire thing.
-
Creating a secure login on public website domain..?
scootstah replied to Chud37's topic in Application Design
I'm not sure I follow. Are you storing the username and password in a php file? -
Yeah, that looks right. Store the site key in a .php file somewhere, like in a config file with your database connection and whatnot. Make sure it's pretty length, like 50-60 characters. Also, the hash returned by this function will be 128 characters long, so that's how much space you need in your password column.
-
I haven't used CakePHP, but many MVC frameworks offer partial views which you can include into your main view. I haven't looked to see if CakePHP offers this or not, but it may be worth looking into. Aside from that, in your controller you can have multiple methods all with their own view. You would use them by going to example.com/index/method1, example.com/index/method2, example.com/index/method3 etc. Maybe that is what you are looking for.
-
Sure, and in fact I am. I am creating my own forum system for a small CMS I am building. I am doing so because like thorpe said, most of the ones out there are crap and ridiculously over bloated. I only need a very simple discussion board. There's a few forum packages out there that are super easy to integrate into your site. PHPBB3 isn't too hard to do, but personally I can't stand PHPBB. Punbb/Fluxbb is another good choice. It is a pretty simple forum system without all the clutter that other software has (like PHPBB3), and it is pretty easy to integrate. SMF isn't too hard to integrate either. One issue though is that you will most definitely have to use their user authentication system, otherwise you'd pretty much have to rewrite the entire forum system anyway. Tapping into Punbb/Fluxbb or SMF's user auth is trivial, so I would just switch to that if I was you. Seriously, most forum software out there is crap. If you have the time, skills and the inclination it wouldn't be too difficult. I agree with you there. But while the code under the hood may be shit, there are still some very popular forums around that people have always used and won't give up. Namely vBulletin. Almost every big-name forum I have been to uses vBulletin. In fact I was a little surprised that PHPFreaks does not. To reach the level of community and popularity that many of the major forum competitors have achieved would no doubt takes years. I am sure someone has developed a well-written forum package, but it just isn't big enough to be a main contender yet.
-
Why not fix your app to work with different resolutions then?
-
I know that, I just thought that since it was a redirect that it would do it then and not later. I just tested it and it seems you are right. Good to know.