FMaz008
Forum Replies Created
-
Forum: Networking WordPress
In reply to: What's the core logic of Multisite ?If it wasn’t because if all that spaggetti code, it would be really easy to fix.
If the routing correction require only to patch 2 lines of code, the link generation apear to require alot of fixes. That would be possible, it’s just a matter of finding where to apply all the fix, and the sites have all the required configuration already in place to do so.
But you convinced me that the wordpress community prefer to keep their old reflexes of doing thing a specific way instead of working together as a unified force toward the improvement of the software.
I don’t know how many of you are actual PHP developper on WordPress, versus end-user and/or designer, but I’ve already proved it was possible with really small fixes, it’s only a matter of how much fix are necessary do to in order to fix the wrong behavior.
Finally, contributing to a open source must be encouraging, and the reactions in this topic are not an example of what open source contributions should be.
So my contribution on this will end here.
Many people dream of success. To me success can only be achieved through repeated failure and introspection. In fact, success represents 1 percent of your work which results only from 99 percent that is called failure. (Soichiro Honda)
Forum: Networking WordPress
In reply to: What's the core logic of Multisite ?What kind of community am I into ?
Stop trying to figure out what my needs are for me…I might not be a wordpress expert, but I know what my needs are. I’ve asked for help, at first on a concept I did misunderstood, and after on a very specific problem that I should not have to justify over a certain point, point that has been reach in my opinion.
I do have the need to use a parent redirection, and every apache server with mod rewrite enabled is natively compatible with cascading redirection. (with a configurable maximum to avoid infinite loop)
I’ve find out that wordpress doesn’t use the standard right, and in some special case, it cause a problem. I’ve also advance the beginning of a fully backward compatible fix to that problem in order to improve the project, and there are still people to try to tell me what to do instead of being constructive.
Do you realize that with such an attitude, wordpress MU would simply doesn’t exist at all ?
– I would need to manage all my wordpress site from a single installation.
– That would be really hard to do, I’ve talk to like 12 uber-gurus and they all told me that would take months to do, and that would be very complicated…
– Ok then, I’ll contribute by doing it myself, that’s the open source mind right ?
– But why do you need to administrate all your site in a single administration panel ? You’re getting yourself alot of trouble, that’s pointless.
– Well my client have specific needs, and in our particular case, we need that in order to improve our management.
– Man, just install 2 distinct wordpress and tell him to open 2 tabs in firefox and then you’ll have your 2 panels right here.
– That’s now what I need.“Considering a good half a dozen core devs, including people behind WordPress.COM say it’s not possible and have spent literally months trying to figure it out….”
I’ve spend like an hour or 2 and I’m almost there yet. They just didn’t read well enough the apache manual, or the php one. That happen all the time, even to guru, no one knows everything.“It’s pointless.”
I’m fixing a bug here… And you know what, I’m doing it for free !“You don’t have to overwrite it.”
Yes I would have to, I think I know what I’m talking about, I coded the whole site myself. My index page is a front controller, not a simple index.html file. To make an image, it’s like if you where telling me that I could install 2 wordpress system in the very same folder… Both system are routing URL, so both need the index status in their folder.Maybe your doing pure HTML site when your not doing wordpress stuff, and that’s fine, but try to understand that your reality is not necessarily the same as mine.
—–
Bottom line:
You all seem to like plugin. For you, plugin is freedom right ? Then why is it so hard for you to consider wordpress the same as a plugin: A modular tool, like a forum, or a shopping cart.Forum: Networking WordPress
In reply to: What's the core logic of Multisite ?TLDR: It’s broken, I’m fixing it.
——-Think out of the box; WordPress is a blog system, and we’re not all using WordPress as a CMS, but often as a part of larger sites.
I have a site at the root of the domain, I can’t ovewrite it with a wordpress installation. What I could do is to create a /blog/ folder, and then install it inside, but that would be against the SEO planning of my client.I might go in alot of trouble, but for me, it only point out that there is a trouble in the system. I’m on the way for fixing a problem. And listening to you, I’m not the first who seem to ask for that feature, so I don’t think that it’s pointless to get involved in the developpement of that compatibility feature.
Forum: Networking WordPress
In reply to: What's the core logic of Multisite ?I’m still investigating and testing stuff, but I’m now able to display the /en/ site correctly, by using my rewriting of /en/ to /fr/en/.
I’ve done alot of try & error, so it’s not a definitive solution, but it turned out that I’ve been able to solve part of my problem by doing the following mod:
Near the line 67 of the file ms-settings.php, I’ve remplaced this:
$blogname = htmlspecialchars( substr( $_SERVER[ 'REQUEST_URI' ], strlen( $path ) ) );By this:
$reqUri = isset($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : $_SERVER[ 'REQUEST_URI' ]; $blogname = htmlspecialchars( substr( $reqUri, strlen( $path ) ) );This first path will load the good site, but the “article fetching” will not be ok. You’ll have the good site loaded, but it will report the error message “article not found”.
To solve that part, I have to modify classes.php, WP::parse_request() method, near the line 161, replacing:
$req_uri = $req_uri_array[0];By:
$req_uri = isset($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : $req_uri_array[0];Now I have the front page displayed correctly in the good site. Next problem: all the links are using the /fr/en/ path. So it must be related to some kind of ROOT_PATH_URL constant or something like this.
I’m still investigating.
Note: My admin panel is accessible in both /en/wp-admin/ and /fr/en/wp-admin/ , but as all the link redirect to /fr/en/, I’m redirected there as well after the login.
Forum: Networking WordPress
In reply to: What's the core logic of Multisite ?Don’t want to be mad about anyone, and I’m not better than anyone. But technically speaking, wordpress is not known for his good code.
If you search in the whole wordpress code base, they never use the php $_SERVER[‘REDIRECT_URL’] variable. That’s just weird, and that’s why I pointed that out in the ticket I’ve openned.
Quoting mfyahya from php.net:
If you use Apache’s redirection features for custom error pages or whatever, the following Apache’s REDIRECT variables are also available in $_SERVER:
$_SERVER[‘REDIRECT_UNIQUE_ID]’
$_SERVER[‘REDIRECT_SCRIPT_URL]’
$_SERVER[‘REDIRECT_SCRIPT_URI]’
$_SERVER[‘REDIRECT_SITE_ROOT]’
$_SERVER[‘REDIRECT_SITE_HTMLROOT]’
$_SERVER[‘REDIRECT_SITE_CGIROOT]’
$_SERVER[‘REDIRECT_STATUS]’
$_SERVER[‘REDIRECT_QUERY_STRING]’
$_SERVER[‘REDIRECT_URL]’Forum: Networking WordPress
In reply to: What's the core logic of Multisite ?Hum, your right, WordPress doesn’t take in consideration the $_SERVER[‘REDIRECT_URL’] variable in his route handling system, so the URL treated by WordPress is the URL in the browser bar, not the real one on the server in case of a redirection.
I’ve open a enhancement bug request about that with a fix suggestion.
Forum: Networking WordPress
In reply to: What's the core logic of Multisite ?Why your saying their’s no way arround ? Technically, it’s possible.
The idea is to forward all request from / to /fr/.Request:
mysite.com/en/article12Parsed by mysite.com/.htaccess
Then the following rewrite would occur:
mysite.com/fr/en/
to
mysite.com/fr/And then the mysite.com/fr/.htaccess file would thread the request again, not even knowing that it has been previously rewrited.
So the /.htaccess file should handle 2 exceptions cases:
– The main WP installation ( in this case /fr/ ) as we don’t want the result to be /fr/fr/
– The files in / , in my case that would be a static negative condition. So, do not rewrite everything that doesn’t match: (\/fr\/(.*)|\/en\/(.*))My not a pro with rewrite, but I’m sure that’s possible, and I’ll prove your “No way around it.” statement to be wrong 😉
Forum: Networking WordPress
In reply to: What's the core logic of Multisite ?You mean because it need an .htaccess to parse the URI and determine the route to the correct blog ?
What if I put & tweak the .htaccess in mysite.com/ ?
Forum: Networking WordPress
In reply to: What's the core logic of Multisite ?But I’m on the same domain, no ? (mysite.com)
I must consider my case as 2 distincts domains ?
Forum: Networking WordPress
In reply to: What's the core logic of Multisite ?Ah… I see, thanks 🙂
Could you point me out the plugin for the multiple top-level domain ?
Just to be sure, for you, there is no distinction between “top-level domain” and “same level folder” ?
My case is really:
– mysite.com/fr/ <!– One site, multisite installed from here
– mysite.com/en/ <!– another siteForum: Themes and Templates
In reply to: Page menu: How to hide a page from the nav menu.Great, look like I don’t event have to put my hands in the code … 🙂
Thanks !Forum: Themes and Templates
In reply to: TwentyTen Child: Remove Home MenuIf you don’t understand what Chinmoy29 ans klebba are saying, here’s the simple way to do it for a Child Theme based on TwentyTen:
1. Create a functions.php file in your root childtheme folder
2. Put this content in it:
<?php/* Retirer le lien “HOME” du menu de navigation */
function removeHome( $args ) {
remove_filter(‘wp_page_menu_args’, ‘twentyten_page_menu_args’);
$args[‘show_home’] = false;
return $args;
}
add_action( ‘after_setup_theme’, ‘removeHome’ );