Forums

Attachments post_parent

  1. Image Extractor is a WordPress plugin that extract the first image from the post and display it.

    Image Extractor is a WordPress plugin that extract the first image from the post and display it. The plugin main feature is the capability to resize the image found to a destination size. The final image is cached in a folder, so you can obtain better performances.

    Image Extractor will enable a new template function. It output a complete IMG tag to be inserted into your HTML code. The image source is retrieved from the first image found in the current post.

    1) Download the .zip file and extract it 2) Upload the extrated folder (imageExtractor/) to the WordPress plugins folder (wp-content/plugins/) 3) Configure the imageExtractor.php file and set the right cache folder. Make sure its writable. 4) Activate the plugin from the WordPress back office panel

    Syntax

    The syntax is:

    image_extractor($resize=false, $resize_type=1, $width='', $height='', $class='', $id='', $prefix='', $suffix='')

    where:

    1) resize: indicate if the plugin has to resize the image and store it in the cache folder 2) resize_type: there are 3 type of resizing: a) 0 -> image will be resized to the new output size, regardless of the original aspectratio. (default) b) 1 -> image will be cropped if necessary to preserve the aspectratio and avoid image distortions. c)2 -> image will be resized preserving its original aspectratio. differences to the new outputsize will be filled with white

    3) width: the destination width. If resize is false, this property only add/change the WIDTH attribute of the IMG tag 4) height: the destination height. If resize is false, this property only add/change the HEIGHT attribute of the IMG tag 5) class: add or change the CLASS attribute of the IMG tag 6) id: add or change the ID attribute of the IMG tag 7) prefix: add a prefix to the resulting IMG tag 8) suffix: append a suffix to the resulting IMG tag

  2. Advanced charting. Write charts directly in your posts with simple scripting language! Very very alpha, but has some working features, such as the bon

    Requires that your PHP installation has GD support enabled.

    Simply extract the plugin archive into your WordPress plugins directory and activate the plugin.

    Will there be any progress in the plugin development?

    I don't know. I hope to improve it some day. Now I simply don't have time and energy for that. Maybe someone else does something?

    Creating blog statistics page

    Create a page and insert PasiChart script similar to examples below:

    [[PASICHART blog y][caption Blogging History at Pasi.fi (Yearly)][size 440,200]]

    [[PASICHART blog monthly][caption Blogging History at Pasi.fi (Monthly)][size 440,200]]

    [[PASICHART blog w 49][caption Last 7 Week Blogging History at Pasi.fi (Weekly)][size 440,200]]

    [[PASICHART blog d 14][caption Last 14 Day Blogging History at Pasi.fi (Daily)][size 440,200]]

    In the first option brackets, "blog" means that this chart is blogging stats bar graph. After that you can select stats type by typing either yearly, monthly, weekly or daily (you can abbreviate these as shown above). After this you can select the number of days included, counting backwards from today.

    Second, there's caption brackets. Just write the caption you want or leave it out entirely to have no caption.

    Finally, use the size brackets to determine the dimensions of the chart image. The size of the chart itself depends on the surrounding elements.

  3. 1. i'm not sure about "anyone", since it requires access to the dashboard, but the plugin is user-aware. both myself and my girlfriend log our weights separately using a single installation.

    2. currently the plugin folder needs to be called "hackersdiet". otherwise the activation code isn't run. i haven't checked yet that the zip created by this repository follows that. i'll update if needed. i haven't looked into a way to not require this yet.

  4. Oh, I'm sorry, the WYSIWYG editor was causing the problems. Thanks for the quick help =)

  5. Ok, cool. I'll check out both and report back after I come to some kind of resolution.

  6. You were right, the post_parent field in WP 2.8.3 is set to bigint(20) UNSIGNED.

    The attach_uploads function in xmlrpc.php calls (Line 2272):

    "SELECT ID, guid FROM {$wpdb->posts} WHERE post_parent = '-1' AND post_type = 'attachment'"

    I changed the -1 to 0 and it seems to work properly again:

    SELECT ID, guid FROM {$wpdb->posts} WHERE post_parent = '0' AND post_type = 'attachment'

    I suppose you could change the mw_newMediaObject function to not use -1 as post_id (Line 2879), but either way that seems to fix the problem (at least until we get an official XML-RPC fix).

    I don't like touching core files, but I don't know of another way of fixing that issue.

    Thanks for the help.

    • Item 1 is probably do-able although I never really considered it before.
    • Item 2. is 'do-able' and could probably be used for item #1 since the link URL would have to be entered by the user - entering the URL for a post would be considered just another link. Adding external links is on my list of things to add anyway.
    • Item 3. It would be possible to indicate a user's preference to include or exclude class information. Not sure how you could easily "assign css and/id to each item". You can assign an id to the whole thing now if you use the function call or put the function call inside a div with a selector name. Each navigation list is given a class that corresponds to the name of the list and since each one is unique you effectively have a 'name' although it is still a 'class' and not a 'selector'.
  7. can you give some more detail about how and where to add <?php do_action('comment_form', $post->ID); ?>
    to comments.php template. ?

  8. ebrillblaiddes
    Member
    Apr 15, 2007, 1:40 AM

    This plugin is acting really strange for me...it works but I get an error message similar to the one above when I try to do pretty much anything on the site, including commenting (which is a problem since other people could see the problem).

    My hosting service has MySQL 4.1 installed, so it's not that.

    The error message is as follows:
    Warning: Cannot modify header information - headers already sent by (output started at /home/geek9736/public_html/immersion07/wp-content/plugins/front_page_excluded_cats.php:56) in /home/geek9736/public_html/immersion07/wp-includes/pluggable.php on line 275

Leave a Reply

You must log in to post.


About this Topic