Kategorie: Knacker Einfach

  • WP-Print

    Lester Chan, der Autor von WP-Print, hat sein Studium abgeschlossen und 2010 einen Fulltimejob angetreten, der ihm für die Weiterentwicklung seiner Plugins keine Zeit lässt – allerdings sagt er auch:

    However, I WILL still update my plugins whenever I can and you still can report bugs to me via email and I will try to fix it.

    Im angeschlossenen Forum wird dann auch geklärt, warum eine in einem Childtheme-Ordner abgelegte CSS nicht funktioniert und wie man das fixt:

    For use of child themes and „frameworks,“ replace „TEMPLATEPATH.“ with „STYLESHEETPATH.“ in print.php (in plugins directory): Note: gets overwritten with plugin upgrade and (because plug-in offers option to put editable copy in theme directory, see „Usage“ in documentation) print-posts.php (in theme directory): not overwritten with plugin upgrade Email me if anyone has questions. This way, if a parent theme is upgraded, your changes remain in the child theme directory, where edits are supposed to be done. This all assumes that your stylesheet is in your child theme directory. Worked fine using Genesis „framework“ and using child themes in general. (#)

  • Quotes Collection

    (Quelle: Srinis WordPress Lab) Quotes Collection plugin with Ajax powered Random Quote sidebar widget helps you collect, manage and display your favourite quotations on your WordPress blog. All quotes or a set of quotes can also be displayed on a page using a [quote] shortcode. The plugin is similar, and uses ideas from (though not based on) the old wp quotes plugin by Dustin Barnes.

    Plugin-Adresse: srinig.com/wordpress/plugins/quotes-collection/

    Einbauen in Artikel, gestüzt durch PHP Execution Plugin:

    [php]<?php quotescollection_quote(‚auto_refresh=5‘); ?>[/php]

  • Sidebar rausnehmen

    Bei Knacker einfach ist er jetzt wieder drin – so kann man ihn rausnehmen:

    [php]// Sidebar rausnehmen
    // programming.thematic4you.com/2010/01/how-to-remove…
    function remove_sidebar() {
    return FALSE;
    }
    // Connect the filter to thematic_sidebar()
    add_filter(‚thematic_sidebar‘, ‚remove_sidebar‘);[/php]

  • How to move page menu from #access to new div above header

    Just add to your child theme’s functions.php, no need to mess around w/ the core thematic files… that is the beauty of the whole setup.

    This will delete the thematic access from its current hook.

    [php]function remove_access() {
    remove_action(‚thematic_header‘,’thematic_access‘,9);
    }
    add_action(‚init‘,’remove_access‘);[/php]

    I always check this diagram when I need to figure out where stuff goes: bluemandala.com/thematic/thematic-structure.html

    To put it above the header div then you could add it to thematic_aboveheader() hook.

    [php]add_action(‚thematic_aboveheader‘,’thematic_access‘);[/php]

    Or to put it inside the header but before the branding, I think you’d need to move thematic_brandingopen() from hook 1 to hook 2 (see that diagram again).

    This will delete the thematic access and brandingopen from their current hooks.

    [php]function remove_defaults() {
    remove_action(‚thematic_header‘,’thematic_brandingopen,1);
    remove_action(‚thematic_header‘,’thematic_access‘,9);
    }
    add_action(‚init‘,’remove_defaults‘);

    add_action(‚thematic_header‘,’thematic_access‘,1);
    add_action(‚thematic_header‘,’thematic_brandingopen‘,2);[/php]

    Quelle: ThemeShaper Forums

  • TDD Recent Posts

    Datum von TDD Recent Posts einstellen in output.php, Zeile 37:

    [php]//Figure out what the current time is so that we are only getting results that are published in the past
    $time_difference = get_settings(‚gmt_offset‘);
    $now = gmdate("Y-m-d H:i:s",time());[/php]

    CSS-Anpassung, damit passend zu Standard-Layout von Wizzart – Recent Comments:

    [css]dl { /* typography.css */
    margin: 0;
    }
    .tddrecentposts dl{
    border: 1px dashed #E8CDAB;
    display: block;
    padding: 8px;
    text-decoration: none;
    margin-bottom:15px
    }

    .tddrecentposts dl:hover {
    background-color: #f2e7cd
    }[/css]

  • „Knacker Einfach“-Projektblog

    Last Updated Posts Plugin im Projektblog installiert. Modifikation in Zeile 88 von last-updated-posts-widget.php

    [php]echo " " . date($dateFormat, strtotime($obj->post_modified)); //sk Seperator[/php]

    Widget eingefügt und Zeit darin formatiert nach www.php.net/manual/de/function.date.php

    More Privacy Options von D. Sader eingefügt, kann im Gegensatz zu „Members Only“ von Andrew Hamilton auch Networked Blogs. Schwallt einen leider auf der Login-Seite zu. Ändert man durch das Auskommentieren von Zeile 235 und 236 in ds_wp3_private_blog.php

    Abonnenten nach Login nicht auf Dashboard sondern auf Startseite schicken – vorerst nur die hardcoded version in der login.php: in Zeile 548 (hier 3) wird der redirect von "admin_url('profile.php')" auf "site_url()" geändert:

    [php]//sk If the user can’t edit posts, send them to index.
    if ( !$user->has_cap(‚edit_posts‘) && ( empty( $redirect_to ) || $redirect_to == ‚wp-admin/‘ || $redirect_to == admin_url() ) )
    $redirect_to = site_url();
    wp_safe_redirect($redirect_to);
    exit();
    }[/php]

    TDD Recent Posts installiert.