Magic Fields 1.0 - Really confused

12 views
Skip to first unread message

tsiger

unread,
Aug 29, 2009, 2:17:10 PM8/29/09
to Flutter Support
Hi guys and thank you for the excellent plugin. It's exactly what i
needed. The thing is that i've found this one http://magicfields.org/
and looks like flutter. what's the deal? weird...

Navid Safabakhsh

unread,
Aug 29, 2009, 5:17:48 PM8/29/09
to tsi...@gmail.com, Flutter Support
It's a fork project off of flutter. What are you confused about?

tsiger

unread,
Aug 29, 2009, 5:51:57 PM8/29/09
to Flutter Support
it doesn't mention anywhere that's a fork and i can't see anything
different, this is where i am confused

On Aug 30, 12:17 am, Navid Safabakhsh <na...@freshout.us> wrote:
> It's a fork project off of flutter. What are you confused about?
>
> On Aug 29, 2009, at 11:17 AM, tsiger <tsi...@gmail.com> wrote:
>
>
>
> > Hi guys and thank you for the excellent plugin. It's exactly what i
> > needed. The thing is that i've found this onehttp://magicfields.org/

marko j

unread,
Aug 30, 2009, 5:24:15 AM8/30/09
to Flutter Support
Well, their site mentions it's a fork now. Since the freshout team
seems pretty inactive regarding flutter, hopefully these guys pick
things up and fix the numerous bugs.

By the way, flutter itself is a fork of Rhymed Code's custom write
panel. http://rhymedcode.net/projects/custom-write-panel, which isn't
mention anywhere as far as i can tell.

Karl K

unread,
Aug 30, 2009, 12:03:15 PM8/30/09
to Flutter Support
The knock on all Wordpress plugins, as awesome a community of coders
it's brought in, the plugins generally lose support and go away.

With Wordpress popularity exploding the 'free' plugin writers can't
keep up with the needs... why rhymed codes' custom write panel went
away. I got a lot of use out of the Photopress plugin and the support
went away on that for over a year, so I went hard-code. Looks like
Photopress is back in action though.

Freshout hopefully has gained a bunch of new clients to cover their
time and effort in working on Fresh-Page/Flutter.

They both have some basic flaws based on the original 'rccwp' - the get
('customfield'); is horrible if you have several fields to display.
Using GET on a homepage ended up with almost 400 database queries just
on that page. OUCH, nevermind archives or searches.

The standard WP function - 'get_post_custom' works so much more
efficiently.

phpThumb is another issues, a great application in and of itself. But
when you're using it multiple times it causes issues. A pre-press
release in Chicago for one of my sites cause Hostgator to shut down my
site (eventually two others). The phpThumb call itself was causing to
much drag on their server, so they disabled it, then my 404 errors
shot through the roof because the images couldn't be pulled. Even now
I'm using a cloud server on an admittedly very heavy image based site,
and phpThumb uses over 60% of the total resources. (YES, I'm using WP-
Super-Cache & phpThumb is caching the images)

I've made a plugin for my own use that uses phpThumb to create the
image based on the flutter fields, then adds the new image to a custom
field, and then I set the theme to pull the newly created static image
file rather than the phpThumb version.

Freshout is awesome, I wish they'd charge $100 each so they could
really put some effort into making it perfect.

MagicFields.org looks interesting and a new 'Category Write Panels'
sounds very promising as a plugin as well.

May the best MU custom field solution WIN!


Karl
karlkevilus.com




On Aug 30, 4:24 am, marko j <marko.jan...@gmail.com> wrote:
> Well, their site mentions it's a fork now. Since the freshout team
> seems pretty inactive regarding flutter, hopefully these guys pick
> things up and fix the numerous bugs.
>
> By the way, flutter itself is a fork of Rhymed Code's custom write
> panel.http://rhymedcode.net/projects/custom-write-panel, which isn't

snak detek+0r

unread,
Aug 30, 2009, 6:55:20 PM8/30/09
to kkev...@gmail.com, Flutter Support
> shot through the roof because the images couldn't be pulled. Even now
> I'm using a cloud server on an admittedly very heavy image based site,
> and phpThumb uses over 60% of the total resources. (YES, I'm using WP-
> Super-Cache & phpThumb is caching the images)
>
> I've made a plugin for my own use that uses phpThumb to create the
> image based on the flutter fields, then adds the new image to a custom
> field, and then I set the theme to pull the newly created static image
> file rather than the phpThumb version.


i'm very curious about this. could you elaborate a bit? this last
project using flutter was the first time i'd used phpThumb ... so i've
made certain assumptions about how it's working, but i don't really know
much of anything for sure. for example, i had assumed that if you cached
the rendered images, they would load as fast as any other image. this is
really not true? what did you do to solve the problem? (sure you don't
want to post your code to the list? hint hint...). and can't you just
write a conditional into phpThumb that checks to see if a cached image
exists before it does anything processor-intensive? i'm surprised they
don't already do this in an elegant manner....


> MagicFields.org looks interesting and a new 'Category Write Panels'
> sounds very promising as a plugin as well.

totally agree about all this. just to add a bit more information: from
my communication with the magic fields guys, the first release is just
meant to shore up, fix & consolidate flutter. the only new thing is the
addition of a getGroupOrder() -- which, as i remember *replaces*
getGroupDuplicates().

> May the best MU custom field solution WIN!

i just feel like the efforts to make a good CMS addon for wordpress is
spread too thin. i'm heartened by magicfields, but at the same time
concerned that it will drift away from flutter (in terms of
interoperability), just as they are coming out with their next big
thing. it also seems like group discussion format is an incredibly
inefficient way of solving problems -- since the overall discussion does
not have any inherent structure, it is often hard to find the solutions
to problems, which means many wheels are invented many times over. i
also don't feel like it's a good format for renewing dormant threads, so
many ideas are simply lost to time.

but mostly i just wish i were a better coder. i think WP-as-a-CMS is on
verge of coming into existence for real, and it would be fun to be able
to take a more involved role.

cheers,
josh


Karl K

unread,
Aug 30, 2009, 8:30:56 PM8/30/09
to Flutter Support
Funny thing about coding, you don't have to really know that much
about it anymore. There is so much code already written you can copy/
paste your way through almost anything.

Flutter doesn't use anything outside of the normal Wordpress
capabilities, you can use custom fields without Flutter, it's just not
pretty. My concern is not so much the plugin capabilities, I'm just
frustrated that once the wheel is invented they want you to take the
whole car. I don't want the car... just the wheel. I think Flutter
could have been split into 5 separate plugins that could work
together, but also independently. I wrote a plugin that geocodes and
maps posts based on custom fields. It works great with Flutter, but
will work with any plugin that uses custom-fields. Why not add this
feature to the overall CMS package? Because not everyone needs
geocoding/mapping, why add the load? If a plugin stays reasonably
within the framework of Wordpress there are no worries with
interoperability.

Here is why you don't want to use the 'GET' method.

Put the following code in your footer:
<?php echo $wpdb->num_queries; ?> <?php _e('queries'); ?>. <?php
timer_stop(1); ?> <?php _e('seconds'); ?>

Review your website and see how many queries each page is generating.

If you're using WP as a CMS with 'GET' the queries will hammer you.

I've seen pages using 'GET' in a wp-magazine theme that had 661
queries on the home page. Sure with caching it only pulls it once per
hour, but it's still bad code.

Using the following instead method queries all of the custom-fields
for the post as two queries. This is vital if you've got write panels
with lots of fields.

The function can be called once on the page, or put in theme header if
necessary.

<?php
function array_combine_keys($keyArray, $valueArray)
{
if(is_array($keyArray))
{
foreach($keyArray as $key => $value)
{
$filledArray[$value] = $valueArray[$key];
}
}
return $filledArray;
}
?>

Then you query the custom field data -

<?php

$mycustomfieldsa = array_values($wpdb->get_col("SELECT meta_key FROM
wp_postmeta WHERE post_id = ".$post->ID." AND post_id > 0"));
$mycustomfieldsb = array_values($wpdb->get_col("SELECT meta_value FROM
wp_postmeta WHERE post_id = ".$post->ID." AND post_id > 0"));
$allmycustomfields = array_combine_keys($mycustomfieldsa,
$mycustomfieldsb);
?>

Once the data is queried you can do whatever you want with it, to
simply show it:

<?php
echo $allmycustomfields['thiscustomfield'];
?>

If you have duplicate fields you can use foreach to display each one.

phpThumb is another more complex issue... but saving a static image
is a much better way to go, I may release the plugin I'm working on to
work with flutter on this one, (I've got 7 different size phpThumb
images I use for each image - so I'll have to adjust for public
use)... more details later.

thanks,
Karl

David

unread,
Aug 31, 2009, 6:26:54 PM8/31/09
to Flutter Support
HI.

I will talk little about Magic Fields and what we want do it with
this plugin

Before to start with any new feature we consider to the code of
flutter (and of Magic Fields ) need be clean, optimized, fixed and
updated

Just this morning was removed ~700 lines of obsolete code and if
we take in account all lines to was removed in the first release,
Magic Fields has ~80 files less of flutter and ~15,000 lines less of
code.

And honestly i think this number will be bigger.

the first target is leave Magic Fields small, simple, and
lightweight, in this way if a bug appear will be more easy fix it
and avoid to anything else being broken in the process.

The second target is fix the issues in performance of Flutter, as
was mentioned, the number of neccesary queries for get a custom field
is exorbitant, and the problem of use Phpthumb, with Phpthumb we can
do alot of things but in this plugin we just need 4 functions. so, we
are discussing about what is the best approach for fix this.


if you want compare the source code of both plugins you can use this:

http://cloc.sourceforge.net/

here the link of my last comparison:

http://pastie.org/599053

if you want see the progress of MagicFields check out the Github
repository: http://github.com/hunk/Magic-Fields/tree/master

Thanks for your all suggestions and ideas :)

Karl K

unread,
Sep 1, 2009, 8:58:58 AM9/1/09
to Flutter Support
I think if you're going to use phpThumb the complete 'phpThumb' should
be included. Even the demo folder. The configuration analyzer
@phpthumb/demo/phpThumb.demo.check.php is priceless in troubleshooting
phpThumb issues.

I'm using phpThumb function several different ways on my site.

- To crop the images.
- To resize the images.
- To watermark the images.
- To edge/border the images.
- To create a PNG map marker from the image

Essentially I can have 8 or 9 different version of the exact same
image. I'm working on a plugin and/or code that may help make this
easier.. more to come.

Karl

snak detek+0r

unread,
Sep 1, 2009, 10:08:41 AM9/1/09
to Flutter Support

Karl K wrote:
> I think if you're going to use phpThumb the complete 'phpThumb' should
> be included. Even the demo folder. The configuration analyzer
> @phpthumb/demo/phpThumb.demo.check.php is priceless in troubleshooting
> phpThumb issues.
>

i agree, but i don't see why phpThumb is internal to flutter/mf. why not
have it be modular? as Karl K said to me in an email a couple days ago,
why not divide it into about 5 different plugins, that you can use or
*not use* depending on what features you need.


snackd

Karl K

unread,
Sep 2, 2009, 8:02:27 AM9/2/09
to Flutter Support
I guess I have to agree with myself on that. My thought was that you
need phpThumb if people are going to have Image fields, but not
everyone is going to have image fields, so it should probably be a
separate module. Let the users with less baggage use the express
lane.

Karl
Reply all
Reply to author
Forward
0 new messages