« first day (555 days earlier)      last day (4397 days later) » 
03:00 - 15:0015:00 - 00:00

3:26 AM
0
Q: Outline for required reputation for tasks

Travis PflanzWhen a user receives a new capability, a little banner appears at the top with a "More Info" link. On that page, there is a breakdown of reputation required for certain capabilities. How can I navigate to that page without the banner popup? I cannot seem to find it from within my profile or on W...

 
 
3 hours later…
6:19 AM
access = #ACCE55 (light green)
booboo = #B00B00 (dark red)
 
6:49 AM
@Brady I have returned! Lol. I have been taking my time moving into a new apartment
 
 
1 hour later…
7:54 AM
Morning!
@Jared ah :)
 
@Brady Morning :)
 
@SolomonHenry Please, pretty please, take care of your questions.
They are confusing at least, lots of possible duplicates.
Use one question for one problem, you can edit your questions.
 
@toscho sorry about that, i'll keep that in mind....
 
@SolomonHenry Please read into ...
 
@SolomonHenry If something doesn't work, don't leave the question orphaned. We have already too many unanswered questions. Try to explain the problem better instead.
 
8:01 AM
morning
 
@toscho yes u r right, im unable to explain the problem in a better way.....
 
@SolomonHenry Spreading subtle variations of the problem across several questions cannot fix that. ;)
 
@toscho yes..... rather i can edit the question and give a meaningful explanation
 
dumb server question - how to check real memory usage? dashboard shows 2x of what cpanel shows, they must be counting something differently
 
@Rarst - cat /proc/meminfo
vmstat
free -m
Also dont forget that in some stats /swap can be taken into consideration
 
8:15 AM
thank you, now I got five different numbers :) but these are no higher side, wonder why cpanel show half that
 
@Rarst pass
@Rarst you speak russian?
 
ok, there is a question for that
0
Q: Different between memory usage in WHM/Cpanel and Linux

AliIf I go to WHM and see my server's memory usage, it says that only 16% of memory is in use. But when I connect to server using SSH and run command "free -m" then it shows that 80% is in use. Why is that? I want to know exact memory usage of all applications running like MySQL, Apache e.t.c. How d...

yes
 
@Rarst Cool you can use my file monitor plugin now as it has translation for russian :)
 
Anyone ever tried canvas.getImageData » <svg (...) >xlink:href="data:image/png;base64,(...) (SVG)?
 
@Brady I don't use WP in russian
 
8:19 AM
@Rarst I guessed that but just wanted to tell someone I had it in Russian.
 
@Brady yay! you rock! (enough?)
 
@Rarst :D
 
ok, found it linuxatemyram.com "run free -m and look at the row that says "-/+ buffers/cache" in the column that says "free" - 500MB free makes me feel much better...
 
Thought I wouldn't be back for a week or two, but here I am. Morning all!
 
hey guys
 
8:34 AM
Full house this morning
Anyone help with a PHP error?
im getting this:
PHP Fatal error: Using $this when not in object context in /******/wp-updates-notifier/wp-updates-notifier.php on line 175
$core_updated = $this->core_update_check($message); // check the WP core for updates
^^ line 175
protected function core_update_check(&$message) {
^^ function call
 
that is signature, what is actual call?
 
@Rarst huh?
sorry line 175 is the call
 
piece of code that calls your function. $foo = var( 'input' );
ok, what is call for method that contains line 175?
 
Nope still don't understand what you are after
Error:
 
what calls method that executes line 175?
 
8:41 AM
PHP Fatal error: Using $this when not in object context in /******/wp-updates-notifier/wp-updates-notifier.php on line 175
Line 175:
$core_updated = $this->core_update_check($message); // check the WP core for updates
 
function something {

// line 175
}
what calls something?
 
@Brady Some code calls core_update_check without creating an object. That code is needed.
 
@Brady This is where the Error executes @Rarst is asking for caller. Good monday morning :D
 
public function do_update_check() {
			$options = get_option(self::$options_field); // get settings
			$message = ""; // start with a blank message
			$core_updated = $this->core_update_check($message); // check the WP core for updates
			if(0 != $options['notify_plugins']) { // are we to check for plugin updates?
				$plugins_updated = $this->plugins_update_check($message, $options['notify_plugins']); // check for plugin updates
			} else {
				$plugins_updated = false; // no plugin updates
			}
 
ok, do you call do_update_check() or do something like hook it to cron?
 
8:43 AM
@Rarst yes
 
....former or latter?
 
add_action(self::$cron_name, array(__CLASS__, 'do_update_check')); // action to link cron task to actual task
 
ok, your callback is for static method call (you use class name, not class object)
so you need either to use self::method instead of $this->method inside
or pass object instance $obj = new MyClass; $callback = array ($obj, 'do_update_check');
 
@Rarst I'll use this method. Cheers
 
if you are just namespacing and stuff go with self::
 
8:47 AM
@toscho Thanks for the layman's terms
 
sometimes need to go beyond "you are chanting wrong magic incancation" for full understanding :)
 
ahhh.....
C:\SVN\WordPress Plugins\WP Updates Notifier>svn cp trunk tags/1.3.1
svn: 'tags' is not a working copy
anyone had this issue?
 
Gradients are fun.
 
9:07 AM
Fixed my SVN problem. had to use switch command to switch to the correct working directory. need to read up on it though to fully understand what I just did
 
@toscho I switched to Reddle: archive.whatthenerd.com/how-to/…
Does anyone know what the bigger sized . (point or full stop) is called? I have see it much bigger than the point size.
 
Bullet? •
 
yeah, yeah
is it called bullet?
Ah, found it
Is there a better list of HTML symbol entities than this? w3schools.com/tags/ref_symbols.asp
 
Thanks :)
 
9:18 AM
@geekpanth3r Do not use entities for visible characters.
 
I don't understand...
So, am i not supposed to use such characters at all?
 
@geekpanth3r Use UTF-8 and just write the character as is.
 
@toscho Any reason behind this? (It helps.)
 
@geekpanth3r There is no need to escape such a character in UTF-8. Some browsers may not know the entity, but they do know the code point.
 
oh, okay. got it.
 
9:22 AM
So use UTF-8 and enter it as • and not &#8226; or &bull;
 
In UTF-8 there is no difference between • and the letter A. :)
The only exceptions are <, >, ', " and &.
Because they may change the markup.
 
okay
 
@toscho yup unless they are in <![CDATA[ and ]]>?
 
@toscho Does that mean, •Aahan is interpreted as AAahan by browsers?
 
@Brady Don't rely on CDATA blocks. There are some crazy bugs in older browsers.
 
9:25 AM
@geekpanth3r No. @toscho meant "no difference between • and any other char"
 
@toscho I only use them when passing XML
 
@kaiser Oh... :p
 
@toscho Older browsers can go get lost :)
 
Which browsers do you folks support when working on a project these days?
IE8 and above?
 
@geekpanth3r The client decides that.
 
9:28 AM
hmm...
 
Somewhere in the dark corners of my brain I still have some JSSS skills. :D
 
I have to ask that again: Anyone got a clue on how to export from canvas to SVG? Can't get around it...
 
@geekpanth3r nice-entity.com
 
@toscho lol. Looks like it never got past netscape. And I never heard of JSSS before!
@Rarst Awesome... but where in those tabs can I find the bullet symbol?
 
The full, ultimative and mostly useless list: Named character references in HTML5.
 
9:32 AM
:P
 
@geekpanth3r search?
 
Oh... didnt notice the search tab there.
 
We have now there4;, Therefore; and therefore;.
 
just a test
 
@toscho ulala! Thanks, it's great!
 
9:34 AM
@geekpanth3r Don't use it.
 
why not? :(
 
Is it recursive Monday again?
 
lol.
By the way, was that from your bookmarks? or google? (in the tens of searches that I've made for HTML entities list, I never came across that link)
 
@geekpanth3r I remembered that list and googled for site:www.whatwg.org there4.
Hm, do you use wp_enqueue_script or wp_enqueue_style for JSSS? I have to submit a theme using that to the public repo. :D
 
@toscho wp_localize_script()
 
9:46 AM
@kaiser No, that's for inline scripts.
 
@toscho what's the diff from JS?
 
On the fly change for all style attributes. Like Woos Canvas, just that the visitor can define it all by himself. On every page request :)
 
@Rarst <link rel='stylesheet' type='text/javascript' href='/n4.jsss'>
 
@toscho enqueue as JS and filter style_loader_tag to adjust markup
 
@Rarst I think it's more fun to troll the Trac and ask to add that important missing feature.
 
9:51 AM
@toscho on monday?.. meh...
 
I'll wait for the next 1. April.
 
10:17 AM
when i need to show all postmetas for a post. What should i use get_post_meta()' or use get_post_custom()` to get everything. Which one is better?
 
VIM Adventures: Learning VIM while playing a game http://bit.ly/JkGlk9
2
 
10:40 AM
@Rarst haha thats clever
 
I want to build APC status widget for WP dash... but I have no first idea how to do graphs that will play nice with those damn fluid columns
 
@Rarst Listen to window.resize
And watch for el.innerWidth
 
@kaiser I don't want to... :) I like nice fast static image graphs... those JS libraries and WP license stuff are a mess
 
Just redraw .on( window.resize
No need for Js libs
You could simply add a bunch of spans, stack them and then change attr on the fly
 
@Rarst Just giving you an example. WP-Piwik that has dashboard widget doesnt redraw graph on rezise. It draws to the size the window is loaded at
The widget uses jqplot.com
 
10:51 AM
I have enabled media upload for subscriber lavel users. What kinds of security i should consider. Wordpress media upload is secured right?
 
@Sisir haven't looked into it in the past. I presume upload manager will only allow certain mime types to be uploaded.
but for safe measure I'd be putting a htaccess file into upload dir that stops any access to potentially unsavoury files.
 
@Brady all graph libs that use canvas need implementation for IE... which usually means excanvas from Google... which is Apache 2.0 licensed... which is not GPLv2 compatible... believe me - I looked through ton of things for graphing :\
 
@Rarst ah ok so you need a server side solution
 
nope, I need front end solution that plays nice with WP crazy
 
@Rarst flashcanvas?
 
10:58 AM
which most of the time means Google Chart API... but static sucks for fluid
 
@Rarst But you've just told me that you've looked into it in the pas and you cannot find a JS one that is compatible with GPL2
 
the free version is GPL compat
 
@TomJNowell yeah, you mentioned that to me in the past... flash is just... meh :)
 
I know, but so are browsers that have no canvas support
Fight meh with meh
 
@brady: how to do that? Also is it possible that i can restrict subscriber level user to upload only certain mime type (only images), restrict size of the upload, and space (say 50mb per user)..
 
10:59 AM
@Brady I totally can. graphael for example. which I like about as much as mondays.
 
for super aweomeness
 
might be a good question for main site..
 
@Sisir I don't know the answers to that
ask one at a time on the main website
@Rarst Use that then. Problem solved
 
@Brady so I should bite the bullet and sacrifice my nerves for greater good for free... meh
 
Can this get any better (or efficient)? <?php query_posts($query_string . '&orderby=modified&order=desc'); ?>
 
11:01 AM
@Rarst its not for free. It's for your own use first :)
 
@geekpanth3r yes. remove query_posts()
@Brady I can keep using apc.php
 
@Rarst take the image from that and place in the widget :) problem solved
 
@Brady it's static and server side
like worst of both worlds
and ugly
why do you think I want widget? :)
 
So you dont want a desktop widget?
 
@Rarst lol. And a serious answer would be?
 
11:04 AM
@geekpanth3r He was serious
 
@Brady dashboard
@geekpanth3r I am dead serious. like if you use query_posts() note nearby where do you prefer your body hidden
 
@Rarst :( Doesn't make sense. Can you provide the final code?
 
@geekpanth3r Everytime you use query_posts a kitten dies
 
@Brady oh, kitties!
 
@Rarst hit him up with your lovely chart query_posts vs WP_Query vs get_posts
 
11:07 AM
 
I meant, how do I remove query_posts() from <?php query_posts($query_string . '&orderby=modified&order=desc'); ?> and still have it work?
 
66
Q: When should you use WP_Query vs query_posts() vs get_posts()?

Dan GayleIt seems like half the tutorials in the codex and around the blogosphere use query_posts() and half use WP_Query. What's the deal?

 
So... like this??
<?php get_posts($query_string . '&orderby=modified&order=desc'); ?>
or <?php wp_query($query_string . '&orderby=modified&order=desc'); ?>
 
there are like links to documentation there
 
Oops! :P
got it
 
11:30 AM
@Rarst Cannot believe I've never up voted this answer until now
 
11:51 AM
i have it on favorite :)
 
12:01 PM
@Rarst How did you create this?
 
@geekpanth3r balsamiq mockups
 
@Rarst oh, okay
@Rarst The web version or the paid app?
 
desktop, but they aren't really different
 
The web version is free I guess?
 
@Brady Did someone use query_posts...
 
12:06 PM
 
@StephenHarris lol
 
Kill those Damn Kitten ;D
 
12:31 PM
are moderators able to see deleted posts in chat?
 
you'd think
 
@geekpanth3r everyone is
 
@Rarst I can't
not even my own post
 
context menu (arrow down on hover) > history
 
how do i get unfiltered content when hooking with "the_content"
 
12:39 PM
@geekpanth3r This Q has been answered hundreds of times: Use the pre_get_posts filter.
 
@Rarst It's not there!
 
@Sisir get_the_content ?
 
hm... then I guess it's for mods
 
hmm
0
Q: Saving query using pre_get_posts on page

SisirScenario: I have a page name Blog where I want to show recent posts. Usually i do it via query_posts() on a page template then assign the page template to that page. So, in this method database called twice (if i am not wrong) 1. When wordpress try to get the page content then by the query_posts(...

 
@userabuser: not sure if we have 'get_the_content' filter..
 
12:43 PM
@Rarst It would be great if you can spend some time on the question when you can :)
 
@geekpanth3r about as unexciting and beaten topic as it gets...
 
:(
Nice link. Good reading
 
@Sisir the_content
 
that was my question. it seems the_content provides filtered content (with paragraph tags)
i bought a guitar couple of days ago :) started learning
 
the_excerpt will return the_content when no excerpt is present and without formatting
but i also thought get_the_content will do that too
 
12:54 PM
@userabuser: what i am doing is like add_filter('the_content', 'my_modified_content');
not directly on template file..
 
ok so you're trying to change the output of the_content via a filter - then can't you just do your magic in the function and then pass it to the_content?
 
function my_modified_content($content){
// $content is already filtered
}
 
where and how are you calling/getting $content from?
 
when i hook into 'the_content' the post content is returned to the hooked function automatically..
 
yes but can you paste the contents of your function pls?
 
1:04 PM
add_filter('the_content', 'add_extra_content');

function add_extra_content($content){
	if(is_singular('event')){
		$content = '<strong>Description: </strong>'.$content;
	}
	return $content;
}
its just for testing purpose.. could be more html that i want to add..
@toscho: thanks..
 
and the problem is what though? is that not being appended to the start of your content on event?
 
it does.. but like <strong>Description: </strong><p>.... all content ...</p> because the content is filtered before i add the extra html. what i want is <p><strong>Description: </strong>.... all content ...</p>
notice the <p>
 
are unrequested grateful restarts normal for Apache? noticed APC losing uptime
 
@Brady Thanks for the answer. Can that function be added to functions.php?
 
@geekpanth3r just edited to add that information
 
1:14 PM
@Brady okay, let me tell this quickly (one more edit) -- I want the changes to take places everywhere posts are listed. i.e. home (& its pagination), archives and search.
that is all
 
Take away && $query->is_home()
but be warned that this will then apply in admin screens too
 
no, no. Then I would like to manually mention home, archives and search
(hmm... makes sense)
@Brady I just read that wp_the_query was changed to wp_query. Isn't it true?
 
@geekpanth3r no
$wp_the_query = new WP_Query();
$wp_query =& $wp_the_query;
^^ in WP bootstrap
$wp_the_query holds unaltered query
$wp_query holds altered
 
@Brady ok. sorry abt that.
 
@geekpanth3r altered and unaltered was maybe wrong thing to say
The real main query is in $wp_the_query. And a live copy of it is stored in $wp_query.
 
1:21 PM
oh...kay. hmm...
can I ask you one last thing? :P
@Brady how do I modify your function to order posts only in home, archive and search pages?
I've seen stuff like is_home() || is_search() ... but I am not sure
 
@geekpanth3r I'm guessing at:
if ( $wp_the_query === $query && ( $query->is_home() || $query->is_search() || $query->is_archive() )  )
        {
 
Just what I need. Thanks!
 
@Brady there are now is_main_query() method and function
things get into the core fast when Nacin wants them :)
 
@Rarst cool
if ( $query->is_main_query() && ( $query->is_home() || $query->is_search() || $query->is_archive() )  )
        {
so this?
 
seems sound
 
1:29 PM
@Brady which am I supposed to use now?
 
last one
 
Confirming. You mean this? if ( $query->is_main_query() && ( $query->is_home() || $query->is_search() || $query->is_archive() ) )
whatever. :P
 
I hate dealing with Apache... it's one dark glob of arcane stuff
 
yes
 
@Rarst Apache just isn't made for Windows. :P
 
1:32 PM
@Rarst not anymore. its all new and shiny :)
 
@toscho isn't any simpler on Linux VPS (which is the case right now)
@Brady meaning? 2.4? the one with backwards-incompatible vhost config changes?
 
@Rarst bowing out. bye!
I wonder if WP will ever put in a __DOING_IT_WRONG() into query_posts()
 
@Brady no. it's the only way to do things that a lot of folks understand. this reasoning is bringing such terrible evil in WP world every day...
 
@Rarst yeah but __DOING_IT_WRONG will still work for everyone but atleast then anyone using it can be educated about the correct way
 
doingitwrong.com already taken. Dammit!
 
1:40 PM
@Brady it would too openly implicate that folks are not smart enough to comprehend proper ways to do it
 
@Rarst well it wasn't until recently I fully get it... So I would have to agree with you
But @geekpanth3r now gets it. Don't you?
 
@Brady it takes years (literally) to fully get it... and even then there is lingering feeling you are still likely screwing up something :)
 
@Brady yeah :P
 
@Rarst yeah cos if you get that if statement wrong you are more than likely to break something else
 
sadly the WP developer way for dealing with "this is complex but we need mortals using it" is "let's wrap it into abstraction layer!"
and by "way" I mean developers around, not just core folks
year down system is neatly wrapped in five abstraction layers and fixing bugs in that makes you weep
...ahem
 
1:47 PM
also if you're 5 levels up but want to change how something works at level 2 but keep everything else intact, you now have a fork of levels 3 4 and 5 with extremely minimal changes
 
tell me about it... yesterday I had seen fork of wp_parse_args() with arguments in reversed order (only difference).
 
why are people upvoting this answer:
1
A: How to order posts by modified date without using 'query_posts'?

janwThere is nothing wrong with using <?php query_posts($query_string . '&orderby=modified&order=desc'); ?> in this scenario. WP_query (which I love) Is to be used when you have multiple loops on one page, but you only have one. get_posts breaks "the loop" and will force you to rewrite...

 
@Brady case of monday-induced limited mental capacity? your guess as good as mine...
 
@Rarst goes back to you earlier message. Its easier for programmers to use.
Makes sense so it must be the right answer :)
 
fellow WP dev is working on a site that is basically dedicated to hammering how to query into people in excruciating details and repetition... will have my full support :)
 
2:00 PM
Time for gaming (Assassing Creed revelations ) :) Later guys!!!
 
@Rarst There is someone doing that or if there was someone doing that
As WPUK is still looking for more speakers... Might have to put one forward to educate some more people
 
You don't know query?
 
@TomJNowell oh is there one already for that?
 
Nacin did it
 
@Brady there is
 
2:05 PM
several times
the slides are quite useful
and it's very well done
 
@TomJNowell oh I know that
 
oh you're talking about a site?
 
yeah, I posted those earlier today but slides suck as dailyt reference
 
But I'm talking about doing a presentation at WPUK
 
edinburgh?
 
2:06 PM
yeah
 
^_^
tis a shame there'll be no hovercraft this year
that was fun =p
 
I'll be there. I want to do a presentation but aint decided on what topic.
 
technical non technical?
 
@TomJNowell Well mine would be on a programming side of WP
 
@sisir can you try this,
remove_filter ('the_content', 'wpautop');
add_filter('the_content', 'add_extra_content');
add_filter ('the_content', 'wpautop');

function add_extra_content($content){

		$content = '<strong>Description: </strong>'.$content;
	    return $content;
}
 
2:18 PM
I was talking to Kieran O'Shea at last years WPUK about WP security and I was going to do a talk on that but he beat me to it.
Which I'm kinda glad cos there is a lot to cover in a talk there
 
2:41 PM
he's doing that this year? Is there a page with all the speakers etc listed and what theyre talking about?
 
what about something like this: destroyallsoftware.com/talks/wat
but wordpress
 
@TomJNowell yeah that was good
 
...a touch naive to think the WP should fit your client needs out of the box don't you think.
 
@userabuser yes, there was a lot of "right" for running man's open source conference into ground and badmouthing him for saying that WP is not perfect. WP community should be proud </extreme sarcasm>
 
2:57 PM
Anyone every had a situation where they wanted to lock a post from ever being able to be deleted?
 
clearly he doesn't know that problems aren't there to be complained about, they're there to be solved!
afterall what is the world coming to if a development house develops a solution to something!
 
If you haven't got the will to bend WP to meet whatever your requirements are then complaining about its short-comings is going to attract some adverse attention. We all know what its "not". I took what he said as him wanting it all handed to him on a silver platter.
 
03:00 - 15:0015:00 - 00:00

« first day (555 days earlier)      last day (4397 days later) »