Topic: Support/Comments for Ditto  (Read 53926 times)

Pages: [1] 2 3 ... 6   Go Down

#1: 23-Jun-2006, 01:33 AM

Emeritus
Mark
Posts: 3,250

Ditto Developer

WWW
Ditto has a dedicated sub-forum. Please create a new topic there. This topic is now locked.

This is an auto-generated support/comment thread for Ditto.

Use this forum to post any comments about this addition or any questions you have regarding its use.

Brief Description:
Ditto 1.0.1: the nimbler, faster, better-named and even more flexible offspring of NewsListing.

Documentation:
http://modxcms.com/ditto_documentation.html
« Last Edit: 1-Dec-2006, 09:02 PM by Mark »

#2: 27-Jun-2006, 12:14 PM

PaulGregory
MODx's midnight runner
Posts: 1,097

MODx's midnight runner

WWW
Welcome to the new official thread.

If you have a question about Ditto, it may have already been answered. As well as this thread, please read the following threads:

Pre-Repository Ditto 1.01 Thread
Ditto 1.0 Thread

and also look in
Modules, Plugins & Snippets » News, Blogs & Articles

as well as trying the search facility.

Some older issues may be in threads about Ditto's fore-runner, NewsListing.
No, I don't know what OpenGeek's saying half the time either.
MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
Forum: Where to post threads about add-ons | Forum Rules
Like MODx? donate (and/or share your resources)
Like me? See my Amazon wishlist
MODx "Most Promising CMS" - so appropriate!

#3: 9-Jul-2006, 06:00 AM

Testers

Lammikko
Posts: 541

WWW
Bugs?

- There is something odd going on with &truncLen parameter and <br /> -tags in documents. If you have a document with plenty of <br /> -tags the document wont truncate at all.

Solution, I think...
ditto.class.inc.php:
line 252 should be +3 and line 257 should be -2

After that correction everything seems to be fine again.

- &archiveText parameter is not working, correction to line 96 on Ditto snippet (capital T -letters).

- &total parameter is missing from documentation. Parameter still works.
« Last Edit: 9-Jul-2006, 06:56 AM by Lammikko »
QuickManager+ Download

Mikko Lammi, Owner at Maagit

#4: 9-Jul-2006, 12:47 PM

Emeritus
Mark
Posts: 3,250

Ditto Developer

WWW
Thank you for finding the archiveText typo. This has now been fixed in my development code. The other bugs you mentioned have already been reported in the main Ditto topic and have been fixed for the next release.

#5: 10-Jul-2006, 10:17 AM

Testers
tillda
Posts: 89

WWW
I had troubles running Ditto Version: 1.0.2, there is:

if (count($resource) < 1)  { return $emptyText."\n"; }

but this count() returns 1 of $resource is false, so I've changed it to:

if ((count($resource) < 1) || (!$resource)) { return $emptyText."\n"; }

I'm running PHP 5.x (5.1.2 afaik), so there may have been some minor changes...

#6: 10-Jul-2006, 04:58 PM

Emeritus
Mark
Posts: 3,250

Ditto Developer

WWW
Thanks, this change has been checked into Ditto's SVN. (public assess soon!)

#7: 11-Jul-2006, 09:05 PM

Moderators
eemi
Posts: 135

WWW
So Ditto 1.0.2 is buggy?

cheers
eemi
patagonia, argentina

#8: 11-Jul-2006, 09:11 PM

Emeritus
Mark
Posts: 3,250

Ditto Developer

WWW
There is only 1 known bug (minor) in Ditto 1.0.2. How does this constitute buggy?

#9: 12-Jul-2006, 02:23 AM

Coding Team

doze
Posts: 4,187

....Boom!

Is it possible to define what fields should be in the JSON output from documents? I'd like to do a GoogleMap snippet that would use Ditto's json output for feed to pin the map, but I need more of the document fields to be in the output. Didnt try it yet, but I peeked at the code and saw only title, description and summary/content fields coming to the json output. Would it be possible for example to define additional tv fields to have in the output, or some of the document fields, like menutitle and longtitle? and maybe both summary and content fields?
New MODx wiki! Please help up with documentation efforts! || Old Wiki

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

#10: 12-Jul-2006, 10:56 PM


openfire3
Posts: 42

benoitdeziel.com

WWW
I get this error:
Code:
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
 
PHP error debug
  Error: Invalid argument supplied for foreach()
  Error type/ Nr.: Warning - 2
  File: /home/.fenimore/hunder/benoitdeziel/assets/snippets/ditto/ditto.class.inc.php
  Line: 84
  Line 84 source: foreach ($modx->documentMap as $mapEntry) {

when installing the new Ditto.

I went back with the older one but I get the same error. I was working before.
Benoit Déziel
Graphiste & Web Designer

#11: 12-Jul-2006, 11:05 PM

Emeritus
Mark
Posts: 3,250

Ditto Developer

WWW
@doze: No, not yet, but I plan on allowing that via a parameter.

@openfire3: You are not running MODx 0.9.2.1. Please upgrade your MODx installation to the latest release.

#12: 12-Jul-2006, 11:10 PM


openfire3
Posts: 42

benoitdeziel.com

WWW
@mark: yes I am : Benoit Deziel.com - MODx 0.9.2.1 (rev 1005)  Wink

Also, I have another site running MODx 0.9.2.1 (rev 1005) on the same server and Ditto is running perfectly. I copy/paste the code for Ditto from this other site but I still get this error. Maybe my MODx installation is corrupt?
« Last Edit: 12-Jul-2006, 11:18 PM by openfire3 »
Benoit Déziel
Graphiste & Web Designer

#13: 12-Jul-2006, 11:20 PM

Foundation

rthrash
Posts: 11,638

WWW
definitely sounds like a filesystem corruption... reupload the ditto stuff in the snippets folder first then the manager stuff is that doesn't work... 
Please help us help you when asking for assistance.
Ryan Thrash
MODx Co-Founder
MODx Revolution
Your Content, Your Way.

#14: 12-Jul-2006, 11:22 PM


openfire3
Posts: 42

benoitdeziel.com

WWW
already been done...

I think that ditto corrupted the filesystem, because before installing the new version, everything was fine and I haven't install anything else recently.
Benoit Déziel
Graphiste & Web Designer

#15: 12-Jul-2006, 11:30 PM

Emeritus
Mark
Posts: 3,250

Ditto Developer

WWW
Refresh your cache files and try running Ditto again.

#16: 13-Jul-2006, 12:11 AM


openfire3
Posts: 42

benoitdeziel.com

WWW
Still not working... If i run the updater again can it work?

@mark: Can I PM you an user/pass for the manager to check it out?
Benoit Déziel
Graphiste & Web Designer

#17: 13-Jul-2006, 03:17 AM

Coding Team

doze
Posts: 4,187

....Boom!

@doze: No, not yet, but I plan on allowing that via a parameter.
Ok, I'll be waiting for that.. I'll try to do some initial snippet with the available fields for now and update it when this is done. Thanks!
New MODx wiki! Please help up with documentation efforts! || Old Wiki

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

#18: 13-Jul-2006, 12:53 PM

Coding Team

doze
Posts: 4,187

....Boom!

When using JSON as the output format in ditto, is there a way to prevent it breaking the content field into multiple lines? If I use javascript eval() on the output, it errors saying "Unterminated string constant". But if I remove the linebreaks, it gets evaled ok.

So to make it perfectly clear, currently it outputs this (what is not evaling):
Code:
{ "title":"test", "link":"http://localhost:8080/eclipse/modx/index.php?id=39", "description":"", "language":"english", "copyright":"My MODx Site 2006", "copyright":"My MODx Site 2006", "ttl":"120", "entries":[ { "title":"Another title", "link":"http://localhost:8080/eclipse/modx/index.php?id=42", "description":"61.438767,23.730469", "content":"
More content here

", "pubDate":"06", "guid":"http://localhost:8080/eclipse/modx/index.php?id=42", "author":"Built-in Administration account" }, { "title":"Some title", "link":"http://localhost:8080/eclipse/modx/index.php?id=41", "description":"60.239811,25.048828", "content":"
Content here

", "pubDate":"06", "guid":"http://localhost:8080/eclipse/modx/index.php?id=41", "author":"Built-in Administration account" } ] }

and when changed to this, it evals ok:
Code:
{ "title":"test", "link":"http://localhost:8080/eclipse/modx/index.php?id=39", "description":"", "language":"english", "copyright":"My MODx Site 2006", "copyright":"My MODx Site 2006", "ttl":"120", "entries":[
{ "title":"Another title", "link":"http://localhost:8080/eclipse/modx/index.php?id=42", "description":"61.438767,23.730469", "content":"More content here", "pubDate":"06", "guid":"http://localhost:8080/eclipse/modx/index.php?id=42", "author":"Built-in Administration account" },
{ "title":"Some title", "link":"http://localhost:8080/eclipse/modx/index.php?id=41", "description":"60.239811,25.048828", "content":"Content here", "pubDate":"06", "guid":"http://localhost:8080/eclipse/modx/index.php?id=41", "author":"Built-in Administration account" } ] }

The contents of "content" field to json comes from [+summary+] placeholder.

Btw. json is missing from the documentation as possible value to &format parameter..

EDIT: also, is there a reason why copyright is twice at the first block?
« Last Edit: 13-Jul-2006, 12:57 PM by doze »
New MODx wiki! Please help up with documentation efforts! || Old Wiki

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

#19: 14-Jul-2006, 05:51 AM

Marschant
Posts: 133

I have a pet hate and that is ListRelated, is there anyway using perhaps the tag parameter to simulate the behaviour of ListRelated using ditto?
I don't want to tag documents at this stage, since I am utilising keywords and metatags and I think this functionality would push ditto beyond the realm of ubercool.

Any ideas?

#20: 14-Jul-2006, 10:20 AM

Coding Team

doze
Posts: 4,187

....Boom!

Would you consider to allow passing template code right at the snippet call or a path to filesystem.

So when using Ditto in another snippet, I would not need to have ditto's templates allways in chuncks when I want to output in some specific format to my snippet. Could do something like:

$dittoOutput = $modx->runSnippet("Ditto", array("tpl" => "<post><title>[+title+]</title><summary>[+summary+]</summary></post>"));

or

$dittoOutput = $modx->runSnippet("Ditto", array("tpl" => "assets/snippets/mysnippet/dittochunk.tpl"));

So maybe do something like in Ditto when getting the templates from snippet parameters:

Code:
$tpl = isset($tpl) ? $ditto->getTpl($tpl): $_lang['default_template'];

function getTpl($tpl){
global $modx;
$template = "";
if ($modx->getChunk($tpl) != "") {
$template = $modx->getChunk($tpl);
} else if(file_exists($tpl)) {
$template = file_get_contents($tpl);
} else {
$template = $tpl;
}
return $template;
}
New MODx wiki! Please help up with documentation efforts! || Old Wiki

"He can have a lollipop any time he wants to. That's what it means to be a programmer."
Pages: [1] 2 3 ... 6   Go Up
0 Members and 1 Guest are viewing this topic.