Philip
Staff Alumni-
Posts
4,665 -
Joined
-
Last visited
-
Days Won
20
Everything posted by Philip
-
The stuff we miss, a user usually reports and it is gone within a 10min of being posted. It's been like this on any site I've worked on.
-
Unable to access the search daemon
Philip replied to peppericious's topic in PHPFreaks.com Website Feedback
Should be fixed - sorry about that! -
1.) How do I show/allow Members who made a Friend-Request and was "Accepted" by both parties, "Terminate" the Friendship? Via an "unfriend" button, while viewing that friend's profile. 2.) How do I show/allow Members who received a Friend-Request and was "Accepted" by both Parties, "Terminate" the Friendship? See #1. 3.) How do I show/allow Members who made a Friend-Request - which is still "Pending" - change their mind and "Terminate" the Friendship-Request? Via a "Cancel" button, while viewing that friend's profile. 4.) Do I need some "super" view that shows every a.) Outgoing Friend-Request, b.) Incoming Friend-Request, c.) Accepted Friend, d.) Declined Friend and all of the states for each of them?! (This is where things get *crazy* if you do every combination?!) No, varying pages based off of users "filters." E.g. I select "View all friends" - that shows all of my accepted friends. "View friend requests" - shows your current incoming (and outgoing if you want) requests, as well as an option to view declined. Take a look at Facebook - they do a great job organizing this.
-
This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=360406.0
-
I have to agree with most of the points above. With the amount of data on the page and since the client is wanting it all on the same page, I'd highly suggest looking at http://themeforest.net/category/site-templates/personal for ideas. That's what I use on my portfolio (with some tweaks) - but it is technically all one on HTML page and when JS is disabled, the user can just scroll down and see all of the information neatly.
-
Help testing my site for vulnerabilities
Philip replied to greens85's topic in Beta Test Your Stuff!
If you're still looking for admin verification - please PM me. -
Yeah, the main thing it fails to mention is once you have a king of a genre... you better have a damn good idea / website that sets you apart to even think about it
-
$string = preg_replace_callback('~([a-z]+)(\d+)(?:-[a-z]*(\d+))?~i',create_function('$m','return (isset($m[3]))?($m[1].implode(\',\'.$m[1],range($m[2],$m[3]))):$m[0];'),$string);
-
I know what you are saying for strings and such, but I don't think it is really necessary. <?php class String { protected $_string = ''; protected $_length = 0; public function __construct($string) { $this->_string = $string; $this->_length = strlen($this->_string); } public function __get($property) { $property = '_' . $property; if(isset($this->$property)) return $this->$property; } public function __toString( ) { return $this->_string; } } echo (new String('testing'))->length; // '7' echo (new String('testing')); // 'testing' // vs... echo 'testing'; echo strlen('testing'); In any case, hopefully you've gotten it through your head that OOP is NOT a one-size fits all solution.
-
Please wrap tags around your code next time. Also, if you want help it is highly suggested to post relevant code only.
-
Since I do a lot more JS work, I commonly use debuggers that let me step through the code (such as chrome/IE's dev tools, firebug + omnibug (specific to web analytics.) We also use packet sniffers like Charles proxy / Fiddler2 (my favorite) to inspect the urls / use local files on live sites to test against client sites where we don't have access to upload / push new files.
-
Please see http://www.phpfreaks.com/forums/index.php?topic=360081.msg1702782#msg1702782 to continue this thread.
-
Yeah, this is a case of lawmakers sticking their noses where they don't belong without consulting the proper experts. I still have yet to understand what people complain about with cookies. "Oh noes, sites track me so I get more relevant ads! Nooooo!"
-
$str1 = new String("This is a String"); $str2 = new String(" and a concatenated one at that!"); $string = $str1->append($str2); $system->output($string ->toupper()); // "This is a String and a concatenated one at that!" It's the way of the future man.
-
Interesting - I have not heard of them before. I will need to check this out, cheers!
-
Yeah, I've used Selenium before. nifty stuff!
-
Yeah, it's in the works
-
I very well could be missing the point. In my humble opinion I don't see how his scales any better than mine. Actually, I do; when a site does not have consistent layouts or html markup his method comes in a lot more handy. I'd be curious to see what he has to say though
-
I guess the impression I get is that my 'normal' way of implementing something is "wrong" according to him. This is an example of my normal markup for a news article on page: <article class="news"> <header> <hgroup> <h3>Article Title</h3> <h4>Article Subtitle</h3> </hgroup> <time datetime="2012-05-12" pubdate>Tuesday, May 22<sup>nd</sup>, 2012</time> </header> <p>Like you, I used to think the world was this great place where everybody lived by the same standards I did, then some kid with a nail showed me I was living in his world, a world where chaos rules not order, a world where righteousness is not rewarded. That's Cesar's world, and if you're not willing to play by his rules, then you're gonna have to pay the price.</p> <figure> <img src="foobar.jpg" alt="Foo bar"> <figcaption>Foo bar</figcaption> </figure> <p>You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.</p> <footer> <section class="vcard"> <header> <h4>Author</h4> </header> <address> <a href="/user/foobar">Philip Lawrence</a> </address> <p>In facilisis scelerisque dui vel dignissim. Sed nunc orci, ultricies congue vehicula quis, facilisis a orci. In aliquet facilisis condimentum.</p> </section> <nav> <header> <h4>Relevant Articles</h4> </header> <ul> <li><a href="/goo">Foo about goo</a></li> <li><a href="/foo">Goo about foo</a></li> <li><a href="/boo">Boo about goo</a></li> </ul> </nav> </footer> </article> With that HTML, I'd use something like the following CSS for it: .news > header { background-color: #aaa; } .news > footer { background-color: #888; } .news .vcard > header { border-bottom-color: #999; } /* LATER */ .vcard { /* general vcard info */ } .vcard > header { border-bottom: 1px solid #333; } However, I feel like he would want a lot more classes throughout my html, to the point of something like this: <article class="news"> <header class="news-header"> <hgroup> <h3>Article Title</h3> <h4>Article Subtitle</h3> </hgroup> <time datetime="2012-05-12" pubdate class="news-time">Tuesday, May 22<sup>nd</sup>, 2012</time> </header> <p>Like you, I used to think the world was this great place where everybody lived by the same standards I did, then some kid with a nail showed me I was living in his world, a world where chaos rules not order, a world where righteousness is not rewarded. That's Cesar's world, and if you're not willing to play by his rules, then you're gonna have to pay the price.</p> <figure class="news-figure"> <img src="foobar.jpg" alt="Foo bar"> <figcaption>Foo bar</figcaption> </figure> <p>You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.</p> <footer class="news-footer"> <section class="vcard article-vcard"> <header class="article-vcard-header"> <h4>Author</h4> </header> <address class="article-profile> <a href="/user/foobar">Philip Lawrence</a> </address> <p class="article-bio">In facilisis scelerisque dui vel dignissim. Sed nunc orci, ultricies congue vehicula quis, facilisis a orci. In aliquet facilisis condimentum.</p> </section> <nav class="news-footer-nav"> <header> <h4>Relevant Articles</h4> </header> <ul class="news-footer-relevant"> <li><a href="/goo">Foo about goo</a></li> <li><a href="/foo">Goo about foo</a></li> <li><a href="/boo">Boo about goo</a></li> </ul> </nav> </footer> </article> Which would in return, change my CSS to something like: .news-header { background-color: #aaa; } .news-footer { background-color: #888; } .article-vcard-header { border-bottom: 1px solid #999; } /* LATER */ .vcard { /* general vcard info */ } Of course, I'm likely over exaggerating this but I feel like my way makes the user write clean HTML and his makes the user write clean CSS. Personally, I think HTML should be cleaner since: a) usually there is a lot more HTML than CSS over a website (thus from a size perspective, 3kb extra per each page to add in extra classes < 3kb extra per CSS file for longer selectors) and.. b) CSS is an addition to HTML - just like pictures are additions to a novel I do see where he is coming from, in that it allows for more extensibility - but with correctly written HTML you do not need to worry about this.
-
Mmm, I have to disagree with some of the code practices / thoughts butttttt ... I'm lazy atm to write a full-on comment on it. Maybe later tonight after a few beers
-
This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=359652.0
-
Which directory structure / naming convention do you prefer?
Philip replied to trq's topic in Miscellaneous
I agree, I like the current more than the original