Mark
Moderator

Posts: 3,247
Ditto Developer
|
 |
« on: Jun 05, 2006, 12:09 AM » |
|
Announcing Ditto 1.0.1: the nimbler, faster, better-named and even more flexible offspring of NewsListing. The fact is, Newslisting is useful for much more than summarizing and building archives of news articles. Coupled with the fact that a cornerstone MODx philosophy focuses on flexibility, and "News" seemed to syntactically restrictive. And boring. Blogs... PodCasts... Press Release archives... File Download repositories... FAQs... Executive Bio listings... Ditto now takes advantage of an external class, language files to work with multi-language installs, and uses templates extensively for the ultimate in output formatting flexibility and control. And while it has more than 40 configurable parameters in it's current implementation, you only need [[Ditto]] for great results (although telling it explicitly where to start probably wouldn't hurt  ). Amongst the many cool things under Ditto's able and refined domain: - Tagging
- &mode parameter can disable sanity checks on variables and increase speed for production sites.
- JSON format for AJAX applications
- Access individual posts in templates via [+item[ # ]+] placeholders (replacing ' # ' with actual integers).
- Stop guessing with non-abbreviated parameter names in CamelCase convention.
- Updated documentation and full parameter and placeholder lists.
- xHTML Strict month-based archive output which uses templates for formatting.
- Extensive sorting and filtering based on TVs
- And the obligatory, "much, much more..."
Changes in 1.0.1 : - Numerous bug fixes including multicall support and variable name typos.
- Debug mode enhanced with template output.
- Filter switched from slow foreach loop to faster array_filter.
- Tagging support added.
Download:  Origional file: snippet.ditto.1.0.1.zip (61.6 KB - downloaded 35 times.) Fixed file (removed <?php from snippet) downloadable below
|
|
|
« Last Edit: Jun 05, 2006, 02:25 PM by Mark »
|
Logged
|
|
|
|
Random
Jr. Member

Posts: 2
|
 |
« Reply #1 on: Jun 05, 2006, 06:22 AM » |
|
Mark, please post link to Ditto 1.0.1 in the main blog or somewhere else, where it could be easily accessible. I have install 1.0 and expirience a lot of problems which currently solved in 1.0.1... Not everybody can read all messages in forum. I see there is only 17 downloads of 1.0.1, it means that people just can't find it!
|
|
|
|
|
Logged
|
|
|
|
Bravado
Coding Team

Posts: 1,072
"I can learn to resist anything but temptation..."
|
 |
« Reply #2 on: Jun 06, 2006, 03:20 PM » |
|
Mark, I'm trying to implement Ditto with tagging support and...well...I'm a bit lost. What I'm trying to do is attach a template variable to each blog post that simply allows me to tag a page with one or more category entries. The template variable was easy and simply adds a multiselect box with multiple category tags. The resulting output of the template variable is a simple comma delimited value of what category tags have been selected. Now I'm moving on with Ditto trying to figure out how to get it to see the template variable value for each document and output what tags were selected as well as filter the results via a category menu on the same page. What I'd like to have is a line within each entry that lists what tags are assigned and make them hyperlinks so a visitor can select a specific tag to filter the results and see similar entries. I guess what I need is an explanation of how the tag support works and perhaps some examples of its usage. Thanks a bunch! Great work, BTW! 
|
|
|
|
|
Logged
|
Jeff Whitfield
"When someone asks you, A penny for your thoughts, and you put your two cents in, what happens to the other penny?"
-George Carlin
|
|
|
Mark
Moderator

Posts: 3,247
Ditto Developer
|
 |
« Reply #3 on: Jun 06, 2006, 05:11 PM » |
|
All you need to do is call the four additional tagging specific parameters with the relevant details. For you, a call would have
&tagDelimiter=`,` &tagData=`tvnameoftv` &tags=`tags,you,want,to,filter,by` &tagMode=`mode you want to run it in, see documentation of more specifics`
|
|
|
|
|
Logged
|
|
|
|
Bravado
Coding Team

Posts: 1,072
"I can learn to resist anything but temptation..."
|
 |
« Reply #4 on: Jun 07, 2006, 08:42 AM » |
|
All you need to do is call the four additional tagging specific parameters with the relevant details. For you, a call would have
&tagDelimiter=`,` &tagData=`tvnameoftv` &tags=`tags,you,want,to,filter,by` &tagMode=`mode you want to run it in, see documentation of more specifics`
Thanks for the reply, Mark. Unfortunately, I'm still having a little trouble figuring this out.... Ok...this is what I did. I create a template variable called tvBlogCategories. For testing purposes, I made this a simple textbox where I can enter in either a single category or multiple ones separated by commas for the delimiter. I then created two test blog entries and published them in a hidden folder with an ID of 7. Then, I called the snippet from a simple page in the root of my site with the following: [!Ditto? &startID=`7` &tpl=`ditto_summaryPost` &tagData=`tvBlogCategories` &tags=`Test` &tagDelimiter=`,` &tagMode=`onlyTags` !] From what I understand, it's supposed to filter out the posts and show only the ones that have "Test" included in the tvBlogCategories template variable...but nothing shows up. All I get is a "No entries found." message. Err...am I missing something?
|
|
|
|
|
Logged
|
Jeff Whitfield
"When someone asks you, A penny for your thoughts, and you put your two cents in, what happens to the other penny?"
-George Carlin
|
|
|
kylej
Coding Team

Posts: 738
|
 |
« Reply #5 on: Jun 07, 2006, 08:54 AM » |
|
Jeff, I think that this paramater needs to be: &tagData=`tvtvBlogCategories`
All tvs need to be prefaced with 'tv' in the snippet call for them to be used correctly by the snippet. Mark can probably clear this up better though.
Kyle
|
|
|
|
|
Logged
|
|
|
|
Mark
Moderator

Posts: 3,247
Ditto Developer
|
 |
« Reply #6 on: Jun 07, 2006, 10:08 AM » |
|
Exactly what Kyle said.
|
|
|
|
|
Logged
|
|
|
|
Bravado
Coding Team

Posts: 1,072
"I can learn to resist anything but temptation..."
|
 |
« Reply #7 on: Jun 07, 2006, 10:20 AM » |
|
I left the Ditto call the same but renamed my TV to just BlogCategories and went back into each blog post and resaved them just to be safe. Still no change...still getting a "No entries found" message even though at least one blog post has "Test" for the value of the BlogCategories TV. I think once I get past this bump the rest should be easy. If I can get this part working then I'll be able to work through the steps of getting the tag links in there and really give it true blog-like capabilities. 
|
|
|
|
|
Logged
|
Jeff Whitfield
"When someone asks you, A penny for your thoughts, and you put your two cents in, what happens to the other penny?"
-George Carlin
|
|
|
Mark
Moderator

Posts: 3,247
Ditto Developer
|
 |
« Reply #8 on: Jun 07, 2006, 10:41 AM » |
|
If you can provide login information I can take a look in more detail as from what you have described you are doing everything correct.
|
|
|
|
|
Logged
|
|
|
|
Mark
Moderator

Posts: 3,247
Ditto Developer
|
 |
« Reply #9 on: Jun 07, 2006, 10:42 AM » |
|
Wait, in your comma separated TV you are writing like: tag1,tag2,tag3
With no spaces correct? If you are using spaces you need to include the space in the tag delimiter!
|
|
|
|
|
Logged
|
|
|
|
Bravado
Coding Team

Posts: 1,072
"I can learn to resist anything but temptation..."
|
 |
« Reply #10 on: Jun 07, 2006, 10:51 AM » |
|
Yes, the tags for the output of the BlogCategories TV are comma separated. Again, for testing purposes I created the TV as a plain textbox and entered the tags manually instead of using a listmenu. Right now the installation I'm using to test this is on a local computer so...err...can't login to it right now. I'll see if I can place it up on the server it's going to eventually be on.
|
|
|
|
|
Logged
|
Jeff Whitfield
"When someone asks you, A penny for your thoughts, and you put your two cents in, what happens to the other penny?"
-George Carlin
|
|
|
Mark
Moderator

Posts: 3,247
Ditto Developer
|
 |
« Reply #11 on: Jun 07, 2006, 10:53 AM » |
|
I have a working test install with tagging if you want to inspect it let me know.
|
|
|
|
|
Logged
|
|
|
|
Mark
Moderator

Posts: 3,247
Ditto Developer
|
 |
« Reply #12 on: Jun 07, 2006, 01:17 PM » |
|
Just so everyone knows, the issue was that you need to add the TV to hiddenTVs to make it work. I will fix that in 1.0.2.
|
|
|
|
|
Logged
|
|
|
|
Bravado
Coding Team

Posts: 1,072
"I can learn to resist anything but temptation..."
|
 |
« Reply #13 on: Jun 07, 2006, 01:30 PM » |
|
A couple of other things I'd like to see (if they're not already planned or in the snippet):
1. Ability to output the tags per blog/post as links that allow filtering on a tag by tag basis via a URL parameter. 2. Extra calls that allow for outputting a list of available tags. Very handy when you want to create a menu of available tags. 3. Extra calls that allow for outputting available archives. Probably would be good to allow for selecting what format and order to use. I'd like to use a list of links arranged by year and month.
This snippet has a world of possibilities. If we can get some of this stuff in then we'll definitely have something that can compete pretty heavily with other blog apps like WordPress and whatnot.
Jeff
|
|
|
|
|
Logged
|
Jeff Whitfield
"When someone asks you, A penny for your thoughts, and you put your two cents in, what happens to the other penny?"
-George Carlin
|
|
|
zi
MODx Special Forces /
Administrator

Posts: 2,941
May Peace Be On You
|
 |
« Reply #14 on: Jun 07, 2006, 02:53 PM » |
|
Just came across this: http://www.pixelcarnage.com/design/tag_clouds_have_we_got_them_wrongMight be helpfull  ... and I am waiting for Ditto with tags to overhaul my blog and resource center with tagging stuff ...  regards, zi
|
|
|
|
|
Logged
|
“Internet Explorer’s CSS rendering: WYSIWTF”. — someone genius
--------------------------------------------------
|
|
|
|