« first day (616 days earlier)      last day (4627 days later) » 

00:36
0
Q: How long should we wait before we delete closed questions?

toschoWe can reopen closed questions per reopen votes or moderator decision. But most closed questions just stay closed. They pollute search results and hurt the reputation of the askers. See also: The Stack Overflow Question Lifecycle While some of these questions may still have useful answers, most h...

 
4 hours later…
04:13
Aha, finally! Now the number of questions I asked = number of questions I've answered :D
04:55
@userabuser This is what is needed and it works like charm Thank you so much brother...you are P.O.G ;)
@brady so you are high on drugs :D
05:12
now i tried if there is video on the read more
function twentyeleven_custom_excerpt_more( $output ) {

global $post;

if ( get_post_meta($post->ID, 'pdf_link', true) ) {

$output .= '<a class="button button1-indent" href="'.get_post_meta($post->ID, 'pdf_link', true) .'"><span><span>Read More</span></span> <div id="border_below_home"></div></a>';
return $output;

}
else if ( get_post_meta($post->ID, 'Video_link', true) ) {

$output .= '<a class="button button1-indent" href="'.get_post_meta($post->ID, 'Video_link', true) .'"><span><span></span></span> <div id="border_below_home"></div></a>';
I learned this very new thing from you thanks a ton :)
 
3 hours later…
07:44
Answer rate: 83%. We overtook ServerFault.
next goals: android and cogsci. Then apple.
morning
08:01
@AahanKrish nice symmetry!.. I still need to ask few more for such... :)
@toscho niiiiiiiiice
@Rarst haha! can you? ;)
08:26
@toscho do you use mobile twitter site on desktop? or who was it?
yes, in my sidebar
sometimes
does it auto-update?
damn... I am trying to improve setup - titter now goes at bottom half of left display... web site is nce but sidebar is useless waste of space and can't see timeline and replies at the same time
In fact, in Opera you don’t get any JavaScript there. I reported this as a bug almost 18 month ago. Twitter devs aren’t the brightest judging by the conversations I had with them … :D
08:30
and twitter clients usually suck big time... installed metrotwit yesterday - looks fancy, but doesn't even match web site in some functionality
I think it is almost dead.
who is?
Twitter
doesn't look like that to me... well, when it dies it dies :) I don't care that much
there is still much noise, but no innovation. real debates happen on G+ and on blogs, of course.
08:34
G+ is in worse place as for me... it's just... bland? social network for the sake of social network
and after all these years they still haven’t found a working business model.
the only social network I would really miss is our site. :) anything else can be replaced.
btw could use version of this chat without sidebar as well... some days I understand people who spend unholy times scripting/styling the heck out of sites
facepalm why highlight tweet I just made as unread?.. I swear either something about creating twitter client shutdowns attention to detail or it attracts wrong kinds of developers
But I still have https://twitter.com/#!/AahanKrish
@AahanKrish interface update rolling out, I got it just last evening
Ah... hmm
08:47
Wooo, I've finally joined the ranks of Rarst, Toscho and Kaiser with my outspoken badge :)
I heard this many days ago, was wondering if it's only me :P
@Brady Your life is complete now.
oh, wait … your rep is still just four digits. that’s not complete.
lol
@Rarst and @toscho what's the speed of your internet connection?
@AahanKrish not fixed really, depends on time of the day, phase of the moon... peaks at maybe 25mbit/s on good days
oh... hmm
08:54
My connection is really slow. I know each bit’s first and last name.
@toscho go on... mine's 8 mbps
(constant) but it's quite enough for me right now
6 mbps … 3 am on a working day
hmm... thanks to my stupid ISP, I was on a 2mbps connection all these months while paying for an 8mbit one. They changed my profile yesterday... damn I should've checked my speed!
09:45
Is this relevant enough to ask on this site? stackoverflow.com/questions/11166981/…
10:24
@PolluxKhafra no (as for me)
anyone here knows how to get all the custom fields that were used site-wide (not by post and not get_custom_fields();
@krembo99 Why not ask it here? It looks like a question suitable for the main site.
@krembo99 no such function that I can remember, need to query db
10:40
@Rarst aren't "custom fields" defined only in posts?
(i mean in post editor)
@AahanKrish don't get what you mean... they are just a form of data storage associated with posts
@Rarst - I would think there must be something, otherwise, how can the post interface give a list of the previously used ones ? anyhow, i will do a direct query ..
@Rarst yeah, that's what I meant.
@AahanKrish I don't follow...
@krembo99 I don't really use native interface ever so not sure what "give" that is :)
@Rarst I meant -- where does someone mention a custom field? In posts "only" right?
10:43
@AahanKrish mention?..
@Rarst Ahh! I don't know what to say exactly, I'll show you
@Rarst , well, when you add a new post - in the custom_fields box it will give you a dropdown of all previously used custom_fields names ..
@Rarst - So I just thought someone knows this function - if not - I will dig into the source , or will just do a direct query . Just thought this array is ready somehow .
@Rarst I meant this
Isnt that the only way one can "define" a custom field?
@krembo99 that seems ajaxy
@AahanKrish that's native interface for it, you can define it however you like wherever
Oh... I didn't know that
10:47
@Aahankrish - you can define custom fields in many many ways . Like meta_boxes, direct insert_post etc etc ..
@krembo99 hmm... I have a long, long way to go
@Rarst , it can very well be Ajaxy, but even Ajax need to take the data from somewhere
@Rarst - boy, you are quick :-) anyhow, I guess there is no filter for that and it seems it is not returning a value but directly outputting markup ,Oh well - i will just use the direct query from there .. thanks ..
@krembo99 quick? this took forever :)
11:01
@rarst , well, i am working on a plugin that even if seems simple - posed quite a few challenges . and IMHO - (unless you have nothing else to do) - that was quick :-)
@krembo99 searching for SQL sucks...
@Rarst , I know. Alternatives ?
I meant as it eats time to figure out
@right . so now i can copy the one in that function :-) thanks ..#
@Rarst , you know what else sucks ? (I am just venting/Ranting here - feel free to ignore) - that I have maybe 30 (pretty good) plugind - but I never publish because I can not find the patience or th time to learn SVN :-) How Lame is that ??
@krembo99 publish elsewhere :)
11:07
Git is no better . And making a dedicated website - Too much time. do you know the proverb " the shoemaker walks barefooted " ??
@Rarst - that´s me .
@krembo99 I like Mercurial most... although publishing to official repo doesn't really take learning SVN much, just going through the motions in line with instructions
@Rarst - but the plugin repository on wordpress is SVN .
@Rarst , and on top of it - i use winxp SP2 - even tortuise can not work :-)
@krembo99 yeah, but putting plugin there is like copy/paste, adjust and run two lines in console... it's far from really using version control and they actually discourage using repo for development, only hosting
@Rarst , - So I guess the world can live without my plugins :-)
@Rarst - to be honest - I never even tried :-) Just the word "SVN" discorreged me from going any further ..
@AahanKrish That is populated get_post_custom() minus all keys beginning with an underscore … if I remember that corrct.
11:19
hmm...
@toscho Is there a way to get notified of edits to answers of my questions?
:( Rarst edited one of his answers and I didnt know until he told me
@AahanKrish you should look into your responses sometimes.
@toscho Oh, great! :D
That'll do!
11:53
Akismet Pro + Cookies for comments -> 0 false positives, 100% spam caught over the week
In my German blog Akismet didn’t catch enough spam.
I close all posts after 90 days now.
this rule is active since 22.02.2012. Result:
12:16
@Pankaj No problem! Enjoy.
@toscho 1032
@userabuser hm?
four digits
bow down
it’s a good start! :P
anu
anu
12:43
afternoon all. anyone know where the set of allowed html tags in comments is stored in the database
@toscho And why are you not using cookies for comments? It's good
@anu You mean the text below comment textbox?
anu
anu
@AahanKrish indirectly. where is $allowedtags populated from
Oh... that I don't know. :P All I know is how to change that text.
@toscho Oh, German! Akismet is probably not so good when dealing with international languages. But either way, Cookies for Comments should do the job.
anu
anu
Ah, ok, I get what's happening - allowed tags are only filtered for non-admins - which is why my comments were working fine but other people's weren't.
12:51
@userabuser lol! The comments make me laugh
;) hehe
this is how the css spec should have been in the first place, sick of writing monstrous CSS files (short of using LESS)
Have you tried LESS, SCSS, compass and stylus?
all of them
LESS yes, but not SCSS (any good?) ... Stylus not yet, but I am clearly going to (its for Nodejs) which is bloody excellent!
I tried none... I'll pick one that's more productive for me :)
i.e. less time more code (with less errors)
As with anything, there is a learning curve, I suspect LESS and SCSS to be comparable though. Once you're up to scratch with LESS, it definitely is LESS time, LESS code.
I had started taking a more object oriented approach to writing regular CSS anyway to reduce complexity, but its not until you use something that gives you similar abilities to that of a scripting language that CSS actually becomes fun to write again.
13:02
:D
true
What makes Stylus more exciting though is you can do away with curly braces { } and semi/coling ; : entirely.
yeah... but I am wondering how it affects readability
its controlled by whitespace/indentation...
sidebar
  border 1px solid
element, property
hmm...
The project has a very good following, so surely, it's good
Who here uses Google spreadsheets cum forms? It does a pretty good job
I am setting one up for my website
13:26
Never used before no
In what context are you using it?
@userabuser Contact form
as an alternative to emailing -- for the lazy
What's wrong with a good contact form instead of a spreadsheet pretending to be a contact form?
@userabuser caching issues
I don't really want to start googling for tuts and stuff on how to prevent caching of contact forms in WP
;)
Besides Google Forms are very simple to modify if I ever have to.
umm.. a little confused, caching of contact form?
@userabuser In WP if you are using a caching plugin, your pages are cached, and I've read that it can break forms
By the way, I am only suggesting it as an option, and not a full-blown alternative.
13:38
Read, is not the same as experienced. You're likely creating more work for yourself than simply having the form hosted locally within your WP theme, caching plugin or not. However, you can exclude pages from being cached with such plugins if its a concern, though proper configuration should avoid any issue in the first place.
hmm... how about SPAM? :D
with google forms I dont need to use captcha and the like
Remember I run a number of sites, my spam rate is what I would call low, most of which is caught by filters. You can use non-intrusive captcha/like questions that still provide for a good UX.
Spam is only really a problem, once you start experiencing it. Not prior to.
@userabuser why actually are you suggesting against Google forms? It's not at all complicated. Just create the form, embed it, and you are good to go
No, I'm not suggesting against it, its a perfectly plausible solution, as an alternative, however as a developer I never resort to third party services for something that should otherwise be seamlessly integrated into a site by way of standard unless there's something preventing you from using local forms. But its personal preference of course.
hmm... actually makes sense :D
13:48
Also, I don't like the idea of having to access another data store to retrieve information, unless its an external service that I can use such as an E-mail Autoresponder (eg. MailChimp) where your custom form fields would populate an e-mail list that you can broadcast market to in addition to having users send general contact emails.
But in its most basic arrangement, a locally hosted form on your WP site could store data (such as in a custom post type) in addition to notifying you via e-mail of a new contact message.
Gravity Forms (premium plugin) does this, and I think Ninja Forms (premium plugin) too. But I have no doubt there would be a free plugin that would do the same thing. Or its quite easy to write a simple solution yourself that uses wp_insert_post to store the data before you hook into send mail function.
I'll check them out... now
anu
anu
14:03
and new version of a site is launched. time for my weekend to start
@userabuser need some help with applying conditional tags to a function
I need to apply is_single on this: pastebin.com/Lg6VKXAp
14:17
This works, but is it the right way to apply the conditional tag? (look for is_single() )
add_filter( 'the_content', 'wpse_52662_add_extra', 1000 );

function wpse_52662_add_extra( $content ) {

	return preg_replace_callback(
		'~<p(>|\s+[^>]*>)(.*?)</p>~miU' // find <p>
	,   'wpse_52662_callback'           // pass the result to the callback
	,   $content
	,   1                               // stop after first match
	);

}

function wpse_52662_callback( $m ) {

	if ( is_single() ) {
		$extra = 'CUSTOM CODE';
	}

	return ( FALSE === strpos( $m[2], '<img' ) ) ? $extra.$m[0] : $m[0].$extra;
14:30
The syntax is correct yes, if ( is_single() ) { ... }
Great!
14:43
Btw @AahanKrish if the conditional is_single returns false, there will be no $extra variable available to the conditions being checked within the return value... is that what you want to occur?
@userabuser I don't want the "CUSTOM CODE" to show if the conditional is_single returns false
I am very poor at filling "About Me" — what have I got to say about myself really :(
15:24
sup peeps
are there any obvious side effects for doing global $wp_post_types; unset( $wp_post_types[ "sometype" ] );
in an init action
i think i'd like to have this core.trac.wordpress.org/ticket/14761
goal is just to basically disable a plugin for non-logged-in adminstrators
non-logged in administrators? so you mean a normal user? :)
@AahanKrish I have no idea what you are talking about. Such a setting doesn’t exist.
@toscho what setting? "Cookies for comments"? That's a plugin I run alongside Akismet
@lkraav Yes, you have to write unset( $GLOBALS['wp_post_types'][ "sometype" ] ) just to get a reliable result.
@AahanKrish ugh, nooo, I would never hurt my performance so bad just because some people comment.
@toscho performance? I am using .htaccess rules :)
RewriteCond %{HTTP_COOKIE} !^.*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.*$
RewriteRule ^wp-comments-post.php - [F,L]
And that's how it looks
15:40
@AahanKrish And extra HTTP overhead. Remember, these cookies are send to all resources on your site, not just the comment script.
@toscho Are you sure? I don't think so. The plugin adds an extra css or image file to which the cookie is attached... not to all resources, I think
And loading one extra file + cookie isn't hopefully a huge overhead
@AahanKrish You cannot restrict cookies this way. All requests to images, JavaScripts, stylesheets, fonts … contain that cookie now.
And 99% of your visitors don’t even use the comment form.
The only problem is I hate to have spam comments shown to my visitors.
@toscho one last thing... isn't the cookie loaded only once? I mean, it's going to be cached, right?
15:45
then put first time commenters into the moderation queue.
dont auto approve comments
or auto approve comments for registered users only
hehe, high five :)
or only show commens live to the user who posted it until approved
@AahanKrish cookies aren’t cached. you cannot use cookies and caching the same time.
@userabuser You mean... remove the "your comment is under moderation...." notice :D
@toscho Hmm... now it kinda perfectly makes sense why not so many use this plugin
15:47
Yeah... or "your comment wont appear to others until it has been approved."
Hmm... will do that
@AahanKrish even if it would be useful I wouldn’t let such poor code near my site. the author never heard of wp_enqueue_style. :(
haha!
Well, I must admit that my website is blazing fast since disabling the plugin (or it's simply an illusion)
when you are logged in cookies are sent anyway.
I have more than 1 browser dude
:)
16:00
you don’t even need a second browser, just a private tab.
ah..whatever!
Thanks for the tip by the way (both cookies and the private tab thing :D )
 
1 hour later…
17:04
@toscho thanks dude
17:56
hey guys i have a question
18:34
@MichaelEcklund The font is magnificient. I've never seen a font look so beautiful on Windows (it's probably the font-size though)
Big fonts are sexy.
i really dig that fixed sidebar
dope
 
2 hours later…
20:52
spain through :)
yep. it was too easy
Germany vs Spain on Final :) will be great
haha, it will be too easy again. but … okay. :D
@toscho do you have an article i could read about getting my plugin on the svn?@
and Spain 4 - 0 Germany :) sweet!
21:03
@Sisir in red cards maybe
@MichaelEcklund one minute, delicious is so slow.
4
Q: How to add plugin to WordPress Repository?

PietI just made my first plugin and it got approved by WordPress. Great news for me, but now what? The "instructions" on the Codex are anything but clear for me. I did find an article on Dig WP and I managed to get to the 3rd line of code. After that no joy. Does anyone here have a clear set of inst...

have any git version?
I should move my links to a self controlled environment … delicious sucks.
twitter is also slow now
21:27
@toscho I am working on a few different plugins with a fellow of mine. What setup would you recommend for developing? Should we use github as a primary and wordpress as a secondary? or otherway around?
Always use Git as primary. SVN is not made for atomic commits (and Otto made it very clear he doesn’t want to see those).
@toscho can you set your code to private on Git?
yes, on paid accounts. Or use Bitbucket. You get pricate accounts there, but the interface is not as nice as github’s
If you're going to do this sort of thing, please do an interactive rebase and then change all the commits to be squashed, so that you don't make dozens of small commits to the SVN servers. More info on how to do this is here: stackoverflow.com/questions/158514/…Otto Jan 26 at 0:33
@toscho i am using bitbucket. is there any script that automatic update from bit bucket repo to wordpress site?
I don’t know.
21:37
i have seen github to wordpress site script though
you can use Git on Bitbucket. Push the updates to the WordPress repo from your local repo, not from Bitbucket.
@toscho what to do with this wordpress.stackexchange.com/questions/49634/… similar Q link is thr. could be closed as exact duplicate?
Not sure. I wait for the close votes (not flags) of our community. :)
21:56
Anyone know if it's possible to automatically resize a tinyMCE dialog box's height?
And your research effort is …? — toscho 4 hours ago
Should give this its own keyboard shorthand.
Is that to me? lol
no, that was just coincidence. but … :D
@toscho if we do a private repo, do we both need to pay? or just one of us?
Oh lol well I have been googling, not asking for any research but if someone knows off-hand that would be great. :)
22:00
@MichaelEcklund Just one.
You can invite a non-paying member to a private repo.
okay thanks
if you don’t need the interface you can also just share a Dropbox or Gdrive for the repo. I have done this, works fine.
1 hour ago, by toscho
From @EAMann http://eamann.com/tech/how-to-publish-a-wordpress-plugin-subversion/
Yep, I saw that. But I also saw someone ask if there was one for Git.
ah, didn't see the difference.
we need oneboxing for private web sites from mods. :)
Slightly different workflow. :-)
Yes, yes we do ...

« first day (616 days earlier)      last day (4627 days later) »