« first day (888 days earlier)      last day (4355 days later) » 

02:09
quotes from terry, some of this is funny (some of it isn't) forum.templeos.org/…
> I do all my work natively. I'm not fond of source control -- needless bureaucracy for small teams.

I will not drink the cool-aid of lower productivity. I like to globally find-and-replace strings in all my code.
 
6 hours later…
08:20
Hello
Does anyone know how to add hook to register_settings function
@gowri ask on main site with details?
I want add new options after submitting
Yes I do
@rarst @toscho do you follow any PHP style guide(s)?
would love to know :)
I use WP one, toscho has his own
@Rarst Now I know what mods feel like... welcome to my first day of spam.
08:29
@kaiser hm? :)
@TheoneManis is there another WordPress with another WordPress coding style I don't know of? :)
@kaiser Thanks. Looks like I'll need Google Translation for that, but I'll give it a shot
@Rarst Normally I only get the "suggested edits" flags. Now I get the different flags for everything. Which basically is "low quality" > spam.
@Rarst Just confirming :P
08:31
@Rarst: I raised that question in main site. please have a look at that. If you can help me
@kaiser ah :) it's so convoluted which level gets what in mod tools so mostly everyone gave up on trying to remember it. there are requests on global meta for "see as level X" for mods
0
Q: add hook to register_settings function

gowriI have a login form in plugin settings API. After submitting form I want validate the login credentials throw web service. But I don't how to add that action hook for this specific form submit. If authentication is true, I want save additional values to options table with login details. To add th...

@gowri Mate... We got a feed of all new questions in the upper left corner. The only goal that you'll reach with instantly pushing it in here is that we're annoyed like hell. Don't do that.
@Kaiser: I apologies for that. Just Post a link to point my question to Rarst :(
@gowri Great idea... we all got that feed in the upper right corner. Even you. Rule number one in all forum, faq and chat systems: Don't push.
08:42
I apologized already. I thought you guys can give a quick tip. you gave me many times very helpful tips to learn earlier.
08:53
@Rarst Is WP now GPL2.0 or GPL3.0/3+ ?
@kaiser 2+
I wonder if one can simply change the license of some software. (old question of mine I could never really solve).
@kaiser yes, if all copyright holders agree to. which in WP case everyone who ever contributed to core.
Ah, yeah. Remember that I read about that some time ago. Thanks!
The only theme by Automattic on Creative Market costs 150$...
it's cross-promotion
>To show our support, we’ve jumped into the fray by offering for the first time ever a WordPress.com premium theme for self-hosted WordPress blogs. themeshaper.com/2013/02/26/further-creative-market
anu
anu
09:10
I've often considered a thought experiment of setting up a membership service where the subscription fees pay for the purchase of GPL themes (a single copy) and then makes the theme available to all members. I wonder what the reaction would be from the WordPress GPL crew if someone did that
@anu so late to the party :) people been poking this like years ago (more to be dicks than build much business). reaction is of course lectures on how wrong that is.
anu
anu
@Rarst Ah, that's kinda what I thought the reaction would be. Appeals to ethics and "that's not what the GPL is about"
Surprised someone isn't doing it, seems likes an obvious idea
why bother? can just as well push affiliate crap without getting shit for that
@anu Depends on how you pull it. If it wouldn't be too greasy ("we buy theme licenses together"-group), it could imho make lots of money. Would be funny to then spend the money on Envato shares :D
anu
anu
Yeah maybe - but I'd probably be tempted to join a service like that, so I'm surprised that someone hasn't done it. No legal issues, and being called an asshat by the WP community isn't the scariest thing in the world :)
@kaiser Yeah, it could be exactly like that - membership fees pay for communal purchase of 'premium" GPL themes that everyone in the 'community' can then use
09:22
This would be the instant death of the young creative market :)
anu
anu
Probably not - just another service that some would pay for and some would not - you can get most of the premium themes from Bittorrent or Rapidshare anyway (except you run a much bigger danger of downloading a theme with trojans/exploits etc)
And of course, the more negative publicity, the more subscribers :)
USP: We review every bought & shared theme and rate it - no bad code involved.
there is no business in being disliked by Matt, competition is too high
anu
anu
@Rarst :) I'd need to take a ticket and get in line
@kaiser and also group voting of next theme/plugin to purchase
@anu How about a "theme test drive club"? As well link to the original file so you can purchase it if you really liked the work ;)
anu
anu
09:30
@kaiser Hah - that's a nice little addition
The guy who creates new accounts to re-ask the Tumblr feed update question is ticking on my nerves …
Batman ?
Btw: Just chatting with Japh on G+ about the Creative Market issue.
Reminder: Always take the word WordPress out of question titles. Completely useless on our site.
Hi Kaiser ! I've done everything you said, but still the same problem. But I've found something : when I try to go on one of the other 1à pages, I have a "Page not found" !!! The permalinks structure is /%postname%/ . When I change the permalinks structure to default (page ID), it works well :s ! Have you got an idea ? — Cédric Charles 37 mins ago
Hate it when questions start with a vague problem, then switch over to another topic.
10:05
why can't people simply name their repos main branch master ...
master is for girls and gays. My main branch is mistress.
10:18
Ah, damn. I always call your main branches pussy.
10:33
Noticed a strange behavior: I init the static instance method of a bootstrap class during plugins_loaded on priority 1. Then I load all the necessary file on the same filter with a priority of 5. The callback is a simple require_once $file. When I then do the add_action( current_filter(), array( 'Class_Name', 'init' ) ); on the default priority of 10 (argument not added), it fails. But it works on 20.
It even works on 11...
@kaiser when you are trying to modify hook you are currently in there is a high risk of time space continuum rips
It's funny as the only combination that works is "pre 10 > post 10".
But this works reliable. Use it in all kinds of plugins since a long time :/
10:59
hmm any thoughts? WordPress install, no FTP/MySQL access, all I have is CPanel, running 3.4.2, upgrade to 3.5.1 fails, accessing the admin backend gives the upgrade database button, which when clicked takes a while then gives a wordpress logo and nothing else
all plugins disabled ( folder renamed ), disabled the theme similar method, so it should be running standard vanilla, htaccess cleared, WP_DEBUG turned on, no errors printed to frontend
done a repair on the database via CPANEL
no PHPMyAdmin or direct SQL access
Ask host?
@TomJNowell Maybe php error reporting turned off via php.ini?
not the case, when running 3.4.2 with WP_DEBUG and the theme active I got warnings and notices from plugins etc
though as mentioned, the plugins folder has been renamed and I've renamed the theme
now the frontend gives a white screen of death when visited
no errors or notices
I cant set errors on via htaccess
=/
try to get to Apache logs through cpanel, might be something there
nothing of note, just warnings that phpflags in htaccess aren't allowed
@Brady will love this
11:13
ah well error logging is definetly working
efine('WP_ALLOW_REPAIR', true); in the config gives a misisng funciton error about no 'efine' function
@TomJNowell faved. just to make sure you spellcheck in the future ;) no more misising funciton
yeah the repair said it went all okay, no change in upgrade results
success phpmyadmin access
I just went from "this looks interesting" to "die in a fire" in record time. web frameworks that abuse and break basic URL mechanics are delusional
11:30
$term_list = get_the_term_list( $post->ID, 'store', '<p class="excerpt"><strong>', ",", '</strong></p>' );
@toscho Shouldn't it be something like that inside the if? Or just save it into a var and then echo it inside the if ( ! empty( $term_list ) AND ! is_wp_error( $term_list ) )?
don't understand that
No need to pass a string around that might not be used at all.
What passing around of a string?
>_< this thing is crazy
the third and the last parameter for get_the_term_list()
get_the_term_list() returns empty anyway if no terms could be found.
ok, need to check that. might be wrong.
11:36
it can return an instance of WP_Error
$terms = get_the_terms( $id, $taxonomy );
yeah, it does return false/WP_Error. So where's the "pass a string around"?
if ( false !== $term_list AND ! is_wp_error( $term_list ) )
    echo $term_list;
@userabuser Thorax for you
@kaiser If you use the parameters of get_the_term_list() the string is assigned to a variable and passed into the function. Waste of memory.
@toscho sub-nano optimisation
readable code
you .... exactly _you_ ... are able to write everything in a readable way.
but nvm. this is the wrong edge to argue about code for a question that is bogus anyway.
11:51
0
Q: Find not-accepted answer

revoI had answers on a question that got unaccepted, but I can't find the parent question url from statistics shown on my profile page (not listed). How can I find them so?

12:04
SourceTree is quite nice, although need that Mercurial support...
>_< I get everything working on 3.4.2 better than it was when I started and go to update some plugins and walk away for 1 minute. When I return the client has logged in and ran the autoupdater putting it all back on 3.5.1, with the broken upgrade database thing back
where can I find the database changes between WordPress versions?
@TomJNowell here
0
Q: Where can I find the database changes between WordPress versions?

Tom J NowellGiven vX and vX+1, how do I find the difference between each versions database schema?

given linked answer, a nice easy question for someone
12:23
@kaiser Thanks mate, another framework for me to learn :D Looks much easier to get head around than ember, although I am finally beginning to understand that. I think for simpler apps that backbone might be the way to go... I'll give this a run
@userabuser cough the one I was just bitching about
calls itself "framework to build large scale web applications", doesn't handle opening links to features in new tab #facepalm
@Rarst IMO backbone gets unwieldy for large scale apps... more repetition.
the joys of OOP - knowing the data you need is right there in protected property and being unable to get it.
protected property is laughing at you...
12:42
dragging QP into glorious static parser future is not going smoothly
javascript, dear javascript. you're my programmatical hell on earth.
@Rarst the 5 year plan not going as planned?
plans are for organized people
currently need end line information so I have range for source...
Uncaught TypeError: Cannot call method 'map' of undefined
Somewhere in a JS source file on line XX. Now I tested the jQuery plugin in its demo page with the exact WP jQuery version 1.8.3 and it works. In WP I use it, register all styles and scripts with all dependencies and I get this error. How shall I go and debug this one?
13:06
Hello, smart people! Top of the morning!
@kaiser Opera's error log allows you to track back the source of an error.
Can someone kindly tell me what this means? function bp_core_get_username( $user_id, $user_nicename = false, $user_login = false ) {
@Aliyah You have to call the function with an user ID like bp_core_get_username( 123 );
aah now i see. I just dont really understand how the whole function works. I was trying to switch the user's username with their nicename instead
@toscho Do the same but in Chrome. My problem is more of the topic: Why the heck doesn't it work if everything is loaded in the exact same order as I can see it working in the local demo? :P
Another annoying problem: pickadate.01.default.css gets registered and enqueued. Both work: dumped wp_style_is() successfully inside method, but nothing gets added to the screen. Scripts work and appear. No idea what can go wrong here. h...elp!
13:20
I need help..not just the Dr. Phil kind either. I was trying to switch something around in this function but im messing up. If I set the first line of the function to "true", it will return the user ID # as the slug. Im trying to get the user's nicename(nickname) as the slug instead.
If someone could kindly take a look at this function for me I would be ever so grateful :)
0
Q: Filter BuddyPress Member Domain Slug

AliyahBuddyPress uses the Username(login name) as the member domain slug. (mysite.com/members/sarah) I would like to filter the way BuddyPress handles this and set it to use the Nickname edit:or more preferably, a custom profile field instead. Here is the code for returning the user's slug function b...

> BuddyPress uses the Username(login name) as the member domain slug. (mysite.com/members/sarah) I would like to filter the way BuddyPress handles this and set it to use the Nickname edit:or more preferably, a custom profile field instead.
$user_nicename = false have you tried passing in true rather than false?
@Aliyah The login name is something that wont change. If you take something that can change, then you have a moving target. For e.g.: User has a bookmark, changes the nick name >> Bookmark stops working and says "My site is gone! Panic! Red alert!".
also, you provided a function but you did not show its context, aka lets see the code that calls it
@Aliyah this suggests that you're asking for a solution to your solution. Describe the original problem, what you have and what you expected
Well Tom, ok. I'll spill the beans
13:26
Ok, now back to my problem :)
sorry kaiser, I will wait. My matter is so trivial :(
@Aliyah this is what we call providing context e.g. "and then it broke, I tried modifying this function, but it doesn't work, what do I do?" <- can you tell what I'm asking? I cant, so why would you?
@Aliyah Simply don't do it. You will move yourself into support hell.
@Aliyah make the client aware what they're asking for might seem trivial, but it will take a non-trivial amount of time and effort
@Tom - original problem: I used a function that removes the username from registration completely and user a hash generated from the email address as the username
13:28
make sure they're aware you're perfectly happy to put in that time and effort, and that you will be charging them for it
and it will BREAK with a 110% chance
stress the charging part
tell them that they better get a domain name starting with 404
@Aliyah and now this hash is being displayed in the author archives etc?
why don't you generate it a different way
yes the hash is being displayed as that member's slug
13:29
e.g. instead of a hashed email
use a title sanitised version of their name
mysite.com/members/567656676767cfdcfcccccccr
so Tom Nowell becomes tom-nowell
Did someone set me on the ignore list?
there's not a lot you can do for the users already in the system
@kaiser if we had, we wouldn't see that message and you wouldn't know
I was tryin to change the slug for new ppl who sign up
13:30
@Aliyah then you need to change the code that does the email hash bit
ofc we cant see this code, and as the author you would be the expert on the subject
add_action( 'bp_core_validate_user_signup', 'my_theme_validate_user_signup' );

function my_theme_validate_user_signup($result)
{
unset($result['errors']->errors['user_name']);

if(!empty($result['user_email']) && empty($result['errors']->errors['user_email']))
{
$result['user_name'] = md5($result['user_email']);
$_POST['signup_username'] = $result['user_name'];
}

return $result;
}
Question: What happens when former Tom Nowell wants to now get called Tom J Nowell? Answer: example404.com/tom-nowell becomes a 404 as it doesn't exist anymore and .htaccess doesn't have this entry and the user page now is example404.com/tom-j-nowell.
@Aliyah [Ctrl] + [A] > [Ctrl] + [K]
format code.
I'd advise your entire approach needs to be changed. Removal of the login username field is not particularly feasible
especially since a user can already change their email address, making the hash broken
but tom...*sigh*
But now back to my problem :D
13:33
@Aliyah why was the user login field removed to begin with?
because the usernames were allowed to have spaces which wordpress converts to dashes. I didnt want to see site.com/members/turkey-bacon
it makes the @mentions process weird
@Aliyah then remove spaces
....*slaps forehead*
@Aliyah slaps backhead the next time to avoid slapping forehead. Agree? ;)
..but why?? my backhead is tender!
13:38
Makes brain moving to forehead so it's closer to eyes. Then things are harder to oversee.
lol
I am ashamed at my incompetence
I have no place in the wordpress world. I might as well crawl back to static html
@Aliyah this kind of attitude is unnacceptable behaviour. You are hereby sentenced to 30 minutes of php.net
@TomJNowell as head of judges I vote for 1hour.
What! An unfair punishment indeed!
Lesson one: Arrays.
13:45
@Aliyah insolence may cause an extension
So to say array_push( $punishments );
yes?
Im there
very good, we will want a report on your progress this evening
13:50
Are you guys robots! Im looking right at the page but Im simply befuddled!
The only process over here is @toscho which is our community bot.
It will probably take years before I can understand this array business and how to use it
@Aliyah Start with this one. Then head over to functions.
Ok thats much friendlier. Perhaps I dont have the groundwork laid out for me. Did you learn php on your own or in a university somewhere? I would assume that you were once new to it and perhaps confused by it kinda like me
13:55
but you guys are talking php like its your first language
i know what it is. Im a girl. By default, I am deficient in this area. Php is not for ladies. Much like trying to understand football, php is a man's language
so there!
@Aliyah ...that's nonsense
how many women do you know that knows php like you guys?
-1% ?
what it has to do with percent? I don't know many female wrestlers, but they exist and can break me in half :)
lol
wrestling is easier than php
certain ppl are built for certain things. I make observations and draw pretty decent conclusions, not stereotypes
anu
anu
What a load of rubbish - I'm not even convinced you are female.
14:01
anu? thats why my profile pic has a heart on it?
and says 'i love being a mom' :p
anu
anu
So if I do that, I'm automatically female?
@anu agree. no woman would talk that way about women
anu no, but IM female because i just gave birth to a boy 7 months ago
rather than saying what you think a woman would or wouldnt say, lets look at the facts
anu
anu
Actually, I'm about to put you on ignore, so it's fine
People who know PHP very well are mainly men
I have never seen a single woman in this chatroom besides me
dont get emotional, its my job. just tell me my facts are farfetchd
14:05
wander around twitter, there are plenty very high profile females in WP circles
Perhaps I am unaware because I dont have a twitter account lol
Ipstenu, Helen Hou-Sandi, Lisa Sabin-Wilson, Sara Cannon, etc, etc
I have seen a few php saavy women on a few blogs before
What is this discussion? Please @Aliyah, don't annoy the hell out of us. Go and take one of those online courses. You'll get around the basics in 2-4hours. Promise.
@kaiser I was just saying that the majority of developers are men and there arent to many women out there who are php gurus
14:07
Ok. Got that point. Now, dear girl, head over to that course :)
sigh yes sir ..
ok ok ok one more question please
@Aliyah yes, there are black people who know PHP very well.
answered?
huh! no i didnt say black people! I said women!
no kaiser i was going to ask...how do i study the php website to derive benefit from it?
i can read all day but its still over my head
i dont know how to learn whats on the pages lol
@Aliyah again, try this codecademy.com/tracks/php I hadn't done PHP one yet, but did other tracks and they are good form
14:10
php.net is reference
doh! no wonder its hard to learn from lol
Im truly sorry if anyone is annoyed with me and my 'observations'. I really meant no harm. I'll suck it up now and go start a course in php.
@Aliyah don't worry about it, just bunch of prickly types in this chat room :) we don't mean it
...by prickly types he means Europeans
@Aliyah I remember when I gave birth, I didn't think I had the equipment to do it but I was proven wrong
=o where you in here the day you gave birth?!
Ahehe! You wouldnt stand a chance! You wouldnt last 30 minutes with contractions
No I was at the hospital, unfortunately. I should have been at home giving birth but I understand people these days dont believe in home births
14:23
@Aliyah IIRC people tend to die unless the necessary equipment and stuff is there should things go wrong
that and I imagine numerous towels would be utterly ruined
I agree Tom..but I dont agree with the birthing business in america
the way we handle birth here is foreign to many places in europe
when I was trying to get visa for wpcs google showered me in ads offering to give birth in us :)
there are a lot of things not to agree with, my sisters all felt super intimidated over the whole bottle vs breast feeding thing
@Rarst did your baby ever reach america?
lol
omg codeacademy is awesome!.length
I have hundreds dollars worth of books bookmarked (tech primarily) :\ I will probably end up just deleting bookmarks rather than starting to buy and read all of this
14:35
@TomJNowell hehe
@Rarst I have hundreds of dollars worth of books on my hard drive that I have never read, so take it from me, you're probably safe to delete those bookmarks.
@userabuser this is sacriledge, I sentence you to 2 hours of php.net for your infractions
@TomJNowell I'm on parole from php.net, you know what it means if I get sent back there...
15:06
@AdamBackstrom I dont believe I've noticed you here before, hello!
Hi @TomJNowell. :) I haven't been very active in WPSE lately, but @Rarst reminded me of the chat on Twitter.
Haha, yes, you've found me out. I recently converted my WordPress blog to a static site.
for those few who aren't on twitter all day and don't see this link posted umpteenth time since morning workingwithwordpress.tumblr.com
if kaiser reposts one animated gif here I swear he is going back into ignore
0
Q: Helping low rep users, and chat

s_ha_dumA few times now (it is about to happen again), I have been trying to help a low rep user-- usually rep 1 or so-- with a problem and am getting nowhere in the comments. The comment form starts to complain about conversation in the comments and offers to move the discussion to chat. I'd love to do ...

 
2 hours later…
17:17
@Rarst why ... did ... you ... link ... DAT !?!
@kaiser hm? why not?
@Rarst If you want to ignore me: Do it. But don't push me, 'cause I'm close to the ...
post them on twitter or g+ or whereever :) just not here inline
@Wyck is finally the one who knows old school. Ukraine seems to have no radio. :D
17:21
@kaiser sometimes it makes me wonder How I keep from going under
@Wyck aha ha
I hadn't listened to radio in a... long time. I had favorite station and then they changed their theme to chanson
and I bet it wasn't Hip Hop before
I still listen to online radio, not a huge fan of those algorithm sites that learn what you "like"
my country is considered undeserving of "those" sites
17:32
Let's hope this Message reaches the Ukraine.
18:18
@AdamBackstrom - Thanks for showing me that! A female coder = Cooler than a polar bear's toenails!
ROFL @ kaiser & wyck
18:37
      <?php
    $things = array("Talk to databases",
    "Send cookies", "Evaluate form data",
    "Build dynamic webpages");
    foreach ($things as $thing) {
        echo "<li>$thing</li>";
    }

    unset($thing);
  ?>
What does 'unset' do?
destroys the variable
so $thing is set to NULL
Ah. So..its kinda like 'exit()' ? like um..discontinuing the function?
not really, it sets the variable to null, exit terminates the script from running
How come the variable was unset, though? Would it somehow interfere later on?
Is it because you may want to use $thing in another function afterwards?
(pardon me please, im taking a small php course and i dont see an explanation)
it a loop it it typically used to free up memory for the gabage collector, because the variable is no longer stored
18:47
ah now i get it. thanx
unset( $GLOBALS );
...so unsetting globals would render all $GLOBALS null..and they wont work anymore?
they will work, but all globals prior to that point will no longer be there as they'll have been unset
or better yet, try it
generally it is a good idea to clean up after ones self
wether your talking about personal heigeine, or code heigeine
lol
"they will work, but all globals prior to that point will no longer be there as they'll have been unset"
no longer be there?
(i almost got it..im so close!)
im confusing myself. i was thinking that unsetting the thing would make it disappear from the rendered page o_o
i almost understood until you said 'no longer be there' sigh reminds me of my cat. she 'no longer be there' .. at my house because she prefers to run the streets :-(
it's kind of like this
19:03
ok ok NOW i understand. Removing all traces of the crime
my analogy success rate is about 50/50
the function still ran but you no longer need it so you clean up after it
19:15
<?php
            echo "Oh, the humanity!"
          ?>
without a semicolon, the output repeats. How come?
must have been a glitch, gone now sry
@Aliyah why would it do that? Does your browser listen to the other end "using our psychic prowess we have determined that PHP is being used. We will now monitor all usage of unset in the remote server and censor the parts of the page that were generated using variables that unset has been applied to"
@Aliyah without surrounding code this question cannot be unanswered
once something is sent to the client, it has been sent
i see now, pardon my misunderstanding
unless you have told the other end to listen and wait for an 'undo message', and you then deliberatley send an undo message, it won't be ammended
unset is similar to the delete keyword in other languages
e.g. this C++:
TestObject* test = new TestObject();
test->method();
delete test;
test->method(); // this will error, test has been deleted and no longer exists
right i see the logic there
another useful analogy may be that unset could also be called puthisvariablescontentsintheincineratorIdontneeditanymore()
19:28
since you put it that way, i fully understand what unset does :)
"For instance, it's true that 6 is less than 7. How would we write that in PHP?" Should i echo this? <?php echo 6 < 7; >
omg slaps forehead i got it. im such a noob
Has wp_get_attachment_image_src been changed anything in the past WP updates?
@ChristineCooper you can browse revisions on trac core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/… but I don't think so
line 508
@ChristineCooper why do you ask?
if it has changed, it will have been to fix bugs, it should work now as it was expected to work previously
Thank you, some part of my code is not functioning accordingly and I am suspecting that it may be either changes in the WP core or (most likely) fault in the code. It is related to the fallback system, where the image size is sent to image_downsize() and then to image_get_intermediate_size()...
@ChristineCooper in this case a liberal dose of assert calls would be good
granted I should use it more myself
19:55
Im stuck in my practice php course
whats wrong with this? switch ($fruit) {
    case 'Apple':
        echo "Yummy.";
        break;
}
switch ($fruit) {
    case 'Apple':
        echo "Yummy.";
        break;
}
Error message: "Oops, try again! Make sure you add the default case!"
@Aliyah that is not a normal error, but your missing default:
it seems
would be funny if real errors added ..Oops..
you were right. i put default:echo"jhkh"; and it passed
you must be using some sort of emulator or program
the error is from a course on codecanyon
yea
i mean codeacademy lol
oh so they have a php section now
20:09
ive gotten all the way to 'advanced switching' and i have to write my own switch statement
do I have to define a variable first for my switch?
yes, your switch needs to check something
hmm this is challenging
@Aliyah no
switch ( TRUE )
{
    default:
        echo 'foo';
}
works
aargh!
    <?php
 $myNum=5;
 switch($myNum){

 }
?>
am i wrong for starting my switch like that?
no, that's okay
20:18
well it depends on what you're trying to do
@Aliyah BTW, there is a PHP chat on Stack Overflow
Thanks Toscho!
Oh thats so cool I never knew of that place
I thought I could just define$myNum=5 and then try to make a switch function echo something if myNum equals 5, is less than 5 or greater than 5
switch is overrated
but perhaps..i dont fully understand how to use switch. Im reading on php.net that its similar to an if, elseif, else statement but..
if you have to compare just three cases, use if () elseif() else
20:26
I suppose I dont know the scope of case..thus, I will remain stuck on this lesson for a while
Its a php course im in right now@toscho they wont let me go to the next level until i learn how to use a switch :(
switch is useful to compare strings
$color = 'blue';

switch ( $color )
{
	case 'red': // $color === 'red'
		print '#f00';
		break;

	case 'green':
		print '#0f0';
		break;

	case 'blue':
		print '#00f';
		break;

	case 'grey':
	case 'gray':
		print '#999';
		break;

	default:
		print '#000';
}
Yay! Thank you toscho!
20:54
can I fork that on github
lol..wyck? :-D
uh no.. don't get me fired;)
I want to display an image (defined by me) next to a user who meets a certain criteria. Should I make a custom field for this and then an if else statement?
21:23
what is this custom criteria?
21:48
hah struct.it can query all domains on wordpress.com
or most hosts for that matter
pretty dangerous map

« first day (888 days earlier)      last day (4355 days later) »