• Resolved the-daily-slog

    (@the-daily-slog)


    Sorry, newbie here.

    1. I have 4 fixed categories to which I add text over the course of a week and then close them as a single post (under a date heading). I seek to have the text visible as it accumulates. Help, please.

    2. I am using the Twenty-Ten theme and seek to suppress the author and date detail. Deleting the single.php entry-meta div class didn’t help. Suggestions?

    TIA

Viewing 15 replies - 1 through 15 (of 18 total)
  • I am not sure I understand exactly what you are doing for question 1. Are you saving the daily text as a draft? Can you publish the post on the first day, and then update it during the week?

    For question 2, edit style.css at line 578, and change this:

    .entry-meta {
    color:#888888;
    font-size:12px;
    }

    to this:

    .entry-meta {
    display: none;
    color:#888888;
    font-size:12px;
    }
    Thread Starter the-daily-slog

    (@the-daily-slog)

    Thanks on question 2.

    WRT Q1, Non-registered community members submit entries for a weekly (push) posting and I need the interim compilation to be visible until the edition is closed, once per week. TIA.

    Where do you keep the ‘interim compilation’?

    Thread Starter the-daily-slog

    (@the-daily-slog)

    I seek to have the text visible during the weekly compilation process. We are a community with announcements of 4 categories: Congrats/Bereavement, Hospitality, Calendar and Personal/Basement. Members submit their announcements in a random process. I seek to give a weekly time stamp and volume wrapping to the total. TIA.

    I know you want to have it visible.

    I think I understand what you want to do in the future. I am trying to understand how you are doing it now before I try to suggest a different way. Does a member submit a post? Do you enter it daily into a post? Is the weekly summary a post?

    Thread Starter the-daily-slog

    (@the-daily-slog)

    At present, community members randomly email me notifications they want posted. I create and update an html page which closes weekly and then the process is renewed. TIA.

    Can you go ahead and post the first notification you get, then update the post as you receive more? What am I missing?

    Thread Starter the-daily-slog

    (@the-daily-slog)

    Yes, but I seek:

    • To effortlessly preserve the categories ordinal position
    • To automatically aggregate all categories into a single posting

    OK, a little progress in understanding the process. Here is what I think you are doing:

    • To start a new week, you create 4 different HTML documents with the first email from each category.
    • As you receive more emails, you add to the appropriate document of the 4.
    • At the end of the week, you paste each of the 4 category documents into a post for the week.

    If that is not correct, please explain further.

    To provide an automated solution, I will need to have a link to your site, possibly access to your theme’s code, and some specifics about the location and names of the 4 documents for a week. If you are using a freely available theme, I can download it and install on my test site. If the theme is a premium (purchased) theme, I may not be able to help.

    After thinking about this a little more, I think I have a solution although it may require some changes based on your needs. My idea is to use a shortcode in the weekly post to read in the four category files.

    Here is how to implement it:

    • Create a folder named ‘notifications’ off your site home folder.
    • Each week create a subfolder of notifications named for the starting day of the week, in the format ‘yyyymmdd’.
    • From looking at the link you provided, I have assigned names of ‘announcements.html’, ‘hospitality.html’, ‘calendar.html’, and ‘personal.html’ for the 4 files to go in each week’s folder. Create these as empty files to start the week.
    • Add the code below to your functions.php file to create the shortcode filter.
    • Create a post to start the week, and place the shortcode ‘[mm-notifications week=yyyymmdd]’ where you want the 4 files inserted. The files will be inserted in the order that you define the names in the code.

    If this is totally off-track, please let me know.

    The code:

    <?php // Format: [mm-notifications week=yyyymmdd]
    // Include four HTML files from subdirectory ABSPATH/notifications/$week/
    function mm_notifications_func($atts) {
    	extract(shortcode_atts(array(
             'week' => '',
                                    ), $atts));
       $file1 = 'announcements.html';
       $file2 = 'hospitality.html';
       $file3 = 'calendar.html';
       $file4 = 'personal.html';
       $files = array($file1,$file2,$file3,$file4);
       $warn = '<span style="color: red; font-weight: bold;">WARNING:</span>';
    	$output = '';
       if (!preg_match('/\d{8}/',$week)) {
          $output = "$warn The week parameter is incorrect or  missing. Please use YYYYMMDD format.";
       } else {
         foreach ($files as $file) {
           $filepath = ABSPATH . "notifications/$week/$file";
           $fh = fopen($filepath,'r') or $error=true;
           if ($error) {
             $output .= "<p>$warn $filepath cannot be opened.</p>";
           } else {
             $output .= fread($fh,filesize($filepath));
             fclose($fh);
           }
         }
       }
       return $output;
    }
    add_shortcode('mm-notifications', 'mm_notifications_func');
    ?>
    Thread Starter the-daily-slog

    (@the-daily-slog)

    Wheeew! Thanks for the effort. I will give it a try on Sunday (after our sabbath)…

    Thread Starter the-daily-slog

    (@the-daily-slog)

    Alas, not quite……

    When text “mm-notifications week=20100702” (with and without []) is entered and attempted to save draft:

    “Warning: Cannot modify header information – headers already sent by (output started at /home5/bermansh/public_html/bulletin/wp-content/themes/twentyten/functions.php:2) in /home5/bermansh/public_html/bulletin/wp-includes/pluggable.php on line 890”.

    See attached screen capture.

    I am using the standard Twenty Ten 1.0 by the WordPress team
    The 2010 default theme for WordPress.

    All of this theme’s files are located in /themes/twentyten.

    TIA.

    Thread Starter the-daily-slog

    (@the-daily-slog)

    Alas, and now I can’t access anything as I get:

    Parse error: syntax error, unexpected ‘<‘ in /home5/bermansh/public_html/bulletin/wp-content/themes/twentyten/functions.php on line 543

    despite having replaced the entire functions.php which ends on line 542

    I am terribly sorry for the trouble. It turns out that the TwentyTen theme’s functions.php is TOTALLY different from others.

    I think you would OK after deleting all the code I supplied. If not, replace functions.php with a fresh copy from a new download of WP 3.0. If you don’t want to do that, I can email you a copy if you email me at mmcdonaldky =at= gmail.com.

    Once you are working again, it would be wise to create a child theme of TwentyTen to hold your changes. That is really easy to do:

    • Create a new folder in the themes folder – call it twentyten-child.
    • Copy the file below into twentyten-child/style.css.
    • Go to Admin->Appearance->Themes, and activate the child theme.
    • Done!

    Now, any changes you make can be to the child, leaving the parent untouched.

    Put the code I showed earlier into a new functions.php in the child folder and give it a try.

    Again, very sorry for the trouble.

    style.css:

    /*
    Theme Name: Twenty Ten Child
    Description: Child theme for the Twenty Ten theme
    Author: Your name here
    Template: twentyten
    */
    
    @import url("../twentyten/style.css");
    Thread Starter the-daily-slog

    (@the-daily-slog)

    Aargh! same error

    Parse error: syntax error, unexpected ‘<‘ in /home5/bermansh/public_html/bulletin/wp-content/themes/twentyten-child/functions.php on line 542

    It doesn’t like your code.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Aggregating within posts and suppressing class display’ is closed to new replies.