thereformation
Forum Replies Created
-
Forum: Hacks
In reply to: image upload in custom options page $_FILES emptyAhh, I missed that as well.
Forum: Localhost Installs
In reply to: Error establishing a database connection …What port is mysql running on? usually its 3306.
Try adding in the port as well?
I take it that you do have a mysql user set up as per your wp-config file?
Forum: Hacks
In reply to: image upload in custom options page $_FILES emptyIts better I think to integrate in with the standard wordpress media upload functionality, so that your users can use images that might already be in the library. You can do this fairly easily in a theme options page. There is a good example here: https://www.deluxeblogtips.com/2011/03/meta-box-script-update-v30.html to get you started.
But back to you actual issue;
Is any data getting passed into your validation method? What does a var_dump() of your $plugin_options show?Forum: Hacks
In reply to: wp_update_attachment_metadata not creating the other image sizesHave a look at the regenerate thumbnails plugin. Seems to do basically what you are after.
Forum: Localhost Installs
In reply to: localhost VS developement serverI do the same type of thing to my hosts file, but I create URLs that resolve locally to folders within my users/sites folder.
I’ve found its always faster to develop locally with no network lag than it is to develop on a remote server.
Forum: Hacks
In reply to: Skip first attachment on a get_children arrayThere is usually no guarantee that the first image will be the featured image.
What I do is find the ID of the featured image, if there is one, and then skip it when iterating over the returned array of attachments. Many ways to skip over it, following is fairly simple.
if ( has_post_thumbnail($post->ID) ) { $id = get_post_thumbnail_id($post->ID); } foreach ($attachments as $attachment) { if($attachment->ID != $id) { //get your attachments } }
Forum: Localhost Installs
In reply to: You do not have sufficient permissions on mac os 10.6.8Yeah, but it sounds like you are able to log in, which means wp can access your database to look up the users table.
Does the front end of the site run at all?
Forum: Hacks
In reply to: addin meta-box to the attachment edit-pageNo probs.
Forum: Hacks
In reply to: addin meta-box to the attachment edit-pagelook at attachment_fields_to_edit and attachment_fields_to_save.
There is a tut here: https://net.tutsplus.com/tutorials/wordpress/creating-custom-fields-for-attachments-in-wordpress/
Forum: Localhost Installs
In reply to: You do not have sufficient permissions on mac os 10.6.8You probably need to set your group to be www or nobody, with read/write privs to you get it going. Then you should be able to knock back the privs to write only for your uploads/ theme directory.
I usually install into my users/sites folder, then configure http vhosts to point to the correct location, along with editing hosts so I can run wordpress sites under domains like example.loc
Forum: Developing with WordPress
In reply to: Help Needs for API DevelopmentYou can definitely build different front end clients that interact with the WordPress API.
I built a AMF php bridge between ActionScript and WordPress.
All you really need to do is bootstrap wp_load.php to access most of the wordpress API. If you need write capabilities, you would need to bootstrap admin.php.
XMLRPC is also another way to go.
If its just an image, you wont be able to. The only way would be to host the image within a page.
Why don’t you just link any images to their attachment page, and style that page so it has a black background?
Forum: Hacks
In reply to: add a gallery meta box to "add new" post?There are numerous metbox classes about that will let you add your own metbox fields to any post type of your choice.
Have a look at this class.
https://www.deluxeblogtips.com/2011/03/meta-box-script-update-v30.html