Newbie with few distinct questions

108 views
Skip to first unread message

Alex DP

unread,
Dec 11, 2020, 9:08:04 PM12/11/20
to TiddlyWiki
Hello to you all.

TiddlyWiki is fun to work with. However, the documentation is like a fishing expedition. Someday you catch something and the next you are frustrated. It is hard to understand how come a product as mature as TiddlyWiki does not have a comprehensive and well organised documentation system.

Okay, here are my questions:
-------------------------------
I finally found an easy way to insert computer language codes using:
```sql
-- Retourne toutes les fiches dont le champ prenom commence par J (Jacques, John):
SELECT nom,
       prenom
FROM client
WHERE prenom LIKE 'J%'
```
at first I used:
<$codeblock code="SELECT * FROM users WHERE deleted = false" language="sql" />

My question is, what is the difference between these two approaches?
--------------------------------------
I would like to implement the "Icon - copy to clipboard" function that will facilitate the grabbing of code snippets. I could not find anything about it.

My question is, how can I implement the copy to clipboard feature?
---------------------------------------
I copied my TiddlyWiki in a sub-directory of a shared hosting I have. I implemented a php saving approach. The TW is hard to find and this is good. I do not mind if people have a look at the content (after all, sharing is and should be the primary purpose of Internet). However, I would not appreciate if some hooligan came and vandalised my site.

My question is, how can I implement a password system so the editing of tiddlers and access to the backend (control panel) is protected? I do not want to use a static site generator since I use three different computes to edit the site.
---------------------------------------
I wrote a minimalistic surface converter (i.e. acre to square miles or hectare ...) using a very small javascript and some html (table). I copied the whole thing in a tiddler and it did not work. I got the infamous:
Blocked script execution in '<URL>' because the document's frame is sandboxed and the 'allow-scripts' permission is not set. For sure, TiddlyWiki put the data of a tiddler in a sandbox iframe for security reason. I do not want to change javascript and form permission for the iframe.

My question is, I can I implement this small but useful calculator?
-----------------------------------------
Thank you to all of you

Regards, 



Ste

unread,
Dec 12, 2020, 5:28:43 AM12/12/20
to TiddlyWiki
Hello and welcome to the tiddlyverse! 
I can't answer your area conversion question in terms of getting javascript
which lets you do that kind of thin natively in tiddlywiki. 
For example I've done a forces calculator http://stephenteacher.tiddlyspot.com/#Simple%20Frame%20Calculator
Hope that helps. 
Stephen

Charlie Veniot

unread,
Dec 12, 2020, 9:36:31 AM12/12/20
to TiddlyWiki
Hello Alex, and welcome to TiddlyWikiHood !

I'm just going to tackle your first question.

Okay, here are my questions:
-------------------------------
I finally found an easy way to insert computer language codes using:
```sql
-- Retourne toutes les fiches dont le champ prenom commence par J (Jacques, John):
SELECT nom,
       prenom
FROM client
WHERE prenom LIKE 'J%'
```
at first I used:
<$codeblock code="SELECT * FROM users WHERE deleted = false" language="sql" />

My question is, what is the difference between these two approaches?

The first  approach is a basic (no frills) approach to formatting anything to stand out:  that just applies a monospaced font within a shaded area.

The second approach does the exact same thing until the "highlight plugin" is installed.  With the highlight plugin, the codeblock widget also adds syntax colouring.

For your reference, check out the following:

Please find two screenshots below, just me playing a little bit.

Cheers !

Screenshot 2020-12-12 at 10.25.49 AM.png

Screenshot 2020-12-12 at 10.27.37 AM.png


Reply all
Reply to author
Forward
0 new messages