Comments/Ratings for a Single Item
![Editor](/index/editor.gif)
This is fishy, as these extraneous images are defined with the extension .gif, and betzaNew.js is programmed to keep the existing extension, or use that of the regular pieces if no extension was specified. And this was working when I made the Diagram. SOmething is going wrong here, but I don't see immediately what. The code to create the image URL looks OK:
var im = imag[n]; if(im.indexOf('%') < 0) return graphDir + prefix + im; // from standard set var p = im.replace('%', prefix); // custom graphics; replace % by color prefix p = p.split('.'); if(p.length == 1) p[1] = graphSuffix; p = p[0] + (p[1] == '' ? '' : '.' + p[1]); if(p[0] == '*') p = graphDir + p.substring(1); return p;
After the split p[1] should have been 'gif', and p.length 2.
I noticed some 404 errors coming from this page. The Interactive Diagram has been set up to use PNG Alfaerie pieces with one exception, the wfortress and bfortress pieces, because these are available only as GIFs. This is what's causing the 404 errors, as it is looking for (w|b)fortress files without a file extension. So, for this diagram, would someone please make SVG and PNG versions of the fortress piece?
![Editor](/index/editor.gif)
I have finally found out how submissions were coming to be attached to your name Freederick. I believe I have fixed the underlying issue. For the submissions with your name incorrectly attributed, I have changed the author to me for lack of better option (I don't think we should just delete the items).
I did not originate this item. It has been attributed to me in error.
6 comments displayed
Permalink to the exact comments currently displayed.
OK, I solved the problem with the extraneus piece images. What wrecked it was the dot in graphics.dir. The code below assumed that everything behind the dot was a filename extension. So it though that "dot/alfaerie/wfortress" already was the extension, and that it did not need to add the ".gif" that was the next part of the name.
Now all Diagrams that use an extraneous image in the graphics.dir folder should work again, whether they use betza.js or betzaNew.js (after browser-cache refresh).