[wp-hackers] wp-hackers Digest, Vol 90, Issue 37

Serafin serafin.vazquez at gmail.com
Tue Jul 17 01:06:45 UTC 2012



Sent from my Droid Charge on Verizon 4GLTE

------Original Message------
From: <wp-hackers-request at lists.automattic.com>
To: <wp-hackers at lists.automattic.com>
Date: Tuesday, July 17, 2012 12:11:00 AM GMT+0000
Subject: wp-hackers Digest, Vol 90, Issue 37

Send wp-hackers mailing list submissions to
	wp-hackers at lists.automattic.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.automattic.com/mailman/listinfo/wp-hackers
or, via email, send a message with subject or body 'help' to
	wp-hackers-request at lists.automattic.com

You can reach the person managing the list at
	wp-hackers-owner at lists.automattic.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of wp-hackers digest..."


Today's Topics:

   1. Re: Custom widget layout on a per-page basis (John Ellmore)
   2. Re: What would strip $_POST before 'init' runs? (Mike Walsh)
   3. Re: What would strip $_POST before 'init' runs? (Brian Layman)
   4. Re: What would strip $_POST before 'init' runs? (Brian Layman)
   5. Re: What would strip $_POST before 'init' runs? (Mike Walsh)
   6. Re: WordPress moving to PHP 5.3x? (scribu)
   7. Re: WordPress moving to PHP 5.3x? (scribu)
   8. Re: WordPress moving to PHP 5.3x? (Daniel Fenn)


----------------------------------------------------------------------

Message: 1
Date: Mon, 16 Jul 2012 09:16:34 -0500
From: John Ellmore <jnellmore at gmail.com>
Subject: Re: [wp-hackers] Custom widget layout on a per-page basis
To: wp-hackers at lists.automattic.com
Message-ID:
	<CAK1Pxn+NVXRrofJSx84a3EkdrfYQr6rR5v9CPyNy4i7vNa=H4Q at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Aaron - depending on how dynamic your modules are, using shortcodes may be
an easier approach. The downside is that they do not have a GUI to edit
them like widgets do (unless you write a fancy GUI interface in javascript).

John



On Sun, Jul 15, 2012 at 10:01 AM, Rodolfo Buaiz <brasofilo at gmail.com> wrote:

> Hi Aaron, I recently stumbled upon this that may be of interest:
>
> http://support.advancedcustomfields.com/discussion/1660/buckets-widgets-alternative
>
> AdvancedCustomFields alone or with premium add-ons or in conjuction with
> another plugin (e.g.: BucketsWidgets) could be of help in the scenario that
> you describe.
>
> cheers,
> Rodolfo
>
> On Sunday, July 15, 2012, wrote:
>
> > Hi all,
> >
> >
> >
> > I've only been a member of the mailing list for about a week, so I
> > apologize
> > if I'm breaking any rules of etiquette or if this is off-topic. Lots of
> > interesting reads going through here. I'm working on a project that poses
> > an
> > interesting design challenge and wanted to bounce it off some fellow
> > hackers
> > to see if anyone might come up with a better approach than I have.
> >
> >
> >
> > We are building a multi-page site of about 100 pages where each page has
> a
> > modular design. So there might be 8 pages under category one, and each
> page
> > is comprised of a number of modules in a simple two-column layout. The
> > pages
> > in category two use the same modules, but they might be arranged
> > differently, there might be 9 or 10 pages instead of 8, etc.
> >
> >
> >
> > This type of scenario seems well-adapted to the widget functionality in
> > Wordpress where we can define a reusable chunk of UI that can be placed
> > anywhere within a "sidebar" region. I can define a custom post type, and
> > upon the creation of a new page, use register_sidebars() to create the
> > layout regions for that page. We can then drag and drop our widgets into
> > each region as we please.
> >
> >
> >
> > The problem with this is that with a 100+ page site, the "sidebars" we
> > register will number in the hundreds. So my questions are
> >
> >
> >
> > 1)      Are there any performance or scalability concerns we should be
> > aware
> > of on a site with hundreds of widget-containing "sidebars?"
> >
> > 2)      The UI at wp-admin/widgets.php is not up to the task of handling
> > hundreds of sidebars - any thoughts here about a good approach to
> creating
> > a
> > better UI, could we re-use or subclass any part of that code, what would
> be
> > the best way to go about this? Is anyone familiar enough with that code
> to
> > estimate how hard it would be to include it in a metabox for our post
> > editor?
> >
> > 3)      Perhaps there is a simpler or superior technique for enabling
> > modular per-page layouts that I haven't thought of?
> >
> >
> >
> > In general, I'm just looking for ideas and thoughts around the best way
> to
> > do this. Thanks!
> >
> >
> >
> > Aaron
> >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com <javascript:;>
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
>
>
> --
> Rodolfo Buaiz
> Productor Multimedia
> Pen?nsula Ib?rica
> +34 68.760.1407
> skype: brasofilo
> www.rodbuaiz.com
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


------------------------------

Message: 2
Date: Mon, 16 Jul 2012 13:51:30 -0400
From: Mike Walsh <mpwalsh8 at gmail.com>
Subject: Re: [wp-hackers] What would strip $_POST before 'init' runs?
To: wp-hackers at lists.automattic.com
Message-ID:
	<CAMg3evEAcwU7-910JkOBVi9JWGFNb4QxoX_t+phBVnUysVQDDw at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

I am resurecting this thread as I never resolved it and now have run into
what appears to be the same problem with another user.

On Sat, Jun 2, 2012 at 1:25 PM, Gavin Pearce <Gavin.Pearce at 3seven9.com>wrote:

> In Firefox you can use the Net tab in Firebug to view page requests.
> (Live HTTP headers will provide some more detail also. Chrome's
> developer toolbar has a similar 'Network' feature.)
>
> If it is redirecting, you should see your original POST to the server,
> the server responding with a 302/301, and then your browser making a
> request to another page. Remember to press the Persist button (next to
> Clear), otherwise it's going to reset the tab when the redirect happens.
>
> Looking at where it's redirecting you to/from might give you a clue -
> but either way, yes, run through your plugins one by one to narrow it
> down. If a redirect is happening that's why your POST data is clearing,
> though could also be a plugin simply unsetting $_POST ...
>
> G
>
>
I have been poking at the two sites which are showing this behavior of
stripping the post information and I have found that the URL is served for
a GET request but is not served for a POST request.  What was happening (in
both cases) is a 403 response is issued on the POST request but the page
referenced by the 403 header information (/403.shtml) doesn't exist so
WordPress ends up rendering the original URL again (although I don't
understand how that part happens).

I have posted a screen shot of the headers using the Firebug Net tab:

https://dl.dropbox.com/u/10343959/GForm_SS_21.png

Can anyone think of configuration (I am assuming it is at the Apache level)
that would cause this?  On the one server I have the ability to change the
.htaccess file I tried adding "Options +FollowSymLinks" based on one post I
found on the WordPress support forum but it resulted in a 500 error so it
doesn't appear that server allows setting it in the .htaccess file.

Any idea of what I might look at next?

Mike
-- 
Mike Walsh - mpwalsh8 at gmail.com


------------------------------

Message: 3
Date: Mon, 16 Jul 2012 14:04:28 -0400
From: Brian Layman <wp-hackers at thecodecave.com>
Subject: Re: [wp-hackers] What would strip $_POST before 'init' runs?
To: wp-hackers at lists.automattic.com
Message-ID: <500457AC.90904 at thecodecave.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 7/16/2012 1:51 PM, Mike Walsh wrote:
> Can anyone think of configuration (I am assuming it is at the Apache 
> level) that would cause this? 

You are certain it is apache and not nginx right? Nginx throws a setting 
into your cookie to ensure that you are coming from the site and not 
from a generic posting tool.  At times it operates like a poor man's nonce.

Brian Layman




------------------------------

Message: 4
Date: Mon, 16 Jul 2012 14:09:29 -0400
From: Brian Layman <wp-hackers at thecodecave.com>
Subject: Re: [wp-hackers] What would strip $_POST before 'init' runs?
To: wp-hackers at lists.automattic.com
Message-ID: <500458D9.4030702 at thecodecave.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Ignore my last question. I do see Apache referenced in the screen shot.  
When you said it wasn't respecting .htaccess, I began wonder.  It fit 
with your situation, if you were posting using curl.  But even if nginx 
was in front of apache as a proxy, I think if apache is serving the 
error code, nginx's cookie setting could not be the issue here.

Brian Layman

On 7/16/2012 1:51 PM, Mike Walsh wrote:

> https://dl.dropbox.com/u/10343959/GForm_SS_21.png Can anyone think of 
> configuration (I am assuming it is at the Apache level) that would 
> cause this? 




------------------------------

Message: 5
Date: Mon, 16 Jul 2012 14:12:37 -0400
From: Mike Walsh <mpwalsh8 at gmail.com>
Subject: Re: [wp-hackers] What would strip $_POST before 'init' runs?
To: wp-hackers at lists.automattic.com
Message-ID:
	<CAMg3evG=9KmViBRbSyk+PvCMxJjPwkP+pJpHQaa1iB=Su5kNzg at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

I am not sure of anything on this problem!

In the Response Headers "Server" is reported as "Apache".  Is there some
other way to detect "nginx"?

Mike

On Mon, Jul 16, 2012 at 2:04 PM, Brian Layman <wp-hackers at thecodecave.com>wrote:

> On 7/16/2012 1:51 PM, Mike Walsh wrote:
>
>> Can anyone think of configuration (I am assuming it is at the Apache
>> level) that would cause this?
>>
>
> You are certain it is apache and not nginx right? Nginx throws a setting
> into your cookie to ensure that you are coming from the site and not from a
> generic posting tool.  At times it operates like a poor man's nonce.
>
> Brian Layman
>
>
> ______________________________**_________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.**com <wp-hackers at lists.automattic.com>
> http://lists.automattic.com/**mailman/listinfo/wp-hackers<http://lists.automattic.com/mailman/listinfo/wp-hackers>
>



-- 
Mike Walsh - mpwalsh8 at gmail.com


------------------------------

Message: 6
Date: Tue, 17 Jul 2012 02:21:40 +0300
From: scribu <mail at scribu.net>
Subject: Re: [wp-hackers] WordPress moving to PHP 5.3x?
To: wp-hackers at lists.automattic.com
Message-ID:
	<CABzSYNONdnrUr4XDs6HFHw+WTcVKUB5huFEW6VBJBr9BVBTSiQ at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

It just dawned on me that with PHP 5.3 namespaces, I wouldn't need to do
these crazy hacks to have a common set of functions bundled with each
plugin. I could just load them under that plugin's namespace only.

That said, I won't venture to give advice on what you should do with your
projects; you know better than anyone what your goals are.

-- 
http://scribu.net


------------------------------

Message: 7
Date: Tue, 17 Jul 2012 03:08:08 +0300
From: scribu <mail at scribu.net>
Subject: Re: [wp-hackers] WordPress moving to PHP 5.3x?
To: wp-hackers at lists.automattic.com
Message-ID:
	<CABzSYNPv43+HEnxtAwtgCr+e_5reDv-d64wr9KS2Ww9HXV1cxg at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

On Tue, Jul 17, 2012 at 2:21 AM, scribu <mail at scribu.net> wrote:

> It just dawned on me that with PHP 5.3 namespaces, I wouldn't need to do
> these crazy hacks to have a common set of functions bundled with each
> plugin. I could just load them under that plugin's namespace only.
>

Turns out what I was thinking about isn't possible with PHP namespaces:
*
*
*<?php

namespace MyPlugin;

require 'my-framework.php';*

Unless my-framework.php also has the *namespace MyPlugin;* declaration, all
it's functions will still be loaded in the global namespace.

PHP 5.3, still a fractal of bad design.

-- 
http://scribu.net


------------------------------

Message: 8
Date: Tue, 17 Jul 2012 10:10:17 +1000
From: Daniel Fenn <danielx386 at gmail.com>
Subject: Re: [wp-hackers] WordPress moving to PHP 5.3x?
To: wp-hackers at lists.automattic.com
Message-ID:
	<CAJ5Hi2iqq3QDzYn9-T8YEnO9qib2ni06PMY2-W6nmQ9f0tx1fA at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

What about php 3.4? Same issue?
Regards,
Daniel Fenn






On Tue, Jul 17, 2012 at 10:08 AM, scribu <mail at scribu.net> wrote:
> On Tue, Jul 17, 2012 at 2:21 AM, scribu <mail at scribu.net> wrote:
>
>> It just dawned on me that with PHP 5.3 namespaces, I wouldn't need to do
>> these crazy hacks to have a common set of functions bundled with each
>> plugin. I could just load them under that plugin's namespace only.
>>
>
> Turns out what I was thinking about isn't possible with PHP namespaces:
> *
> *
> *<?php
>
> namespace MyPlugin;
>
> require 'my-framework.php';*
>
> Unless my-framework.php also has the *namespace MyPlugin;* declaration, all
> it's functions will still be loaded in the global namespace.
>
> PHP 5.3, still a fractal of bad design.
>
> --
> http://scribu.net
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


------------------------------

_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


End of wp-hackers Digest, Vol 90, Issue 37
******************************************



More information about the wp-hackers mailing list