redbullmarky
Staff Alumni-
Posts
2,863 -
Joined
-
Last visited
Never
Everything posted by redbullmarky
-
it's a good idea to get people on the move quickly. however, some parts of it build a query with input directly from a user ($_GET, $_POST) with no processing/checking - leaving it wide wide open for a few nice SQL injections. but yeah with a bit of work, a bit of compacting, etc, i'm sure it'll help a few people on their way.
-
[Howto] Apache2/PHP5/MySQL5 on Debian/Ubuntu
redbullmarky replied to Daniel0's topic in PHP Installation and Configuration
Daniel Any chance you know how to do similar on FC2? Current: - PHP 4.3.10, MySQL 3 - Fedora Core 2 - Plesk 7.6/Virtuozzo Control Panel need an update to: - PHP 5, MySQL 4.1 without losing stuff like GD, etc. Problem is I'm very very rusty when it comes to linux and i'll be damned if I can find a tutorial out there written in 'English'/laymans :) Cheers Mark -
it's very clean, very nice - so far. it's hard to critique more than that obviously due to the lack of content, but i have a few suggestions from where you go from here: - i love the colours. light & cool. i think a few "icons" on their respective sections would be great, in pastel colours. - the font and font colour could really screw things up, if you decide the wrong size, wrong font, or 'black' as the colour. a dark(ish) grey colour would work quite well, apart from areas that are already grey. i'm thinking along the lines of a couple of similar 'modern', 'pastel' sites i've seen recently. if i remember the links, i'll throw them over as it might make my points seem a little more valid. be very interesting to see what you do with it. even if you change the layout, the use of colour is very good so worth keeping.
-
when i'm not staring at a computer all day through work, i'm normally starting at a computer all night through writing/recording music. haven't done any for a while, though and never actually finished a song to more than a demo :) i have found myspace to be good for that side of things, mainly to get some good feedback from the general public rather than musicians. as a personal space? nah. not bothered about that. http://www.myspace.com/markgrainger
-
[quote author=steelmanronald06 link=topic=106824.msg433034#msg433034 date=1158094038] Ober, i think on this we can use implode and the mysql_num_rows function [/quote] would it be too much trouble to simply replace the code that inserts the   with code that inserts regular spaces? the line would break itself up then onto a new line...
-
there's literally loads of ways of doing it. here's one i used a while back. it's definitely not perfect, but it works: [code] function do_crumbs($baseurl, $page, $total, $totalperpage, $crumbwidth = 5) { // first calc the total number of pages $totalpages = ceil($total/$totalperpage); // crumbwidth is the amout of numbers to show on screen $halfwidth = floor($crumbwidth/2); $startpage = max(1, $page-$halfwidth); $endpage = min($startpage + $crumbwidth - 1, $totalpages); if ($totalpages > 1) { $prevlink = "Prev"; $nextlink = "Next"; // adding to a plain URL, or a URL with parameters already? $appender = stristr($baseurl, '?') ? '&':'?'; if ($page > 1) { $prevlink = "<a href='$baseurl{$appender}p=".($page-1)."'>$prevlink</a>"; } if ($page < $totalpages) { $nextlink = "<a href='$baseurl{$appender}p=".($page+1)."'>$nextlink</a>"; } echo "<a href='$baseurl{$appender}p=1' style='color:#000' class='invlink'>|<</a> $prevlink "; for ($cnt=$startpage; $cnt<=$endpage; $cnt++) { if ($page<>$cnt) { $thislink = $baseurl; if (stristr($baseurl, '?')) $thislink.='&'; else $thislink.='?'; $thislink.='p='.$cnt; echo "<a style='color:#000' class='invlink' href='$thislink'>$cnt</a> "; } else echo "[<strong>$cnt</strong>] "; } echo " $nextlink <a href='$baseurl{$appender}p=$totalpages' style='color:#000' class='invlink'>>|</a>"; } } [/code] just pass it: - the base URL (ie, the URL, with all its $_GET parameters except the 'current page' number - the current page number - the number of items per page - the 'crumb width' - that is, the number of pages you want to show on the screen. optional parameter that defaults to 5. the CSS class 'invlink' is my inverse link - ie, "do not put an underline on this link UNTIL i hover over it". play around with it. should work in its current state, although i'd prob recommend doing some work on it.
-
500 error when too many visitors running script
redbullmarky replied to dagnasty's topic in PHP Coding Help
as you don't have any logs, i'd ask your host to try and find out what's going on, as 500 errors for me normally occur from misconfiguration of apache config file and/or htaccess files, and never as a result of too much traffic or database load. -
[quote author=Crayon Violent link=topic=107804.msg432914#msg432914 date=1158083696] I guess I could give Opera a try and see if I like it better than FF though. [/quote] do it. first thing you'll notice is the speed - it's immense. however, whether it makes you want to keep it as your primary browser is a different thing, but not down to any particular 'bad' reasons apart from just "what you know". as i develop a few 'back-end' applications, i don't like the fact that you cant (as far as i know) override the context menu. i didnt like the lack of support for opacity (i think i have a beta version now, which DOES support it - however, i don't know whether it's supported yet in actual release versions)
-
yeah i have to admit i have a soft spot for opera, although it's not a browser i've adopted full-time. mine is Firefox: [list] [*]i like anything that makes others shake up their practices and raise their game. IE is probably so crap because, lets face it, they COULD get away with it as they had no popular competition really. it's like a government with a weak opposition. [*]tonnes and tonnes of extensions to make it work exactly how you like. i have coloured tabs (which is more useful than it sounds), alexa rank/google pagerank section, 3rd mouse button support, etc. [*]stable/reliable. very rarely crashes. [*]secure [*]trusty popup blocker never lets me down, as do the other "anti-intrusion" tools. [/list]
-
good move, me thinks. i think that before php5 there wasn't as much need to think about stuff like modular/OOP/etc, design but now... 448191, not sure how much you do/dont know in terms of the whole application side of things or whether you're still learning, but if you'd care to share a few thoughts on MSN at some point with regards to something i'm currently working on...i'll be posting possibly a fair bit in the new forum, but at this stage i don't necessarily want to make everything completely public. cheers
-
Making a JS menu appear on top of an embeded WMV
redbullmarky replied to Xurion's topic in Javascript Help
not 100% sure if it's the same issue, but worth a try... sounds like the same problem as when drop downs try to appear over the top of <SELECT> elements in IE. the way around it? there are a few methods, but the one that seems to work best is to slip an absolutely positioned IFRAME behind your drop down menu (ie, lower zIndex), and use javascript to resize the iframe to the size of the dropdown. here's an example: http://homepage.mac.com/igstudio/design/ulsmenus/vertical-uls.html -
due to the nature of dreamweaver, i'd probably try and discourage you from getting a dreamweaver specific book, and go for a PHP/MySQL one instead. All dreamweaver requires to learn it is a day of playing around with it and experimenting. here's another topic about good books: http://www.phpfreaks.com/forums/index.php/topic,58799.0.html Luke Welling/Laura Thompson's "PHP and MySQL Web Development" is one i'd seriously recommend, as it manages to get to the jugular very well and is suited to noobs and intermediate coders without being either patronising OR too complex. cheers
-
[quote author=448191 link=topic=107756.msg432626#msg432626 date=1158058185] While on the subject of boards and subboards, I renew my plea for an 'Application Design' board. I know I got turned down the first time, but hey, can't blame a guy for trying. I more and more see threads that could fit in this category, for example questions about modular design. [/quote] i'd go with this one, too.
-
Discussion - Do you separate your JS, HTML, and PHP?
redbullmarky replied to roopurt18's topic in Application Design
i don't understand people who say "don't put your code in the HTML!!!" and then go into the HTML, put all these {$name} and {$whatever} syntax all over the place and say "now THIS is how it's done!!!". really? ok, so now instead of putting PHP in the code, you're putting a totally NEW language in the code which i have to learn, which has to be parse by PHP, replaced with the CORRECT code anyway and then output as normal? and then i need to install an accelerator to get it to work at 'normal' speeds? great!!! i actually changed my approach a few months back on this one. previously, i used dreamweavers templates. i heard alot about 'templating engines', but when i read up on them, it was just disguising one lot of code with another set of syntax altogether, and you need accelerators etc to make up for all the parsing, etc, so basically i made my own that uses PHP instead of a whole new syntax. i have found it a lot lot easier to do things this way compared to the old way mainly because it's encouraged a lot more structure into what i've done, and because everything is handled through one single template engine, i can make vast changes in one go. for example, i have automatic word filters, caching, GZIP, etc, all of which can be turned on and off by changing one var. there are plenty more benefits to what i do, but at the end of the day, its just my new preference - not for everybody. the 'hardcore' will have you believing that the whole Model/View/Controller way is the "correct" and "only" way, but ultimately, the end results (the HTML) and the ease of upgrade/scalability are the only important things. best article i've ever read on this whole seperation/templating, etc is here: http://www.massassi.com/php/articles/template_engines/ -
^^^ the person above me was REALLY bored. jk. good post tho. does get a bit annoying seeing old threads getting bumped all the time - although i do think there's space on EVERY forum for at least one 'legendary', immortal thread full of nothing but smalltalk.
-
be wary of the scripts you find out there. for what they are, they're costly. the idea is using cURL to literally simulate a user logging in, going to their address book, and parsing the page. i think it used to be easier where the address book/contact list, etc, were available through an API but don't think this is the case any longer. also, you need to watch out for these scripts as they're not 100% reliable at all. when the afformentioned sites (esp. hotmail/yahoo) changed their layouts, structure, etc alot of these scripts literally just break. there are many BIG, popular sites that still have broken 'import' scripts since MSN/yahoo changed their sites. most reliable way is the old way, unless you're a dab hand with cURL and don't mind trying to keep the scripts up to date at every required moment
-
[quote author=SemiApocalyptic link=topic=107252.msg431156#msg431156 date=1157799622] I hear they can't got hold of the stuff in the states, although that's probably just hearsay. It's supposed to have hallucinogenic properties (from the wormwood), but I can't stomach enough of it to find out - The stuff buuuurns on the way down! [/quote] it's illegal in certain countries, for sure, and i think it's more controlled than general spirits. apparently it was a cause of Van Gogh's breakdown which led to him chopping his ear off, but it's generally alot more "diluted" these days. still, that stuff BURNS!
-
[quote author=cmgmyr link=topic=107252.msg431076#msg431076 date=1157778077] HAHA SA looks like we could have a pretty fun "programming party"...that stuff must be good. [/quote] you ever TRIED that stuff??? hell yeah it's good!!!!
-
Brand New idea never been done before - please review
redbullmarky replied to Nomax5's topic in Website Critique
[quote author=Nomax5 link=topic=106636.msg430889#msg430889 date=1157749317] I assume rightly or wrongly 800x600 resolution is for the poor and they’re unlikely to buy anything from my websites. [/quote] quotes like this show a bad attitude and make you sound like a tosser. before i started learning PHP, i was working as a recruitment consultant on a pretty good whack. my home computer was an 800x600 screen on a 486DX. Why didn't i buy a widescreen/TFT/etc monitor? didn't need one. wasn't developing sites then - i just wanted to browse the internet. i replaced it only 2 years ago with an Intel Celeron comp with a 1024x768 15 inch monitor. I still use that now. My Apple Mac Powerbook G4 - 1024x768, 12 inch monitor. Yet it's only fairly new. Cost quite a bit of cash, as anyone who has a Mac will know. many of my friends+family. couldnt give a monkeys about playing games on their comps, therefore don't need to "keep with the times" in terms of buying the latest computer with the latest this and that with a hi-spec monitor. they just need somewhere to type letters, do some browsing, keep some files stored, etc. poor? hardly. some of them could buy an office of computers, never mind a computer with a big monitor. never assume. if you're wrong, you look silly. if you're right, you look smug. either way, you lose. ok, so i harped on a bit and moved a little away from the point. just throwaway statements like that are just not good. -
ok i'll just stick to the carlsberg/fosters and cheap crisps. *walks away with tail between knees*
-
[quote author=businessman332211 link=topic=107342.msg430903#msg430903 date=1157750522] ..and when I did some reasearch on them, you can have a major load of issues when programming/designing with them. [/quote] yep - just like AJAX, PHP, Javascript, HTML, CSS, etc. you can have major issues with everything if you don't do it properly. otherwise - there's countless examples of frames that are used well, that far remove themselves from the glorious 90's
-
[quote author=oldmanice link=topic=107252.msg430808#msg430808 date=1157740917] redbullmarky, Have you drunk those two cans? [/quote] no, i left them there to ferment a little longer. only there's a breed of plant growing around the top of them now. of course i drank them. and quite a few since :) none today though. that's an old picture.
-
[quote author=businessman332211 link=topic=107342.msg430626#msg430626 date=1157729556] Normally I feel that way, and normally I do, but on this specific project, the website is geared towards college students from various colleges, because of this, by what they said most school computers have javascript disabled, so I have the potential to close out most of the users that will be using the site. [/quote] frames.....
-
[quote author=AndyB link=topic=107252.msg430631#msg430631 date=1157729797] And I thought you had taken out the ribbons and let your hair down :) [/quote] only for you, bigboy :)