redbullmarky
Staff Alumni-
Posts
2,863 -
Joined
-
Last visited
Never
Everything posted by redbullmarky
-
i'd have liked to see an example file there (without going through the docs to learn it first) so if you can bundle one of them in that'd be good. i had a look through the features. Template engines are kinda funny things in that we all have our own features that we need. I personally like the idea of having a 'master.tpl.php' which contains the "outer" template. i LOVE the idea of supporting short tags even if they're turned off on the server - I use short tags / alternative syntax exclusively in my view files, so that's a good move. as i've built my own template engine around what i kinda expect, i'll give you an idea - aside from the constructor, which doesnt do alot, these are ALL my methods and they have been used to do some pretty big stuff. load($filename) - extracts the vars, loads a tpl.php view file, returns the resultant HTML loadtovar($varname, $filename) - same as load, but puts the resultant HTML into a variable using my 'set' method. more a quick, lazy function to be honest, but saves lots of time when it comes to the common task of embedding templates within templates set($varname, $value = '') - simply sets a variable value (i used to have a 'get' method too, but it never got used and in the year or so i've been using it, i've never needed one either) render($return = false) - extracts all the vars, uses the 'load' method to load the 'master.tpl.php' file, and either outputs the result straight off or returns it, depending on the param. Supports Gzip compression as it fits into my framework, everything else really is held in my Config file - default variables (stuff like copyright messages, so I can just tweak my config file rather than messing with my templates), gzip on/off, etc. There are so many things I'd like it to do, but i've purposely kept it small - exactly the reason why I wrote my own instead of using something like Smarty, etc.
-
that's a possibilty. or maybe just a change around of description/title for the App Design forum - mainly due to the regular helpers and the nature of the problems within that particular forum. PHP Help tends to be for your regular everyday coding hints. If it's gonna be a child board of anything, then maybe App Design rather than PHP Help would be better. Most of the App Design topics tend to have an "OOP" theme to them anyway, so just kinda follows suit
-
that's what i meant
-
yeah i'd be up for something like this in the future as a competition. only i'm sure that it would introduce all sorts of arguments as to which type of Football depending on which side of the water or which continent the entrant lives on
-
to me, the "no coding help" kinda tends to be more implying the general, run-of-the-mill sort of problems with PHP. I've not seen (or had any problems myself) specifically posting code of classes - the type of questions that come up with regards to OOP technicals tend to involve discussions/advice about design patterns, structure, etc - which most definitely fall within the remit of the App Design board. IMO, there's always a danger of having too MANY boards which just confuses people as to the best place to post specific topics.
-
yeah strstr would do the trick to an extent. however, as LIKE is case-insensitive as far as i know, try stristr
-
i kinda understand where you're coming from with "is a marketing spin", but where my biggest issue comes from is that people voicing their side of the argument are all wrong, pompous, angry, etc whereas you on the other hand are correct. thing is with Web 2.0 is I'd probably stab a guess that even O'Reilly, who coined the term, dont have an actual hard definition of what it means and probably just started life off as a thowaway term used to describe all of the new trends. YouTube, MySpace, Digg, etc are commonly referred to as part of the Web 2.0 generation - yet neither really use/focus on AJAX (ok, YouTube uses a little bit for comments, etc, but that's about as far as it goes). MySpace is just a regular botch-up of HTML. Digg, when you remove all the niceyniceys, is just a collection of links to content that people can vote and talk about. Nothing forward thinking, here. Just a nice, pastel colour scheme and a few chunky fonts and nice gradients. Where you state this on your site: would imply that Web 2.0 IS ajax or whatever. This is where people are trying to get you to see. You'd be better outlining more features that you consider being Web2.0 if you're gonna use it in this way. The truth is, Web 2.0 isnt actually ANYTHING, other than a few ideas of modern web development. A funky term that oldies and the computer illiterates and the media can use to sound like they know what they're talking about. And that's my opinion and I'm entitled to it
-
alright thanks all. i think the star rating kinda wins then for what i'm doing. i do have some bits where a thumbs up/down might work well, but consistency across my site is probably gonna be more important i guess. Cheers
-
Nice and easy question. When it comes to rating content, which do you prefer and why? What would YOU have on your site if you were doing a rating script? 1, Stars: eg, 5 stars and you click on whatever 2, Thumbs up/down (or generally anything with just two choices) 3, other...please give details Basically I'm looking at implementing a nice and easy rating system into a current project, so just wondering what people kinda prefer/find easier/find look better, etc. cheers
-
Web 2.0 is a term most commonly used by people who jump on all the "media coined" bandwagon terms. Like those who fit "weapons of mass destruction" into a normal conversation. grrr AJAX on the other hand is a purposeful, non-general technology. OldLadiesAtTheBusStop Syndrome I like to call it. "Oohh have you heard about that surfing the email lark the kids get up to these days? In my day, the only web we had kept my hair tidy when i went t'bed. Ooooh, and those weapons of mass destruction." marcreidy, no one's abusing you dude - just giving you some education and putting your terms straight. It's all good. I invented my own term, Web something or other, but I can't remember what the version number was. Oh well.
-
that is possibly the best description for Web 2.0 i have ever heard. ever.
-
pagination.
-
if it's the CI/Cake/Wikipedia, etc, etc way you like then it's very simple. all you need is an apache server and a htaccess file. My framework uses similar to this in its .htaccess which is located in my web root: RewriteEngine on RewriteCond $1 !^(favicon\.ico|index\.php|js|css|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] which basically says: if it's not my favicon.ico, index.php, js folder, css folder or my robots.txt file, then throw it through my web root's index.php. i then pick up the segments using $_SERVER['PATH_INFO'] which gives me a single string containing everything after the domain name. without mod_rewrite, you can get a similar effect using a url like: using mod_rewrite for this example has two benefits here though: 1, removes the need to have index.php in the URL 2, restricts access to ANY file/dir you dont specify in your .htaccess file automatically. there are lots of ways of structuring the URI though. take a look at the URI of this forum page: if you ran that on your own server, then a line in your index.php such as: echo $_SERVER['PATH_INFO'] would output: /topic,126674.0.html
-
congratulations thorpe! ober. i'm jealous dude (i was an 'average monkey' who was curious lol). house like that over here would cost anywhere upwards of £250,000 - 500,000 (prob about $500,000 - $1,000,000). i put in for a house years ago when i was earning silly money. had a seriously low offer accepted as i had no chain (was living in rented accomodation), but the mortgage company pulled out as their policies changed. house re-sold for £15,000 more than my offer just 8 months later. GUTTED! still renting. places here are just far too expensive now, regardless of earnings.
-
[SOLVED] latest posts/all info in single query?
redbullmarky replied to redbullmarky's topic in MySQL Help
ps FYI, I've just tried the latest query you posted and it seems to be working also - both the ordering and last replier are showing correctly. -
[SOLVED] latest posts/all info in single query?
redbullmarky replied to redbullmarky's topic in MySQL Help
alright you've been a huge help! I've quickly knocked up something using a seperate query to get latest poster for the time being, the important thing being that my forums are now in order. I'll have a good play around with the subselects anyway. Thanks for the help! Cheers Mark -
Ted, did you not read my PM the other day? If you've got specific requests you'd like to ask from a member in someone elses thread, please can you PM them instead. Makes it a trillion times easier to stop posts going off topic....
-
[SOLVED] latest posts/all info in single query?
redbullmarky replied to redbullmarky's topic in MySQL Help
so essentially, when MAX(b2.created_at) is found, it's not possible to find out the record that that particular maximum came from and return its corresponding created_by without using a temporary table? i'm on mysql 4.1 here, though I used your very first suggestion instead just so's i could get my head around it. -
[SOLVED] latest posts/all info in single query?
redbullmarky replied to redbullmarky's topic in MySQL Help
you're a legend. works a treat, thanks mate! whilst i'm here, there's two more related things i'm wondering. 1, is it easy enough to change so that only the posts get reordered, not the stickies? 2, to get the created_by of the last replier, is it just a case of IFNULL(b2.created_by, b.created_by) ? i'm only testing it out with a couple of created_by user id's, so it's hard to tell right now if the result will be the same once things get up and rocking properly. -
[SOLVED] latest posts/all info in single query?
redbullmarky replied to redbullmarky's topic in MySQL Help
just gave that a go - exactly the same results came back, so still missing topics not replied to -
[SOLVED] latest posts/all info in single query?
redbullmarky replied to redbullmarky's topic in MySQL Help
it seems to be working, UNLESS a topic has no replies, in which case the topic is ignored. -
[SOLVED] latest posts/all info in single query?
redbullmarky replied to redbullmarky's topic in MySQL Help
oops sorry, me firing off too soon. now i get all the regular posts and one sticky. there are 4 stickys. here's the query as i've used it: SELECT b.*, MAX(b2.created_at) AS last_reply_date FROM board_messages AS b LEFT JOIN board_messages AS b2 ON b.id = b2.parent_id WHERE b.parent_id = 0 AND b2.parent_id > 0 GROUP BY b2.parent_id ORDER BY b.sticky ASC, last_reply_date DESC -
*sigh* It's been a while since I've gotten properly stuck into MySQL queries so i'm a little rusty. I'm attempting to create a mini forum using just a single table. anyway, here's my schema CREATE TABLE `board_messages` ( `id` int(11) NOT NULL auto_increment, `parent_id` int(10) unsigned default '0', `created_at` int(11) unsigned default NULL, `created_by` int(10) unsigned default NULL, `sticky` enum('y','n') default 'n', `locked` enum('y','n') default 'n', `subject` varchar(255) default NULL, `body` text, PRIMARY KEY (`id`) ) ENGINE=MyISAM; the actual parent topic makes use of all of these fields and has a parent_id of 0. replies, however, dont use 'subject' and set parent_id to the id of the main parent topic. Is it possible in a single query to get a single list of topics, ordered primarily by 'sticky' being set to 'y', and then ordered by the last reply (if any). One query or a couple? Cheers! Mark
-
Image Gallery - constructive criticism appreciated
redbullmarky replied to acdx's topic in Beta Test Your Stuff!
Check your PMs... -
[quote author=TheFilmGod link=topic=124045.msg525997#msg525997 date=1171140197] Whoever the designer of this site is unprofessional. [/quote] erm - dude a) people in glass houses... b) where's your reasons? how can he improve? what specifically dont you like? you expect help in your topic, so returning the favour is kinda the decent thing to do - and it's what we do here. posting a single, unconstructive negative comment like that just makes you look like an ass