That’s a new workflow.
Yes. But I think the plugin would need to be changed, to make it more configurable.
At the moment it does it’s thing and that’s it.
That’s a new workflow.
Yes. But I think the plugin would need to be changed, to make it more configurable.
At the moment it does it’s thing and that’s it.
Hi Mario,
thanks for your interest and expertise.
Students can post .jsons and .jpgs via custom tailored forms that post to a php backend.
My import works via an Iframe that lists the posts.
So in your case it would be needed, that tiddlers are removed from the local-store as soon as they “successfully saved” the xxx-tiddlers.json file. …
At the moment they are removed when the wiki is reloaded in the browser tab and the wiki contains the tiddlers that are also part of the local-store.
I personally would create 2 buttons
So there is a possibility to check the json file if everything is OK before the content is removed. … On the other hand, if everything works reliably it can be 1 button, that activates both actions.
Just some thoughts.
It is very good to think of version-control-mechanisms -because this has been the starting-point for the whole debate.
It would be great to have control over the browser-storage.
Deleting the Tiddler after posting it is not really necessary, i.m.o. - I would rather tag it after uploading.
User-created Tiddlers and links in my wiki get the username as a suffix to be safe when importing them to my master-wiki.
Anyhow, it would be great to be able to create a sort of filter / standard-scheme which tiddler wins in case of a conflict between browser-storage and reload.
It is some disadvantage to living in a +10 DST = +11 timezone because threads I am in can progress a long way. It means a conversation can run down a path that it would not have if I were present in the middle of the night.
As I stated earlier;
In particular you need to change the filter for local storage to ensure specifically $:/config/BrowserStorage/Enabled is saved in local storage.
What I suggest allows this to work without Noteself.
I will endeavour to post an example soon.
On the other response’s in the thread I continue to hold the position this is only a matter of establishing appropriate workflows for students and master alike. I expect its most important to make the students interaction simple and automated, the master can use alternate methods as sophisticated as needed.
I would love access to the code and methods used in the above.
Please share and I can evolve the local storage solution I propose on top of it. I currently use Tw-receiver to host wikis on a Php platform.
Note: Whilst reviewing the work on the “File Uploads plugin” there is a suggestion that in the future the wiki will be able to discover files added to the underlying system, and show the external files as tiddlers, that is using your submission system the Master and possibly the Students may be able to see all submissions appear “automagicaly”.
Again with these kind of architectural possibilities, it is only a matter of design on top of tiddlywiki to support the workflows needed. For example giving the master the ability to merge content from the students into the master wiki if desired, to showcase each students contribution.
Could you explain more? I tried at @JanJo’s link (Stickies — a heavyweight mod of stobot's lightweight todo system) and it looks like the filter does nothing to exclude “$:/config/BrowserStorage/Enabled” and I don’t see that tiddler getting saved.
And I looked at the code and it looks like that tiddler is explicitly excluded from being saved to local storage:
var ENABLED_TITLE = "$:/config/BrowserStorage/Enabled"
[...snip...]
$tw.utils.each(filteredChanges,function(title) {
// Don't try to save changes to our enabled status
// (If it were enabled in the file but disabled in local storage then we might
// not realise that distributing a copy of the file would have local storage enabled
// for other users)
if(title === ENABLED_TITLE) {
return;
}
// Save the tiddler
saveTiddlerToLocalStorage(title,{
logger: logger,
prefix: prefix
});
});
@btheado thanks for showing this code, I was confident I had it working in the past. A recent test was fooled by the fact on activating this, the local storage always worked on the next reload.
I have managed to edit the Plugin tiddler to comment out the “offending code”.
// if(title === ENABLED_TITLE) {
// return;
// }
Unless there is another work around we will need to use a hacked plugin or have the plugin updated. I think there was the design decision that works against us, the plugin could have an additional override configuration with the current behaviour the default, or turn if off for our desired behaviour.
Here is a live demo Wiki with Browser Storage — needs activation
Here is a package of tiddlers required including a hack of the local storage plugin. local-storage-package.json (14.7 KB)
Still to be done, stop the dirty indicator being “thrown”.
Develop the changes only backup and restore process.
Hello Tony,
So I am going to eat a humble pie.
Cool it seems this is what is needed and what I thought to be impossible with the plugin.
Now I have to check the behaviour and see how to delete Tiddlers from there and turn it off.
I will do my part and post and explain php-upload … but in another thread and with a little preparation.
As I say this always has to be a little custom-tailored to fit into your folder-logic and carefully done because php lives on your server and has superpower there.
@JanJo we are all on different journeys and pass different locations, all that is important to share what we learn.
Do keep in mind in my demo I have hacked the plugin. There may be other ways but “A bird in the hand is worth two in the bushes”.
Do tell me what you mean here.
It all depends on if you are referring to Local Storage or file/host storage, but there are no complications I am aware of with tiddler deletion.
I look forward to the PHP upload info, your effort will be returned I am sure because I have a lot to add to a system with this functionality.
I expected this, but perhaps can build some generic solutions once I know how.
Best wishes
I moved my exlpanation how to upload a tiddler with the PHP to a new thread, because it is off-topic here.
So let us continue the productive research and discussion in this thread!
Next Question: Is there a method
I made a mod of the plugin which gives you a button to control the browserstorage and reload.
Thank you @TW_Tones , thank you @EricShulman who helped me on the filter. $ _plugins_mod_browser-storage.json (20.1 KB)
Or even better check it here: browserstorage test — testing browserstorage scenarios because I will be doing the updates there.
I would call this user-browser-storage for the aim is to smoothen the experience for user’s who cannot save the wiki to a server. So it is turned off by default.
But stop! This is not the end of the journey! I would like to modify the dirtyindicator to prevent from warning when leaving and reloading if the browserstorage is avtive.
Any ideas how this can be achieved and integrated to the plugin?
Jumping in here, without having followed the intricacies in this thread, to say that if this ends up in a plugin or solution of general interest for the community then I hope you share it officially. From interpreting/assuming the meaning of the headline, I think everyone would be interested with a good broswerstorage data backup. (But I see mentions of PHP when scanning the conversation so IF “advanced things like that” is involved then it is probably not of general interest, in the same sense.)
I believe I have a few lead’s to achieve this, I just need to test them because there could be unwanted effects; as in the issue;
“Explicitly excluded from being saved to local storage”
It could be as simple as setting
$:/config/SaverFilter to something like “-[all[]]” to stop the dirty indicator. How ever we must check to ensure the local storage and regular save mechanisms are not affected.
If $:/config/SaverFilter works as described/implied on tiddlywiki.com we have the answer, if not we may need another hack and to update the documentation. See “1.” in https://tiddlywiki.com/#SavingMechanism
I think this is also hard-coded into the javascript. The tiddler $:/plugins/tiddlywiki/browser-storage/rawmarkup.js
has this code:
// Make sure that all the tiddlers we've loaded are marked as dirty at startup
Array.prototype.push.apply($tw.boot.preloadDirty,log);
Where log
contains the list of tiddlers which were loaded from local storage.
You could try commenting out that line and see if it helps. I didn’t test it.
Hi @btheado,
Thank you!
I do not know whether this does what I want to happen:
I guess this sets the Tiddlers imported form the browserstorage to a clean state.
I want to deavtivate completely the “you have unsaved changes” message if browserstorage is on…
Hi Mat, hie everybody… I will do so after getting some positive feedback on the usability.
In effect as I said it is a user-fallback-saving-solution, and for users it is now easier to choose what to add, what to keep and what to get rid of off in the browserstorage.
If you are the admin who saves to the server you still should be carefull activating this because of the risc of nagging ghosttiddlers of previous versions, when you were at a different computer meanwhile.
Folks and @JanJo I have returned from time in the bush and hope to progress this a little further. One reason is to package and document a firm solution to avoid difficulties when revisited in the future.
Some notes;
Additional features
Reset dirty indicator below, create bookmark and put the following in the URL
javascript:(function(){ $tw.saverHandler.numChanges = 0; $tw.saverHandler.updateDirtyStatus(); })();
Hi Tony! Yes that is the aim. I have a workflow for this which I am just testing with a course. It still needs too many clicks. When intensive collaboration startet it was hard to keep an overview over the contents of the folder.
I have been searching for a while for a demo that @saqimtiaz posted on a WebDAV solution which was much more elegant, but I cannot find it anymore.
@JanJo I have continued in creative mode and have being exploring opportunities to help with this form of collaborative tiddlywiki use. I have a number of leads that could make this easy, and reliable for naive users.
This gets somewhat complex very quickly because tiddlywiki presents a lot of opportunities, and of course understanding what users can do or understand, is a dark art rather than a science. Even more so when you include consideration of different browsers, their features/settings and the Operating system.
I am confident there is sufficient opportunity to solve this, for example I have found a way to convert a tiddlywiki found at a URL to generate a unique filename for saving changes. We can add user name into this, to handle a full class of submissions, but then we need to “enforce” the provision of user name.
Do let me know where too many clicks are needed, I imagine I can simplify the process with some of the tricks I have acquired.