We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8619
    • 229 Posts
    Ok, here is the scenario:

    I have a main page called ’Gallery’ on my site. I have created child pages, specific to each incident or event that I want to show up in the main gallery page. Here is what I want to do, but I’m not sure how to accomplish this:

    1. Have the main ’Index’ page of the site show the most recent gallery addition, with the title and introtext of the gallery;
    2. Have the main gallery page show a random picture from the child gallery page with the title, date and introtext from that specific child gallery page;
    3. Allow managed users access to create a new child gallery page easily and upload a maximum of 6 pics into the gallery with the title, date and introtext for that gallery without having to go into the main content managment system to create a new child page (computer and user friendly for the users).

    Any help would be greatly appreciated!

    Thanks!

    Elliott
      • 7923
      • 4,213 Posts
      Quote from: ejcross at Dec 26, 2006, 09:10 AM

      1. Have the main ’Index’ page of the site show the most recent gallery addition, with the title and introtext of the gallery;
      Use Ditto to get the most recent document from the folder that holds the gallery pages. If you need a picture from that gallery, use MaxiGallerySolo and the [+id+] placeholder from Ditto as &gal_ids parameter.
      Quote from: ejcross at Dec 26, 2006, 09:10 AM

      2. Have the main gallery page show a random picture from the child gallery page with the title, date and introtext from that specific child gallery page;
      Same as above, but retrieve all documents from the folder.
      Quote from: ejcross at Dec 26, 2006, 09:10 AM

      3. Allow managed users access to create a new child gallery page easily and upload a maximum of 6 pics into the gallery with the title, date and introtext for that gallery without having to go into the main content managment system to create a new child page (computer and user friendly for the users).
      Modify NewsManager snippet what some usergroup can use to create new documents to the gallery folder. Have the MaxiGallery snippet call in some template and use it’s parameters to limit the maximum pics amount to 6 and make the NewsManager snippet to use that template when creating new documents.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 8619
        • 229 Posts
        Ok, I have spent several hours trying to figure out the Ditto with MaxiGallerySolo to get the main page to work. You said:

        Use Ditto to get the most recent document from the folder that holds the gallery pages. If you need a picture from that gallery, use MaxiGallerySolo and the [+id+] placeholder from Ditto as &gal_ids parameter.

        How would I call this on the main page? My main page id=2 and main gallery page=19 if that helps.....

        And, with the newsmanager snippet, I could use some help with that one too....

        Thanks in advance!
          • 7923
          • 4,213 Posts
          Quote from: ejcross at Dec 27, 2006, 08:22 AM

          Ok, I have spent several hours trying to figure out the Ditto with MaxiGallerySolo to get the main page to work. You said:

          Use Ditto to get the most recent document from the folder that holds the gallery pages. If you need a picture from that gallery, use MaxiGallerySolo and the [+id+] placeholder from Ditto as &gal_ids parameter.

          How would I call this on the main page? My main page id=2 and main gallery page=19 if that helps.....
          In ditto template, have something like this (a chunk called "dittoTpl"):
          <div class="latestGalleryPic">
          <p>Random picture from latest gallery:</p>
          [!MaxiGallerySolo? &galIDs=`[+id+]` &pics_to_show=`1` &type=`random` &open=`gallery_browser`!]
          </div>
          

          And the Ditto call would be something like (where 69 is the ID of the document that holds the gallery documents):
          [!Ditto? &tpl=`dittoTpl` &startID=`69` &total=`1` &sortBy=`createdon` &sortDir=`desc`!]

          And for the document that you want to list all "child galleries" use a snippet call (if the document does not hold the childgalleries, use correct ID number instead of [*id*] in the startID parameter):
          [!Ditto? &tpl=`dittoTpl` &startID=`[*id*]` &summarize=`all` &sortBy=`createdon` &sortDir=`desc`!]

          Quote from: ejcross at Dec 27, 2006, 08:22 AM

          And, with the newsmanager snippet, I could use some help with that one too....
          Sorry, I meant the NewsPublisher snippet what is part of NewsManager resource. It has parameters &folder and &template where you set the folder of gallery documents and template id of the template that has the maxigallery call. Then you make the document that has that NewsPublisher call to be available only for selected webusers/groups and they can create new gallery documents from frontend. Modify the NewsPublisher templates to hide any fields that you don’t want/need.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 8619
            • 229 Posts
            Great, got it working, partially now. Here is what I have so far:

            Chunk called `DittoTpl` created containing this:

            <div class="pagestory">
            <h3><a href="[~[+id+]~]">[+title+]</a></h3>
            <div>[+summary+]</div>
            <p>[+link+]</p>
            <div class="imgleftfloat">
            [!MaxiGallerySolo? &galIDs=`[+id+]` &pics_to_show=`1` &type=`random` &open=`gallery_overview`!]
            </div>
            </div>

            And I am calling this on the main index page to show the recent incident, using this:

            [!Ditto? &amp;tpl=`DittoTpl` &amp;startID=`19` &amp;total=`1` &amp;sortby=`createdon` &amp;sortDir=`desc`!]

            However, the problem I am having is it is showing the MaxiGallerySolo call as text and no image.

            You can view the page here:

            http://016b4fe.netsolhost.com/index.php?id=2

            You can see that it is showing the "I.S.O. test" correctly, just as I would like it to show, but no image.

            Any clue what is going on there?

            Thanks!

              • 7923
              • 4,213 Posts
              Try using cached snippet call in the chunk, eg. [[MaxiGallerySolo? &galIDs=`[+id+]` &pics_to_show=`1` &type=`random` &open=`gallery_overview`]]


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 8619
                • 229 Posts
                That worked! Duh...coding brain drain....

                I will look at the NewsManager also and try to figure it out and get back to you in a bit......

                Thanks for all of the help so far!
                  • 8619
                  • 229 Posts
                  Hello again!

                  Here is the problem, relating to the front end editor using the NewsEditor snippet.

                  I have created a container page called "Gallery Creator" (56) that has the two NewsEditor (54) and NewsManager (55) snippets respectively in them.

                  My main gallery is (19) and is using Ditto to list the contents of the documents under it.

                  The NewsEditor (54) has:

                  [!NewsEditor? &folder=`19` &postid=`55` &clearcache=`1` &template=`global_main`!]

                  [[MaxiGallery]]

                  but only the editor portion shows up. I can create a new page this way into my gallery page (19), however if I go to the gallery page to see it in order to get the manage button to show up, it says file not found, so I am unable to add any images.

                  Can you help me out here please? I’m a little stuck with incorporating the manager portions into the MaxiGallery snippet call too.

                  Permissions on the Gallery Creator, NewsEditor and NewsManager pages are set for webusers to a role of Editor in order for it to show up in the menu only for the Editor role members.

                  THanks!
                    • 8619
                    • 229 Posts
                    I am now getting a parse error when I use NewsEditor to create the page, and then use MaxiGallery to upload photos:

                    « MODx Parse Error »
                    MODx encountered the following error while attempting to parse the requested resource:
                    « `` is not numeric and may not be passed to makeUrl() »

                    Parser timing
                    MySQL: 0.6948 s (21 Requests)
                    PHP: 0.2499 s
                    Total: 0.9447 s

                    This is also taking down my whole site, and I’m not sure what is going on. Am I missing something with the NewsEditor snippet I am using to create the new gallery page?
                      • 7923
                      • 4,213 Posts
                      Quote from: ejcross at Jan 09, 2007, 11:49 AM

                      The NewsEditor (54) has:

                      [!NewsEditor? &folder=`19` &postid=`55` &clearcache=`1` &template=`global_main`!]

                      [[MaxiGallery]]

                      but only the editor portion shows up. I can create a new page this way into my gallery page (19), however if I go to the gallery page to see it in order to get the manage button to show up, it says file not found, so I am unable to add any images.
                      So you want that the pages that are created with NewsEditor all have a MaxiGallery in them? You are not supposed to have that MaxiGallery call in the page with NewsEditor, that doesn’t make it automatically go to the newly created documents.. You could put the MaxiGallery call in to the templates that NewsEditor uses to create the new pages with.. i think.

                      But.. I’m not sure what snippet NewsEditor is? it sounds like a snippet to edit documents that already exists? I thought NewsPublisher snippet was for creating new documents.. but I might not understood your post fully and I have never used those Newsxxx snippets.

                      Feel free to ask / explain more if this didn’t make any sense..


                        "He can have a lollipop any time he wants to. That's what it means to be a programmer."