« first day (623 days earlier)      last day (4321 days later) » 

12:35 PM
0
Q: Deactivate plugin upon deactivation of another plugin

Peter GibbonsWondering if its possible to deactivate a plugin in the deactivation code of another plugin? IE. i have a widget that i'm adding via its own plugin that won't function if the 'master' plugin isn't activated...

 
@StephenHarris You have a very bad habit of writing big answers :D
 
@AahanKrish Yup, I need to practise conciseness.
 
haha! (kidding!)
 
12:52 PM
@AahanKrish I think you have point :)
 
1:03 PM
@StephenHarris you are so close to getting into the mod power clan, wow, that was quick!
 
@AahanKrish 800. It's quite frustrating :)
 
right... as for me 101 more to get editing rights... ;)
exciting
 
@AahanKrish just keep answering questsions. You've answered 43 and got 899, that's an average of over 20 per question - that's pretty good going.
 
And once I learn PHP, my target is to answer at least 3 good questions a day
(good = rather challenging)
that way I can get more eyes on my code => I get a chance to learn to code better ;) How selfish of me!
 
1:25 PM
@StephenHarris just two weeks away. :)
 
@toscho 2 weeks, is that what I'm averaging? 400 a week?
 
judging by my average. wait a minute …
See here for average rep per week.
@Milo made some progress since we convinced him not to hide his answers in comments anymore. :)
 
@toscho that's rep for last week - fluctuates quite a bit.
 
@StephenHarris Take the last month.
 
So I've got rep of 9216 over 34 weeks in total. That gives me 271. But that's misleading, since ti doesn't take into account that the trend of rep/week is (generally) upwards.
 
1:32 PM
no, it isn’t. depends on your activity.
 
Stephen gets rep lessons from Thomas
 
@toscho well yeah - but my activity has generally been increasing - or at least my ability to answer questions has :). Granted I've had a droop recently - but the second 4 months would outweigh the first in terms of rep.
A better way might be to 'weight' the averages - so that how you did last week matters more than 8 months ago. Or you might want to weight according to the month of the year - for instance if you're a seasonal contributor :)
 
What’s interesting: even the effect of many old answers wears off after a while. See Jan Fabry for example.
He is still getting bagdes like crazy but the rep doesn’t increase much.
 
I'm pretty sure this guy's website is practically made by WPSE :)
1
Q: Returning search results by relevance, including Custom Post Types

duncThe default WordPress search setup isn't really working for my website's setup. I have two custom post types (species, glossary) which I'd like to search for, as well as the standard post type. If possible, I would like to order them like this: If user searches for a species of fish, i.e. Sat...

 
he has a lot interesting unanswered questions.
oh, no, wrong
my fault, remembered this wrong
I had a strange idea recently: a plugin that creates (simple) plugins. For example to remove a filter or an action. Or for a CPT.
 
1:52 PM
@toscho a plugin that creates another plugin? You ought to be careful, if they develop self-awareness...
 
that’s inevitable anyway
the capital pee is just the beginning. :)
 
2:21 PM
Ohhh, look at this jsfiddle in Chrome.
 
2:46 PM
function set_stylesheet( $stylesheet ) {
	$this->stylesheet = $stylesheet;
}
INSTRUCTION: "Set to empty to just remove the default stylesheet." — what does it mean I should do?
 
NULL?
 
@toscho Like this?
function set_stylesheet( $stylesheet ) {
	$this->stylesheet = NULL;
}
 
try it
 
:P
@toscho no, not working
The instruction is vague
 
 
2 hours later…
4:58 PM
@AahanKrish __return_zero(), __return_false(), __return_empty_array(), __return_null()...
 
Good $time_of_day
would serverfault.com/questions/403733/… have a better home here ?
flag if you want it.
 
@kaiser You mean, for instance, like this?
function set_stylesheet( $stylesheet ) {
	$this->stylesheet = __return_zero();
}
 
@Iain DB queries for taxonomies are just slow in WP. The asker has to inspect the queries and to tune the DB (indexes, caching etc.). I think, that’s more a general DB question.
 
@toscho cheers
 
5:56 PM
@AahanKrish - I think the order is right
0
Q: How to conditionally hide author name on Single.php if category is "news", otherwise if category is something else display author name?

MattI would like to be able to conditionally hide the author's name on the Single.php if the Category name is equal to "News" and otherwise if the category is something else hide it. How do I go about doing this? The code I have below does not seem to work: <!-- header.php --> ...

But he's using the wrong function
 
@StephenHarris Oops! I misread it. I thought he wanted to show it on "news"
deleting my answer... you can answer it :)
@StephenHarris He need not echo it, right?
simply <?php get_the_author(); ?> should do it I think — he said he just needs the name (no mention of link)
 
@AahanKrish no I think get_the_author returns, but doesn't print
 
Then maybe <?php $author = get_the_author(); ?>
 
as a general rule get_the_ returns and the_ prints
 
Oh, okay
@StephenHarris A general question: Will I be touching subjects like caching, HTTP headers, etc when learning PHP (from books)?
@StephenHarris good answer by Milo too in_category
 
6:06 PM
@AahanKrish no idea I'm afraid... never learnt PHP from books :)
 
Oh... 8-|
 
I think this could be close voted for several reasons....
0
Q: Wordpress 3+ Theme Tutorials/Books

maxi looked a lot in the internet but did not really find what i was looking for. Does anyone know a good tutorial or book where to learn how to code a wordpress theme for WP 3+ with not only standard features but a bit deeper code information? thanks a lot!!!

 
"not really a question" would be everyone's favorite?
 
not constructive. any answers would be too localised. And yeah, I would argue - can't be answered probably in it's current form.... or any form
 
right...
 
6:12 PM
@StephenHarris done
 
6:48 PM
 
7:54 PM
@toscho I don't get the fuss about a plugin that tells you to install other plugins...
 
@StephenHarris welcome to the not-in-the-cult club
 
@StephenHarris plain advertisement for wp.com’s VIP
The recommended VIP Scanner spreads more notices than my worst themes.
 
 
2 hours later…
9:37 PM
Strange … looks like the garbage collector was already running. We are at 84% answer rate.
 
9:49 PM
@toscho man, you are so much better at moderating this thing than I am :)
 
Nope, I just have a fetish for numbers.
 
10:23 PM
I wonder if I should finally dive into git-svn. I could publish my 300 plugins on wp.org then. That should be fun. :)
 
@toscho whats the problem? where's the diving part?
 
I hate SVN. Even in Git. It’s a personal aversion.
 
well yeah. just gotta find a smooth process.
actually i have yet to to do anything in that direction
i think git svn dcommit was the thing to know or something
 
git-svn is a simple conduit for changesets between Subversion and git. It is not to be confused with git-svnimport(1), which is read-only. git-svn was originally designed for an individual developer who wants a bidirectional flow of changesets between a single branch in Subversion and an arbitrary number of branches in git. Since its inception, git-svn has gained the ability to track multiple branches in a manner similar to git-svnimport. git-svn is especially useful when it comes to tracking repositories not organized in the way Subversion developers recommend (trunk, branches, tags directories).
Just in case someone didn’t know it: manpages.ubuntu.com can be embedded in chat. :)
Which is not fair, because our answer rate is 5% better than Ask Ubuntu’s.
 
I wish someone made VCS esperanto... just basic commands that will abstract if you are using SVN, git or mercurial :(
 
10:32 PM
And we didn’t get any specialized oneboxing.
 
10:50 PM
@toscho btw the problem with integrating WP SVN transparently is that they don't actually allow normal version control develeopment there... ideally you only commit versions and nothing else... which means mirroring sane DVCS dev process is big no-no
 
@Rarst Yeah, I remember Otto saying that.
Which leaves me with git export … to a SVN copy of the plugin and commiting it from there.
This is sooo stupid.
 
I think the best scheme I read about is instead of integrating you just set up both SVN and git/hg in same dir for plugin and make them ignore each other. develop in one, then commit to SVN as well when version is ready
pain to setup, but can probably be scripted once to get empty repos
 
@toscho I tend to develop on Git, and when I'm reading to push, squash them into one/two commits and then pushing it to WordPress repository. But then squashing them kind of looses the whole point of VCS :S
 
@StephenHarris exactly. I need an atomic commit history.
wp.org should just allow Git besides SVN.
 
@toscho preaching to the wrong crowd...
 
10:57 PM
(is besides the correct expression here?)
 
@toscho alongside?
 
@Rarst I’m not preaching, I’m ranting. I’m on my third beer after all.
 
as for me they should just dump everything on github, that is backwards-compatible with SVN
 
@StephenHarris Thanks, sounds much better. :)
 
right, I'm off. Ping me once you've worked out a workflow that's reasonable, and doesn't piss off otto :) see ya
 
10:59 PM
there isn't such thing as not pissing off Otto... it's just matter of degree... I am off as well
 

« first day (623 days earlier)      last day (4321 days later) »