Fork me on GitHub

Wish list: Bring back publication date/time in News admin  Bottom

  • Now that I've migrated from PostNuke .762 to Zikula 1.0.2 I'm really liking most of what I'm seeing. The biggest dislike comes from what I'm not seeing: the date/time of publication for news articles submitted in advance.

    As I prepare most of my stories a day or two in advance of publication to ensure a bountiful supply of new news items daily, the ability to see when something is scheduled to publish from the "News Publisher/View News Articles list" is essential to verifying a proper number of articles set to publish on each day. The only way I can do that now is by viewing each article individually or maintaining a separate tally sheet.

    Just thought I'd pass this along.
  • Oh, and while I'm at it the disappearance of a small input form to go directly to edit an old article simply by entering the sid number is also sorely missed.

    Thanks for listening!
  • Hi, there is already in ticket on this issue, check it here. Can (and will probably) be solved later on. You can already apply the hints I put in the ticket to get this functionality. But of course then you have to update module files.

    --
    campertoday.nl, Module development, Dutch Zikula Community
  • espaan

    Hi, there is already in ticket on this issue, check it here. Can (and will probably) be solved later on. You can already apply the hints I put in the ticket to get this functionality. But of course then you have to update module files.


    Thanks, espaan! I certainly don't mind editing PHP files, but as a noob I need to follow precise instructions provided by someone such as you who actually knows what they're doing. Looking at your instructions, I have but a couple of questions.


    1. Precisely where in pnadmin.php does the following code get added?

    Code

    if (DateUtil::getDatetimeDiff_AsField($item['time'], DateUtil::getDatetime(), 6) < 0) {
                $item['infuture'] = _YES . " (" . DateUtil::formatDatetime($item['time'],"%x") . ")";
            } else {
                $item['infuture'] = _NO;
            }


    2. How, precisely, does one go about completing your final instruction?

    Quote

    The language define _NEWS_INFUTURE should also be defined.
  • Hi,
    1. This code is added after the following code on line387 in pnadmin.php

    Code

    if ($item['ihome'] == 0) {
                $item['ihome'] = _YES;
            } else {
                $item['ihome'] = _NO;
            }
            $newsitems[] = $item;

    becomes:

    Code

    if ($item['ihome'] == 0) {
                $item['ihome'] = _YES;
            } else {
                $item['ihome'] = _NO;
            }
            if (DateUtil::getDatetimeDiff_AsField($item['time'], DateUtil::getDatetime(), 6) < 0) {
                $item['infuture'] = _YES . " (" . DateUtil::formatDatetime($item['time'],"%x") . ")";
            } else {
                $item['infuture'] = _NO;
            }
            $newsitems[] = $item;


    2. You have to edit the language files in News/pnlang/eng/admin.php and add that language define. Of course choose the language you are using if not english icon_smile

    Code

    define('_NEWS_REJECTED', 'Rejected');
    define('_NEWS_UNKNOWN', 'Unknown');

    becomes:

    Code

    define('_NEWS_REJECTED', 'Rejected');
    define('_NEWS_UNKNOWN', 'Unknown');
    define('_NEWS_INFUTURE', 'Future Publication');

    Or whatever you would like in the header of the news overview.

    And it never hurts to make a backup of the original files icon_wink
    (e.g. pnadmin.php -> pnadmin_original.php), then you can always go back to the original if something is messed up. Or add some comments above the changes you inserted like

    Code

    // ADDED according to ticket 297, YOURNAME, 271008
    Good luck


    --
    campertoday.nl, Module development, Dutch Zikula Community
  • Thanks! That should be everything that I need -- and yeah, I've learned the whole rename-to-something-else-just-in-case the hard way years ago. I'll play with it tonight.
  • Thank you, espaan, for writing instructions for the braindead like me -- it worked like a charm!

This list is based on users active over the last 60 minutes.