« first day (648 days earlier)      last day (4595 days later) » 

01:33
what wp function generates a post slug
02:23
@MichaelEcklund Take a look at core. When digging into it, you'll see ~/wp-admin/edit-tags.php for example. Then open edit-tags.php for example and simply search through it.
 
1 hour later…
03:44
Hello Sisir
 
1 hour later…
04:54
@Sisir hello
 
3 hours later…
07:44
@Nisha_Behance Online now
08:28
@Sisir actually i want to show this section 'prime_news' for only 30 minutes i tried this but not working " AND post_date > '" . date('Y-m-d', strtotime('-30 minutes')) . "'";
so you using $where .= " AND post_date > '" . date('Y-m-d', strtotime('-30 minutes')) . "'";
@Nisha_Behance did it worked when you tried with hours?
that worked & hide the section after 12 hours
so you want it to hide after 12hours or 30 mins?
and when you using mins it not working?
08:37
this is code $where .= " AND post_date > '" . date('Y-m-d', strtotime('- 30 minutes')) . "'"; thats not working
try removing the space before 30
trying
like this ? (-5 minutes)
('-5 minutes')
yeah
$where .= " AND post_date > '" . date('Y-m-d', strtotime('-5 minutes')) . "'";
yes, looks good
08:49
i upload index.php should i try to create a 'prime' post
don't you have a local wordpress install?
yes.. create one and let see after 5mins
@Nisha_Behance you should try installing wordpress locally. it saves lots of time that way
ok
lets see after 5 minutes !!
Sisir still showing 'prime_news' after 5 minutes
--------------------------
my code
-------------------------
?php $args = array(
'posts_per_page' => 1, // We are showing only one post
'category_name' => 'prime' // showing form category prime
);

// Create a new filtering function that will add our where clause to the query
function filter_where( $where = '' ) {
// posts published last 5 hours
$where .= " AND post_date > '" . date('Y-m-d', strtotime('-5 minutes')) . "'";

return $where;
}


add_filter( 'posts_where', 'filter_where' );
press ctrl+k after select codes while editing. that will add code block on chat
09:03
ok
09:19
are u there ?
ya
working?
not working
okey.. let me try it on my local.. give me 15
have a look news.shreshthbharat.in i posted this (prime_news) post at 2:24pm
09:55
found the problem ( i think). the example we worked on is on Y-m-d so we get only compare year, month and day. But if we want to show difference on minutes i think we have to pass hours and minutes too..
@Nisha_Behance post an update on answer. should work now
where is the codes?
check my answer on your question
10:16
ok 14 mins ago ?
use the current version of the answer
actually change is on the filter function
just copy the filter function on functions.php file and remove the previous one
anu
anu
@Sisir @Nisha_Behance for these kind of in-depth discussions about a very specific issue it's better if you create your own room
@anu we're done
anu
anu
@Sisir that's fine - just so you know in the future
10:20
@Sisir ji thank you so much... checking now... hope @anu sorry !! it's done
chatroom was quiet anywayz :)
10:47
möp
 
1 hour later…
11:58
Somtimes coding is just boring... and painful.
12:39
Sisir are u there ?
13:24
@kaiser coding is fun when it's something you WANT to be coding.
@MichaelEcklund Believe me: Not in this case. Searching for a clean way to add & receive custom taxonomy term meta data...
@kaiser Metadata API
@Rarst And adding a custom meta data table? That's nonsense. Sry.
@Rarst so, you got the invite? what's the pricing like?
@Rarst I'm currently trying to use the description field as storage place for a JSON encoded array. Then rebuilding the whole $term/tag object back again, before displaying it.
13:27
@kaiser you can add table and use consistent API or hack together your own API on top of storage not meant for that. your choice (not saying any one is superior here)
@AahanKrish techcrunch for invite, no pricing. actually not much anything, 3/4 of stuff is "coming soon".
@Rarst As it's always limited to a taxonomy I added myself, it's ok (far away from perfect). Using it with built in taxonomies would be hell of a mine field and fail far below a ms.
hah! I read it already has 40K users and a Q&A community... wonder what they are doing o_O
one editor is working and you do get nice login.koding.com site which you can work with (PHP, Perp, Python, Ruby)
oh, hmm
But at least it's much easier maintainable and easier to get rid of again - imagine multiple plugins having the same custom meta table - try then checking if you need to remove it on the uninstall hook :P
13:30
@kaiser that's the point of API... multiple plugins have no problem using one options table, etc
@Rarst With core API? Or custom one?
@kaiser core
@Rarst So how does this relate to custom taxonomy meta tables?
@kaiser Metadata API is not custom, it simply doesn't have table pre-created for it (you can guess why)
@Rarst So we come back to our question: How would you - in case you got multiple plugins, which share a custom meta data table - check if you need to remove the table on uninstall?
13:36
@kaiser I wouldn't remove it... this is more of a thing for heavy solution not light plugin out there in the wild
@Rarst The imo best solution would be to modify the core functions that output the term_taxonomys table description column to save an array per default. This would make it possible to simply use it as storage for real meta data.
@Rarst I get "invalid activation ID" — guess I am a few hours late :)
@Rarst Now that you are a member you'd have 3 invites, if you haven't used 'em up, you can send me one ;)
@AahanKrish email?
thought mods can see it... [email protected] (krish, aahan)
got it
thanks!
Now I have one invite left :)
@AahanKrish I'm dissapointed in krish.me
13:52
@TomJNowell haha! I don't own it.
you wont be as disappointed with aahan.me :)
14:05
@AahanKrish but its empty
how can I evaluate a contentless site
@TomJNowell :) 'er you'll have to wait a bit :P
@AahanKrish there isnt even a holding page
I am actually writing one
@TomJNowell Yes. Because I've nothing to show.
I can't code yet...
@AahanKrish I had a holding page
even a 'hello Im me, content is coming soon, until then I have sites here and here, oh look a stack exchange profile'
hmm...
14:08
look at my site
a post or that will b up shortly... promise
before I posted anything it was just my photo and a paragraph of text
links to my github and a twitter follow
yeah, yeah, I know.
there may not have been stuff, but there was 'something'
I am thinking about doing umbrella page at rar.st or something... one year I might even get to that...
14:09
Maybe someone can help me with this: When looking at ~/wp-admin/edit-tags.php, I see the global $taxonomy in use, but can't figure out, where it is set.
@Rarst you've an about or homepage for that
I've given up on plain about pages
Im just putting that info on the frontpage, they can dig deeper into other pages if they care that much
this is me and here're my latest posts is a lot better than here are my latest posts, if you're arsed there's an about page
hah!
I prefer the latter actually (in my case) as my blog is where I put up notes
wondering if getting a japanese style sitting table for PC was a bad, bad idea...
@AahanKrish but your site isnt just for you
@TomJNowell It is :) I just want to make my notes accessible to me everywhere
:D
@Rarst did you figure out how to search/follow people on koding? koding.com/#!/rarst doesn't take me to your profile (checked other users as well, the links just dont work)
@AahanKrish why would I follow anyone?..
14:18
yeah, right...
I mean it's not like site is actually fully working and people are actually using it for something meaningful...
yes, I get it :) Just trying the basic stuff
@AahanKrish still got the spare invite?
@TomJNowell yep
I can has?
14:20
@TomJNowell to your Gmail address?
or @tomjn.com?
@TomJNowell will be saved and indexed by google.
@TomJNowell sent!
brandonwamboldt.github.com/utilphp I can't make up my mind is this is usable or not... it does a lot of things more conveniently but by such a tiny margin more
4
14:26
I now have invites!
@kaiser on the fence... I can see good answers for it (conceptual, not complete work), but as usual it's not very probable to actually get such
@Rarst We simply got too less devs in here.
15:08
@Rarst You interested in how I got the tax description column value working as array/meta storage?
15:18
Anyone came across this before? Might be useful: Google HTML/CSS Style Guide
and one of the interesting points is, their indentation: "Indent by 2 spaces at a time. Don’t use tabs or mix tabs and spaces for indentation." — I've always preferred tabs over spaces :(
@AahanKrish ignore this.
I will, gladly. :)
16:00
Is there a hook that I can use so that when instantiating a class through the functions.php file in the active wordpress theme, that I don't have to global the class variable if I wanted to access it within the theme's header.php file?
16:10
I think I figured out my own question. I made a function which prepares the class and instantiates it. (Placed in functions.php file of active WordPress theme.) Added an action so that the class is always instantiated upon init. Then in my theme's header.php file, I added a variable to my function defined in functions.php I can now access anything in this class from anywhere in my theme, without needing to use global $variable.
add a get_instance() method to your class and store the current object in a static member.
<?php
/* functions.php */

add_action( 'after_setup_theme', array ( 'My_Theme_Class', 'init' ) );

class My_Theme_Class
{
	protected static $instance = NULL;

	public static function init()
	{
		NULL === self::$instance && self::$instance = new self;
	}

	public static function get_instance()
	{
		// just in case the object doesn’t exist anymore
		self::init();
		return self::$instance;
	}

	public function __construct()
	{
		// do something
	}

	/**
	 * Usage: My_Theme_Class::get_instance()->test()
16:41
@toscho what's your "code typing speed"?
@AahanKrish lightspeed
not faster than I speak
toscho got a keyboard made out of kryptonite as anything else would melt.
:)
i need one
16:43
I find it really hard to type code... with all the braces and symbols
and still … I need three or four new keyboards each year
@toscho okay, noob question—you type code with all your 10 fingers, without looking at the keyboard?
depends, not always.
@kaiser ↑
Somtimes toscho just smashes his keyboard on the edge of his desk and gets a plugin.
9
16:45
my hands hurt sometimes, I can’t use all fingers after a while.
@kaiser: i am confused which of your comment to fav :D
don't laugh, but I use only 2, and maybe 4 sometimes :( Gotta learn this, never really bothered me before, but now it does.
Actually you're not faving one of my comments. Toscho is just remembering it in his core.
@AahanKrish there is a small software name type master. It will make you a good with keyboard in a day
@Sisir coding with 10 fingers (symbols included) is what I fear :)
16:49
8 actually.. thumbs are for space
thumbs are for ctrl shift
toscho must be kidding
thumbs are for spaces and alt. the small fingers (how do we call them in EN?) are for shift, ctrl.
at least in my world
@kaiser little fingers I guess :)
I was gifted with ten thumbs
16:54
1:1 translation from german languages (ltr): little finger, ring finger, middle finger, pointing finger, thumb. How do you guys (non native EN) would do a 1:1 translation in your lang?
damn, I asked a lot of polling questions in my early days... shoots another one
@Rarst and you posted a lot of comments as answers!
@toscho I so did... :)
@Rarst that’s the only reason why you have more unvoted answers than I
16:56
and other way around as well I think... all the wasted rep
anyway this is distracting me from misery, back to that
Believe it or not, I didn't know that there were indicators ( _ ) on the F and J keys on my keyboard :/
Is there any advantage to using static class calls?
what is that?
@MichaelEcklund define "advantage"
Well, I see a lot of big name programmers using static everything just about. Was just curious why they prefer using static. Personally I hate it.
17:02
@MichaelEcklund because we don't get namespaces without 5.3 and static is better than nothing
@Rarst , @toscho and @kaiser — can you please spare 1 minute of your time on this? I would love to know your speed :)
anu
anu
Greetings everyone, I come from the future where we dictate everything
@AahanKrish 48 WPM, 242/6 keystrokes
@Rarst thank you :)
I hadn't practiced in a long time :(
17:17
Completed my second round just now — 59 WPM (1st time 45 WPM) — but I only use 2 fingers, so it's easier.
So, yeah, I'd better start learning to use my 10
This is wrong — en.wikipedia.org/wiki/Typing#Hunt_and_peck — I don't look at my keyboard when I am typing!
...back to work
@AahanKrish Words per minute (WPM) 77
Keystrokes 395
(383 | 12)
Correct words 73
Wrong words 2
You are better than 91.66% of all users (position 6113 of 73277 - last 24 hours)
@MichaelEcklund nice! :)
17:42
@AahanKrish 55 WPM 311 - (276 | 35) keystrokes - correct: 56 wrong: 6 #15kwhatever
better than 78% ... seems that mostly bots are participating :)
hehe! :D
@kaiser not really, wikipedia says 50-70 is barely typical professional level... there are plenty people out there who type reaaaaally fast
Jeff atwood is at 84
@Rarst was meant like not really... in german it's easier for me. 73 wpm
okey.. where do i test mine?
@Rarst And yes. Really fast. The secretary in some office, where I've worked did about 3 times the words in the same time.
my problem with typing is typos... mind wanders off and hands start to ramble
my problem is just that sometimes the keyboard has the right key in the wrong place
Words per minute: NaN Uncaught Exception
17:52
tested 5.. mine is between 50-56
basically I am slowest typing in this chat... I am such a failure...
when we do the test.. we actually type faster because we want that speed..
@Rarst Sorry. My place isn't up for grabs :)
@Sisir not true - test are nonsense, typing real text is faster
@AahanKrish don't you challenge my depression
:D
@Rarst This is true... while trying to type faster, I ended up making more mistakes
18:57
WTB auto posting class.
 
2 hours later…
20:52
Spammer!—banish him!
Hi all! A quick beginner question: how can I insert that separator which determines how much of a post is shown on the main page?
when using the HTML editor (not the Visual one)
or what is the name of that thing, how can I google for it?
21:21
@Szabolcs <!-- more -->
21:44
@All any idea what's wrong in my code? "Parse error: syntax error, unexpected T_STRING"
add_action('admin_enqueue_scripts', 'wpse49449_admin_scripts',10,1);
function wpse49449_admin_scripts($hook){
	$screen = get_current_screen();
	$post_type = $screen->post_type;
		if ( ('post-new.php' == $hook || 'post.php' == $hook) && $post_type == 'post' ){
			wp_register_script('my_md_convert', '/wp-content/themes/2012-aahan/pagedown/Markdown.Converter.js',array(),'1.1' );
			wp_register_script('my_md_sanit', '/wp-content/themes/2012-aahan/pagedown/Markdown.Sanitizer.js',array(),'1.1' );
			wp_register_script('my_md_edit', '/wp-content/themes/2012-aahan/pagedown/Markdown.Editor.js',array
Okay, there's a missing ;
@AahanKrish wp_enqueue_script('my_md_edit');
@AahanKrish Get some decent IDE ;) Will show you which is the first line, that will throw an error (the one after your syntax error).
@kaiser wait, what's wrong with that line?
You meant the line above it right? (which is missing a ; )
22:00
Anyone have good tutorial for wp cron?
or is it simple enough to just get it simply from the codex?
and whats the proper way to return data with a function? if there's no data just return null?
 
2 hours later…

« first day (648 days earlier)      last day (4595 days later) »