Creating a blog with the PubKit snippet

02 Aug 2009 MODx, internet

The PubKit snippet is what I created as front-end document manager for another site. It's not ready for publication yet, but meanwhile here's a look at a cut-down version designed for creation of blogs.

This isn't really ready for public consumption either, but if you're here and you're curious, feel free to have a look at pkBlog.

I'll be offline for a week or so now, but will resume work on the documentation etc. as soon as I can. (see comment below for update on 12th August)


Comments (7)

kp52
Posts: 3
Comment
new comment
Reply #1 on : Wed August 12, 2009, 18:25:51
Update, 12th August: the pkBlog pages and files are just about fit for consumption now, so feel free to try it out. Let me know below or in the MODx forums (the In Development section) how you find it, what's missing, what's wrong etc.

Update, 21 August: showinmenu and permalinks now added (see comments below and 21 Aug blog post)
Last Edit: August 21, 2009, 15:56:44 by kp52  
sacotash
Posts: 6
Comment
Re: Creating a blog with the PubKit snippet
Reply #2 on : Sun August 16, 2009, 15:07:12
Heyas, I'm trying out pkBlog and I'm liking it. However, there are a few things that need tweaking imho. For starters, a clearer install/setup documentation would help. I'm a ModX newbie :)

2nd, the naming of the chunks in bloglist.config and blog.config are not the same as the chunks in the text files users are told to create. (pwBlogManageTpl.txt, I assumed naming the chunk created as pwBlogManageTpl but in bloglist.config it's called using a different name)

In some of the chunks there's a link to a document id 686. What is that document and what is it supposed to contain? (<form name="edit_" action="/" method="post">)

Oh, can you please provide a list of parameters? Is there an option for posts to not show in menu or post using alias as title just like newspublishers'?

Thanks for taking your time in creating this. Really glad I finally found something I can use to create new entries where I can add tags and other custom TVs from the Front End.
sacotash
Posts: 6
Comment
Re: Creating a blog with the PubKit snippet
Reply #3 on : Sun August 16, 2009, 15:59:45
Heyas again, okies..sorry, I just found the list of parameters.

Although showinmenu is listed with default 0, it actually does not work. I had to use hidemenu set to 1.

Can you please add &aliastitle so users can have the option to have the blog title as an alias? Thanks
kp52
Posts: 3
Comment
Tweaks
Reply #4 on : Wed August 19, 2009, 13:07:07
Thanks for the feedback:
- the snippet has "in development" status in the forums, but I hope I'll manage to clarify the documentation as part of the development. I believe that consistency is one of the biggest aids to understanding, so I'll look at the chunk & file names on the next update of the package in that light.
- 686 is the ID of my "Edit Post" document, where the PubKitBlog snippet is called. I could try to draw a map of the structure and doc IDs on my site so you could plug in the equivalent numbers on your own site, though of course you might want a different structure.
- glad you found the parameters! Looking at other snippets, I find it good practice to list them and prepare them for use in the snippet code, and includes external files for the main processing.
- I seem to have left &showinmenu in by accident as a hangover from NewsPublisher, I've never done more in any PubKit version than preserve the hidemenu value when updating items. I'm sure it is worth considering adding a field and logic for it.
- aliastitle: also worth considering (like a WordPress permalink?). I find the "semantic" blog URLs useful enough when Googling. As long as it doesn't make life too difficult - my MODx settings are for unique aliases (so I'd probably add the docID to the title to ensure that). I expect there's some API hook to sanitize the URL string, as MODx manager offers auto aliases. Making them editable after the event would be going too far, though - I'd leave that as a manager user action in the normal inerface, I think.
Thanks for your interest, hope you are still finding the code useful. Do post a link when you're up and running!
James
Posts: 6
Comment
pkBlog Error("/)
Reply #5 on : Tue November 03, 2009, 09:09:29
I have installed the file as required but I keep having this error:

Fatal error: Cannot redeclare class CJot in C:\xampp\htdocs\CHSE_IT_UNIT\manager\includes\document.parser.class.inc.php(769) : eval()'d code on line 15

please help,
donn
Posts: 6
Comment
upload photos
Reply #6 on : Thu July 15, 2010, 12:58:30
I was wondering if i could use this to create a site that shows various websites, the problem is that i need to be able to let a user upload a photo and title and some information, it would be great if that then made a page in the backend which i could simply approve

is this possible with pkBlog?
kp52
Posts: 3
Comment
re upload photos
Reply #7 on : Sat July 17, 2010, 12:16:42
I think you'd face a few problems:
- if you let people upload pictures using TinyMCE's image button, assuming you give them access to do the upload, how will you ensure the picture is of suitable dimensions and filesize?
- otherwise you could create a file uploader of your own that performs any necessary resizing and give the user a field to fill in. This would be easier with the full PubKit snippet (www.pogwatch.com/pubkit.html) than by modifying pkBlog. I have an uploader that enforces a maximum size that I use with a photo gallery attached to PubKit, but it's not fit for publication yet.
KP
Last Edit: July 17, 2010, 12:17:34 by kp52  

Write a comment

  • Required fields are marked with *.

If you have trouble reading the code, click on the code itself to generate a new random code.