halles
Forum Replies Created
-
40cooper i don’t really know what could be happening… i have that behaviour when adding flash assets (haven’t looked into it on how to fix that).
Have you checked if the assets are being correctly uploaded?
Did you add transitions to the piecemaker?
Forum: Plugins
In reply to: [The Piecemaker 2] [Plugin: The Piecemaker 2] Error When Adding AssetsI found out that the plugin tries creating directories under wp-includes which is plain wrong from a WP conventions point of view.
You have to create piecemaker-images and piecemakers (in wp-includes) and set permissions to 777 on those directories (not wp-includes, just the other two).
However, i made several modifications to the original plugin to adhere to WP standards, which fixes that, moves various of the routes under uploads, and several other changes. If uploads directory has permissions set to 777 it will create the proper directories. You can find it at https://code.halles.cl/the-piecemaker-2-for-wp-fork
Cheers!
Ok, i had it all wrong :p
What i did was create a function which calls the $pm instance of the PiecemakerMain class.
The function goes like this, and should be placed inside your functions.php file
/** * Function to use piece maker outside post content * **/ function display_piecemaker($att = null){ global $pm; if(!is_array($att)){ $att = array( 'id' => $att, ); } echo $pm->replaceBooks($att); }
Then you would call this function from anywhere on your template like this, being 1 the id of the desired piecemaker:
display_piecemaker(1);
or
display_piecemaker(array('id' => 1));
The second way of calling it, is because you can also pass the width and height as parameters (use them as array keys in the array).
This function should work on the original plugin since i’ve been fiddling around with it and changing a lot of stuff.
If it doesn’t work as is just ask and please attach the errors it may spit out ??
When adding it in a post, type [piecemaker id=”5″] in the editor, in the place you want to display it ??
the replaceBooks should be used when you want to call a Piecemaker from within you template code.
You only need o pass it the piecemaker’s id. For example, if you Piecemaker has id 2, execute this:
replaceBooks( array( 'id' => 2 ));
Matías
You can use the function “function replaceBooks($att, $content = null){}”
Look at the source code (file piecemaker-main.php line 1974) to see what parameters you should pass to the function. You should be able to call a piecemaker anywhere you want just using the id like this:
replaceBooks(array(‘id’ => some-id));
Haven’t tried it yet, but i should be testing this in a couple of hours so i’ll get back here with the results.
Forum: Networking WordPress
In reply to: Migrate WP 3.0 from subdomain to another subdomainCheck your wp_blogs table and check the domain names for your blogs… it seems that wp looks for a “available” blog, and if not, it raises that database connection error ??
I had the same issue just now.
Forum: Fixing WordPress
In reply to: Force ONLY relative linksI created another solution; a plugin that will strip the protocol and hostname from the url, leaving just a realtive url. It won’t strip the stuff from links already inserted into posts or pages but new links will just be created like said. You can download the stuff from here: https://halles.cl/wp/relative-links.php.zip or https://halles.cl/wp/relative-links.php.txt
I made it a plugin because it didn’t make a lot of sense putting into a single template, changing the template would break the system.
Hope you find it useful1!