-
Posts
15,266 -
Joined
-
Last visited
-
Days Won
431
Everything posted by requinix
-
Bug: Using quote creates nested quotes
requinix replied to SaranacLake's topic in PHPFreaks.com Website Feedback
Eh, it's BBCode parsing. IPB doesn't want people doing that anymore. But I'll see if maybe something happened during one of our upgrades - some configuration getting screwed up, something like that. That aside, please don't use quotes for code. You don't need to emphasize what line something else. Just say it. The little bit you gain from pointing out a particular line isn't enough to lose out on the monospace and syntax highlighting. -
Bug: Using quote creates nested quotes
requinix replied to SaranacLake's topic in PHPFreaks.com Website Feedback
Screenshot of the post submit textbox thing before you submit it? -
But what if the article doesn't even exist? How can you tell the user it's a premium article when you haven't actually looked for the article? I didn't miss it, I just don't see what additional information it's contributing. You said you want to go through this entitlement process to determine if the article is free, and I said that's a dumb.
-
I know. Psycho knows. api.drupal.org knows.
-
Irrelevant for free articles. Irrelevant for free articles. Irrelevant for free articles (because they're viewable by everyone). You shouldn't have to run a query just to see if the article is free: didn't you already run a query to look it up in the first place? The solution about setting up some situation with entitlements and something about outer joins? Let me turn that around on you: what's wrong with my solution?
-
When in doubt, check the documentation.
-
Thoughts? My thoughts are why you're making this so complicated. If the article is free then the article is free. Entitlements has nothing to do with it. Completely and totally irrelevant.
-
Your question is how to handle an article being free. Your answer is to set up some sort of free membership plan, then add the articles to that plan, and either put everybody into that plan so they have some sort of dual membership thing or to add the free articles to every membership plan that exists. My answer is to mark the article as free.
-
ALTER TABLE ARTICLE ADD COLUMN is_free TINYINT(1) NOT NULL DEFAULT 0;
-
Sorry folks, turns out OP was a spammer. Looks like the post was copied from r/PHP.
-
Contact form working, but email not sending or being received
requinix replied to mike3075's topic in PHP Coding Help
There are very many reasons why an email may not be sent or received. Switch your code to using PHPMailer instead of mail(). That helps with a lot of those reasons. If you still aren't getting the email after that, then there could be a problem somewhere. -
I see you have a function there (in the first file) called "login". I also see you aren't calling it there. I also can't see where that file gets run from.
-
Without going into details, the owners don't own PHP Freaks for the revenue. It generating any revenue at all is more of a nice to have - especially if it's enough to cover the hardware and hosting costs. As demonstrated by how long it took for us to put up ads - ads which appear to me to not be working again...
-
Then I must have misread your post, because I was sure it said something like "if it makes the owner $$$, that is all he cares about". Or maybe I'm mistaken on the meaning of the word "greedy" and it does not, in fact, mean "having or showing an intense and selfish desire for something, especially wealth or power".
-
can I use the full file URL in an include() function?
requinix replied to ajetrumpet's topic in PHP Coding Help
Relative paths can behave strangely. Don't use them. Do what mac_gyver said. -
With enough people, time, effort, and skill, yes. Our current owner is a significant improvement over our past owners. Kindly retract your implication that they are greedy, as it will have the added benefit of not making you look like an ass.
-
Hahahaha Invision Power Board, aka IPB, aka this dumb piece of crap, yes. As it says in the page footer.
-
The problem is it's non-trivial: I have no problem hacking the IPB templates a bit, but the post number is not a piece of information available to use. The walled garden of the IPB modding community puts Apple to shame.
-
And what's your question?
-
Opinion. Preferably backed by benchmarks. Which then leads into things like "standards" and "best practices".
-
Seems pretty easy to me.
-
As an example of what I mean, please answer the question I asked earlier:
-
Unless you have a particularly bad setup, the user cannot tamper with their session data. Any good database system will cache data and queries. As long as you're using good database design and have appropriate indexes, it should not be expensive. Again: good database design and appropriate indexes.
-
can I use the full file URL in an include() function?
requinix replied to ajetrumpet's topic in PHP Coding Help
Yeah... I must be missing something or else I would expect people to have yelled not to do that. If the files are on your own website then never include them as URLs. For assorted reasons, not the worst of which is that it's extra overhead on your website. If the files are not on your own website then never include them as URLs. The answer is something else that depends on why you're trying to execute PHP code on someone else's server. -
You can also select specific text in a post and a little "Quote selection" thing should pop up. Makes it easier to quote something specific in a post without having to quote the whole post and then delete what you don't want. edit: If y'all didn't notice, while I was searching for something about timezones... or maybe I was looking for the post number thing... whatever, while I was in there I turned on an option that has the default avatar be something according to the first letter of the display name. I've seen it on other sites and I like it, but if people don't and want to go back to the one where it's just blank image for everyone, that's okay.