We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14951
    • 151 Posts
    First of all, I’d like to say thanks to the developer of PKBlog! I have found a ton of neat ways to utilize PKBlog in addition to blogging!

    Anyhow, I’m interested in yet another possible implementation of PKBlog, or rather an additional feature. I’m trying to figure out a way to add an image upload form field for the purpose of allowing clients to add images, while still maintaining control over the layout of them.

    I’m not sure if this is even feasible, but I have a couple different (uneducated) ideas about how to accomplish this.

    METHOD1:
    Create 5-10 image TVs and add them to the PKBlog form.

    The Upside: Super easy to implement. Create a few TV’s and make a few changes to the form accordingly.

    The Downside: Since there is no way (that I know of) to dynamically create TVs, the amount of images is limited to the amount of TVs you initially create. Also, in the situation that you only have 3 images to post, you still have 7 extra upload fields just sitting there. This could potentially be resolved with JQuery via hiding the elements, but you still would be limited to a certain number of images. You also would have vary limited templating options without serious PHx usage.

    METHOD2:
    Integrate MaxiGallery into PKBlog.

    The Upside: This would take advantage of MaxiGallery’s flexibility, templating, and great features.

    The Downside: I imagine this would be pretty complicated. Not sure if it’s even possible to submit a form through two completely different form processors. Would probably have to combine the processors (yuck!). I could potentially use Ajax to handle the MaxiGallery form and leave PKBlog just how it is...

    I would be really interested in anyones input on how they would go about accomplishing this. I’m sure there are better ideas then what I have came up. Thanks in advance!

    -Jared
      • 16278
      • 928 Posts
      So glad you like pkBlog! It merges my experience with my own pre-MODx inputting scripts and with NewsPublisher, and has always been planned to be one element of PubKit, a grander scheme encompassing other types of item.

      As it happens, I have been using the brass band site I run as a proving ground for the PubKit developments that I really really really will be publishing soon, and have tried out some ideas there combining the classes that PubKit uses to define item properties and methods with the scripts I used to use for the gallery, including filing that doesn’t fiddle with original filenames and uploads with the option of auto-resizing.

      Take a look at http://www.walthamband.com/gallery.html, and at the attached screenshots of the input and management screens (ain’t Snagit handy? I was only going to promise some later, but it just took a few minutes to grab these). No fancy lightbox integrations yet, and no Ajax drag-and-drop for rearrangement - I would love some pointers on how to get started with that stuff.
      rolleyes KP
        • 14951
        • 151 Posts
        Very glad to hear that an official implementation might be coming along!

        Lightbox and Ajax sorting shouldn’t be too hard to accomplish.

        I actually have a working implementation of Ajax sorting on a couple of my sites!

        In my particular case, the Ajax sorting is working with content generated by Jot (See screenshot), but it wouldn’t be much different for any other setup. You would just need to update the database query to the appropriate sort field for PK.

        You can see the actual menu at http://www.lighthousedining.com/dinner.

        In order to achieve this I started with http://www.webresourcesdepot.com/dynamic-dragn-drop-with-jquery-and-php and added the genius of "Sottwell" to make the magic happen.

        For someone with your programming knowledge, you probably won’t have any trouble with this, but if you need examples, I can send you code from one of my sites.

        ...Back to picture management in PK...
        I put some more thought into the second method I described above with integrating MaxiGallery. I thought about just putting a Maxi call in the PKBlog "Create/Edit Post" template, but then realized Maxi wouldn’t have a docId to attach itself to... So it looks like my only "current" option is the first method I described.

        Do you have any thoughts on that, or any other ways I might be able to hack and slash this into existence?

        Thanks a bunch for your reply! Again, I really have appreciated PKBlog! I have used it to Blog(of course), generate newsletter pages with PDF newsletters, Events Pages, and now PhotoBlog (hopefully soon) Between it, and Jot.. my clients can edit all their content exclusively in the front end, while I still maintain control of the layout!

        -Jared