We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26182
    • 164 Posts
    Hi,

    I have a few questions and would love to get some help with the answers.

    I am trying to create a newsletter system with a workflow that allows web users to post articles and other users to review them. When the articles are ready for publication I would like a central moderator to be able to publish the articles in a newsletter.

    At the moment I am trying to work out how to:

    - Extend the FCKEditor toolbar as displayed by the TV used by the NewsPublisher snippet call.

    - Add comments and ratings to articles.

    - Display articles per user (plugin perhaps?)

    If anyone has any suggestions, answers or proposals they are extremely welcome.

    Thanks.

    Sarah smiley
      • 26182
      • 164 Posts
      Ok so I’ve made a couple of placeholders. One to display the jot underneath news postings. This will only display if the user is on a page under the news listing parent folder.

      Another plugin does exactly the same except it displays the css star rating.

      Hmm still looking at other stuff..
        • 26182
        • 164 Posts
        ah right so you just alter the plugin configuration... now onto the other stuff...

        does anyone know where the hits on a post are stored and where the votes are stored for five star voting? i want to display a list of the most hit and the most voted for posts.

        any suggestions?
          • 26182
          • 164 Posts
          Ok I’m using this code to display the list of news articles I have now I want to be able to select certain ones and post them to a document template to make a newsletter... is there any good way to do this. Please help!

          <p>Make a newsletter with articles posted this month...</p>
          
          <p>Select the articles you want to publish in this newsletter by ticking the check box in the list below. Then press the button labelled "Make my newsletter!"</p>
          
          <form>
          
          <ul>[!Ditto? &parents=`48`&tpl=`articleSelect` &depth=`1` !]</ul>
          
          <input type="submit" value="Make my newsletter!" />
          </form>
          
            • 26182
            • 164 Posts
            Ok here’s the code that I have so far...

            Is it possible to define a form action? could I have a snippet call that would get the values of the posts from the database and make a new newsletter from the articles selected?

            <p>Make a newsletter with articles posted this month...</p>
            
            <p>Select the articles you want to publish in this newsletter by ticking the check box in the list below. Then press the button labelled "Make my newsletter!"</p>
            <form action="" method="post">
            <ul>[!Ditto? &startID=`48` &depth=`1` &tpl=`articleSelect`!]<ul>
            <input type="submit" value="Make newsletter!" />
            </form>


            <li>
            <input name="" type="checkbox" value="[+id+]" /> <a href="[~[+id+]~]">[+title+]</a><br>
            <p>[+summary+]</p>
            <p>[+link+]</p>
            <p>[+author+]</p>
            <p>[+date+]</p>
            </li>
              • 26182
              • 164 Posts
              Could somebody please help me?

              I’ve made a plugin that displays the ditto snippet call results but I don’t know how to put this into a form that can be processed...

              //This plugin ensures that only the files that are featured in the news directory appear with the jot snippet
              
              $Ditto = "<hr /><br />[!Ditto? &startID=`48` &depth=`1` &tpl=`articleSelect`!]";
              
              /// OK:  If on the site index page then there is no document ID which breaks the 'getDocumentIdentifier()' code
              if (! isset($_REQUEST['id'])) {
                 return;
              }
              
              $documentId = $modx->getDocumentIdentifier("id");
              
              //Check the parent directory
              $parent = $modx->getParent($documentId, 1, 'id');
              
              //The id of the news folder which is the parent directory for the blog posts
              $newsletter = 80;
              
              //If the parent directory is the news directory
              if (isset($parent['id']) && $parent['id'] == $newsletter)
              {
                    //Append the news snippet to the content displayed in the page
                    $modx->setPlaceHolder('Ditto', $Ditto);
              }
              else
              {
                    //Output the page content as normal
              }