« first day (1112 days earlier)      last day (3818 days later) » 

1:14 AM
@Wyck there are some dedicated workarounds in our code, and I have never seen any support issue.
@TomJNowell don’t worry, nothing happened
If you had written a more extensive answer, the community bot had rejected that edit without review
 
I might need to install lots of WP sites using network, all bilingual , all separate domains, WPML would blow the server up, I like the multilingual press design better, I guess I should try the non pro version to see.
 
@Wyck you don’t really need the domain mapper in most cases. WP can handle multiple domains without extra code
 
ah my knowledge of WP multisite goes about as far as installing it and clicking a few buttons.
..not licking a few buttons..
 
1:29 AM
that’s enough to set up multiple domains :)
 
why does this exists then, obsolete ? wordpress.org/plugins/wordpress-mu-domain-mapping
 
I think it does a little bit more than WP. Changing email addresses? Not sure, never used it.
 
one more question, does multilingual press have any code snippets/settings to add a "view this page in ..other language.." to a post/page/whatever
 
yes, there are helper functions and a widget
 
k thanks, there is a weird thing where I live where english people always have french browsers at work so auto redirect is annoying for them
 
1:35 AM
the pro version comes with a redirect feature, but you can disable that
the free version doesn’t do auto-redirects
 
ya typically I enable it but have the options via a link to switch to the other language
but i've only used wpml and i dont want to anymore
 
that’s part of the pro feature
but that feature isn’t really good currently, I will fix that later
 
wpml is so hard to maintain and well..really taxing on the amount of crazy hooks it uses and all sorts of wierd ram heavy shit
also not very stable, hate how the store values in db
 
Multilingual Press has one additional table for the relationships currently. I will add another for the languages soon.
 
ah so I guess you work on it a lot? I think the design of using a network's just makes way more sense that having a hook barnacle
 
1:44 AM
I am the main developer (currently the only one).
Right now, I’m rewriting many parts.
 
ah lol, I did not know that, I knew you worked at Inpsyde. I'm helping an agency move to WordPress and by law here sites that are english need to also be in french.
 
2:06 AM
@Wyck we use this plugin on our MU site... its ok. It rewrites URLs on the fly.
@Wyck coincidentally I am also having to do the same thing as you at the moment, explore the possible solutions to running multiple bilingual sites on an MU installation with a domain mapping plugin. Might be good to share experience here..
 
If you have any questions, just ask me :)
 
@toscho I'm pretty certain we will use your plugin now that I know you are the developer.
I have to have a meeting with the boss today about possibly solutions
 
be aware, I have inherited the current code. that’s why it needs a refactoring. :)
 
...yeah well I am still comfortable with inherited code than not if I know the author. We have written all our own plugins for this large project and we only use the domain mapping plugin (from someone else) which is really average code. The WPML gave me nightmares! ...and I was really thinking that I would have to do multilanguage from ground up myself until I saw your conversation.
 
BTW, we have an action running currently: you get 2 products for the price of one until 06:00 UTC.
 
2:21 AM
if we dont buy today, I think we will still need your pro version anyway
I have a question:
We have a front-end admin area as well as the normal (from end for general logged out users). We want to allow our logged in users to set a default language for their admin area (which is held in a secure front end). Are there sufficient hooks or mechanisms that could allow for this?
The reason we have our admin area in front end is because it is entirely custom and nearly impossible to customize the WP-Admin Dashboard the way we wanted it without nasty hacks.
 
built-in pro feature
 
nice to hear
I'm going to submit this as my recommendation today, thank you.
 
can I apply that default language to secured front end pages?
I'm sure there'd be a way to
 
It is stored as a user meta, so you should be able to do that
by default, the selection is applied to the backend only
 
2:30 AM
Yeah, our setup is a little more customized, but if its in user meta and the like it should be easy for us to augment secure front end pages to match the default language. Sounds good.
 
new language manager. thoughts?
 
looks quite sane to me
what does the priority control?
 
not sure if and how I can make that narrower
priority is for HTTP language negotiation
wait, that should start with 1. oops
 
only way to make it narrower is to move some columns onto second row and have labels to the left of the cell otherwise trying to make it anymore narrower and you will lose user experience on that screen
 
I could drop the slug
 
2:36 AM
is the slug supposed to be an editable column?
lunch...
 
everything is editable
but the slug is currently not used anywhere, I removed it
 
makes sense
 
3:03 AM
A user created a tag empty-folder. What the heck?
 
4:02 AM
 
 
4 hours later…
7:34 AM
lol
 
 
3 hours later…
10:54 AM
0
Q: Why are old questions on the front page?

helgathevikingAfter answering a few questions recently I noticed that they were months, if not years, old.. which tends to mean that the likelihood of an answer ever being accepted is slim. Not that it is the end of the world, but they were all the front page of the WPSE site... so I was curious how old quest...

 
11:46 AM
Syntax highlighting in Eclipse after 10 hours of coding.
 
lol
PhpStorm sometimes gets "from this point on I consider the file just one big mistake"
 
something similar happens in Eclipse in very long files with too many functions: the outline is incomplete. wp-includes/functions.php for example
 
11:59 AM
it's not consistent with PhpStorm, just choking from abuse... :) long files just timeout CodeSniffer
 
12:44 PM
Ok, now I get the WordPress Theme Customizer Craziness-es origins
 
elaborate? :)
 
Screenshot ist from Zack Sultan, one of the designers @Tumblr
 
so is that actual thing or concept or what?
 
1:04 PM
They already got it. Dunno for how long. That screenshot was from a note for "we fixed that slider thing".
 
2:02 PM
I love the smell of javascript in the morning
 
are you burning it again?
 
no. everything working so far today haha. but sometimes i just look at code and think "man this is beautiful" -- not necessarily what i've written, but the way it works
 
 
2 hours later…
3:46 PM
I see that it's a difficult question, but if anyone has any suggestions, I'll work on it and give it a good try: wordpress.stackexchange.com/q/120902/10691
 
4:14 PM
@its_me I believe that even if WP didn't redirect if you constructed an url to a post with the wrong category then it would still find the post. That is, WP ignores the category part when looking up the post. It only cares about category when deciding whether or not to redirect to "correct" the url.
With that in mind...
Take a look at this: core.trac.wordpress.org/browser/tags/3.7.1/src/wp-includes/… - in particular redirect_canonical filter. You could at that point cancel the redirect for 'international' posts. (You could also check that the category part points to an existing category).
 
4:41 PM
@StephenHarris Yes, but the thing is I don't want the redirect as well. I have other things dependent on that.
taking a look at that core file...
 
@its_me That's what I mean. Cancel the redirect if you want the url to be considered valid...
 
@StephenHarris Sorry, I misread. Was just tying the correction. :P
I am taking a look at that right now, and hopefully I can fix it myself.
 
@its_me line 220 is dealing with the case where the requested url is for a single post and 'category' is present in the url structure.
 
thanks, on it!
 
Basically the whole thing just determines what content the url is request, and compares that with the url it considers to be canonical for that content. If they are different, it redirects.
 
4:52 PM
yep, makes sense
 
heeeeeeeeeeeeeey loop!
I hope youre ready to laugh your butt off!
vague joke
really vague joke
humorful vague joke
its like you don't even like fun
 
@StephenHarris Doing the first check was easy:
add_filter( 'redirect_canonical', 'itsme_redirect_canonical', 10, 2 );
function itsme_redirect_canonical( $redirect_url, $requested_url ) {
	if ( is_single() && strpos( $wp_rewrite->permalink_structure, '%category%' ) !== false && $cat = 'intl' )
		return $requested_url;

	return $redirect_url;
}
Not sure how I'd do the latter i.e.
> You could also check that the category part points to an existing category
 
5:18 PM
> Just a quick "thank you!" - found your plugin on github and you've totally saved me a world of pain.
Ha, some positive feedback! :)
 
mark the date...
 
@its_me WP pulls out the category part and checks its in the array of category slugs for that post. You can use get_terms() to get all categories and then check if that slug exists. If it doesn't, redirect to something that does.
@its_me Also, you should be checking if the request post is in 'international'. If it isn't, you don't want to be touching anything.
 
@StephenHarris That's exactly what I am not sure how to do
@StephenHarris Yes, I changed that:
if ( is_single() && strpos( $wp_rewrite->permalink_structure, '%category%' ) !== false && in_category( 'intl' ) )
hopefully that's better?
 
@its_me yup. See line 221. WP tries to find the category corresponding to the category part of the url. If it doesn't find it, it returns a WP_Error. In which case the category doesn't exist.
@its_me Should define global $wp_rewrite too.
 
on it...
@StephenHarris Okay, please take a look at the final function that I've constructed based on your suggestions: gist.github.com/aahan/b33085c0e6e3a4941c01
does that look good?
 
5:35 PM
@its_me Inner conditional is wrong - you want to return the requested url if the category exists.
Apart from that it looks good.
 
Oops!
good to go now?
I was also wondering if I need to add $wp_rewrite->flush_rules(); ??
(or does simply saving the permalinks settings again do the job?)
 
@its_me Yup, test it out. And no you don't.
 
@StephenHarris I'll test it out right away, and if it works, I'd like you to post it as the answer, if you don't mind.
 
My only concern is that by returning $requested_url you're returning something that might not be canonical (e.g. extra slashes etc). This complicates it a bit more, but you may want to return a 'corrected' url rather than just requested one. That might work by using str_replace or something to undo WP's fixing of the url.
@its_me Bout to head off, feel free to post it yourself. You won't get rep for the answer, but there is a badge for answering your own question :)
 
@StephenHarris But won't WP take care of all that? I mean, as it works, in that case it'd simply show a 404 error page or something that it usually does?
 
6:23 PM
Fixed some minor glitches (the checks in place were still wrong) and now it works like a beast!
Can anyone please see if I am messing with the redirect_canonical filter properly?
add_filter( 'redirect_canonical', 'itsme_redirect_canonical', 10, 2 );
function itsme_redirect_canonical( $redirect_url, $requested_url ) {
	global $wp_rewrite;

	if( is_single() && in_category( 'intl' ) && strpos( $wp_rewrite->permalink_structure, '%category%' ) !== false && $cat = get_query_var( 'category_name' ) ) {

		$category = get_category_by_path( $cat );

		if( $category && !is_wp_error( $category ) ) {

			return $requested_url;

		}

	}

	return $redirect_url;
}
 
6:48 PM
why isn't the interrobang more commonly used‽
 
7:03 PM
how much time did you spend figuring out how to type it?
 
none. i copied and pasted
 
that's why
 
i'm on a mac so i'm not sure what the easy way is. i would know how on windows
‽⸘
CMD + ALT + T brings up glyph palette on windows.
or ALT + 8253 on windows
glyph palette is for mac. sorry.
 
7:26 PM
doesn't work for me on win
I get =
 
Image Could use an image. I'm not clear on the best way to add one. 05:07, Sep 19, 2003 (UTC) Has been done, apparently, but are many other similar entries for non-standard characters that could use similar. Like many, I often see only the no-character box. If there are instructions somewhere in Wikipedia for adjusting your browser to display these characters correctly, a link could be prominently featured. 23:58, 5 November 2007 (UTC) vBulletin I removed this paragraph: :To use it with vBulletin boards, include [font=lucida sans unicode] stuff here [/font] around the unicode...
 
8:07 PM
LOL at rejected edit "to functions.php"
> The author says he no longer uses the support forum, so I've come here
@toscho that's not quite anonymous object issue there since those classes have instance retrieval
 
now you are nit-picking :D
 
don't screw with me trying to answer something :P
I need new keyboard :(
 
BTW @Rarst, one of your comments on meta was flagged as rude. Bad Rarst!
 
8:23 PM
which one? I hadn't had a meta meltdown since woormageddon
 
@Rarst been in market for new keyboard since april
 
look up the mod history
 
@GhostToast it works for a while, then it has bad patch, then works again... every next bad patch is getting worse :(
@toscho the heck where? can't find it for comments
 
I need at least two keyboards each year.
 
no one can buy you a new keyboard
oops contains no search info
 
8:26 PM
I doubt there are many english/russian/ukraininan layouts on amazon
 
6 anonymous people with same name as you
 
@Rarst interesting, I cannot find it
 
and it doesn't show on my profile either
 
Funny! Here, have a downvote. :P — Rarst Oct 29 at 8:34
this one
the flag doesn’t even show up in the post history
 
that is rude?.. khm
 
8:29 PM
I have dismissed it
 
8:41 PM
@Rarst noticed you mention steam sale. what kinda games you play? if any
 
whatever is trending on android, once in a while... I haven't been seriously gaming in years
I hadn't ever bought a single game on steam for myself :)
 
@Rarst you should definitely check out pixel dungeon. it is fiendishly hard rogue-like, and 100% free
 
maybe later, Plants vs Zombies 2 would probably last me for a long time
 
but the art is so irrefutably cute pixeldungeon.tumblr.com/archive
 
 
3 hours later…
11:59 PM
@its_me So by just returning $requested_url www.mysite.com/uk/2013/11/01/some-international-post///////// won't be redirected to www.mysite.com/uk/2013/11/01/some-international-post/. By using some str_replace you can ensure that uk is not replaced AND that the trailing-slashes are still removed.
 

« first day (1112 days earlier)      last day (3818 days later) »