We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32640
    • 2 Posts
    Dear contributors

    I am very new to MODx, and for that reason I am using a copy of Antano Solar John’s MODx Web Development to get me over the first few big hurdles of learning MODx. The MODx version used in the book is 0.9.6.1p2. In Chapter 4, ’Newspublisher’ is used to lead the reader through the concept of a blog and to introduce concepts such as variables, data types, snippets, chunks, etc.

    I have installed the most recent stable version, 1.0.2., on my system. As I have found from my personal experience and confirmed on the forums, version 1.0.2. does not come with the ’Newspublisher’ snippet installed. Nor have I been able to find the ’Newspublisher’ snippet in the MODx resources area to download and install. I am assuming it is not supported any more.

    I, nonetheless, wish to obtain and install this snippet on my system, so that I can benefit from the tutorial in the above-mentioned book. Furthermore, I have located via a google search, a text file containing the code for the ’Newspublisher’ snippet.

    I have three questions:

    • I read in the Wiki somewhere, that the ’Newspublisher’ snippet can still be used effectively in the most recent stable version (event though it doesn’t ship with it). Is this indeed so?
    • Is there a way of obtaining a downloadable version of the ’Newspublisher’ snippet (and any dependent files, should it require them)? If there is, please advise me where and how.
    • Does the ’Newspublisher’ snippet have dependent files? If not, am I able to just copy the code from the above-mentioned "code for the ’Newspublisher’ snippet" and paste it into the ’snippet code’ area when creating a new snippet?

    I’d love a response soon. I’ve been whipping this apparently dead mule for days with no sign of life in it, but I’m hoping there may be some life in it yet.

    In anticipation, thanks for your support.

    regards

    Woomera
      • 16278
      • 928 Posts
      I think you can get a true version of NewsPublisher if you download MODx 0.9.6.3 from the MODx site: http://modxcms.com/download/. Install this version of MODx and you will find NewsPublisher in the snippets as a complete script in the manager, including the HTML template for its standard input form.

      MODx 1.0.0 onwards does not include NewsPublisher, due, according to the release notes, to its lack of support for template variables. (What the notes don’t tell you is that the sample site assumes you will write your blog with a manager login using Quick Manager).

      If you install MODx 1.0.2 over 0.9.6.3 as an upgrade, you’ll still have NewsPublisher, plus all the nice things in the later version.

      Once you’ve found your way around the MODx structure and terminology, you might like to have a look at PubKitBlog, which I produced as a front-end input for news and blogs when I found NewsPublisher lacking in extensibility.
      wink KP
        • 32640
        • 2 Posts
        Hi kp52

        Thanks for the good-oil!

        I considered your strategy today (I downloaded and installed 0.9.6.3 - the whole bit). But then I looked at the Wiki about upgrading (http://svn.modxcms.com/docs/display/Evo1/Upgrading) and for my level of experience, all the suggested backups and changing names of elements to ensure they wouldn’t be overwritten, etc, was just a little bit too much for me to be willing to undertake. Given a few months more experience, where the probability of success would be higher, I might have given it a crack. It’s surely a good solution. For the moment though, it just seemed too awesome a task to undertake.

        In the meantime, I went over to the #MODx IRC channel. Piecing together fragmented ideas from three users, I was able arrive at my own solution which I think is considerably less demanding than installing an older version with the snippet then upgrading it. I will refer to it below and respond to some of the questions I posed in my original post, should there be others in the future in a similar situation to mine.

        I have just created the NewsPublisher snippet on MODx 1.0.2. and confirmed that it operates, so that is a clear answer to the first question (of three) I posted.

        To answer the third question: the NewsPublisher snippet (based on my experience and research thus far) does NOT have dependent files that have to be strategically planted in some deeply rooted directory. Once I had a valid copy of the NewsPublisher source code (see below for link to location), it was simply a matter of creating a new snippet and copying and pasting the source code from the .txt file into the ’Snippet code (php)’ field of the ’Create/edit Snippet’ manager: in the manager panel for MODx follow: Elements -> Manage Elements -> Snippets -> New Snippet. Take note of the name you give when providing the ’Snippet name:’, as it will be what you need to use for the snippet call in the documents or templates that call the snippet.

        And finally: the response to the second question. This link to a forum thread (http://modxcms.com/forums/index.php/topic,3220.0.html) puts you within one click of the source code of the NewsPublisher snippet. In the very first post, by Mark, Topic: [Snippet] NewsPublisher; Title: Critical Patch. Under the last line of the post, "Please upgrade ASAP...", you will see a small download icon with the filename: snippet.newspublisher.1.4.txt This is the file with the snippet source code.

        And that should be that.

        I’m not suggesting that NewsPublisher is worth the effort for a person looking for a front-end blog tool. As kp52 pointed out, there are more up-to-date assets out there offering greater versatility, such as PubKitBlog. I merely needed NewsPublisher because it is a significant component of a dated tutorial resource I am using and for me to get the most out of the tutorial, it was important for me to try to get NewPublisher working on my system.

        By the way, kp52, once I work through the tutorial book and have gathered more experience with MODx, I will be giving PubKitBlog a good looking at. I’ve already seen it mentioned on a few forum posts/threads.

        Thanks again for your assistance and advice.

        8) Woomera
          • 4790
          • 1 Posts
          Thank you very much for this post! I too have been following the book MODx Web Development by Antano Solar John after a few frustrating hours of being unable to work out what was wrong, I realised that my release of MODx did not include ’News Publisher’! Thanks to this post I know how to rectify this problem.

          Thank you once again!