Loading...
 
Features / Usability

Features / Usability


Using and handling images and their metadata

posts: 55

I am using Tiki 21 LTS and want to use images in my wiki as follows:

  1. Each image should have following information attached (metadata) and visible to the viewer/anonymous user
    1. Uploader
    2. Owner/Creator of the image in a legal sense
    3. License information of the image in a legal sense
    4. Image description to display besides/below the image thumb/preview
    5. Image history in the sense of who originally uploaded it, who re-uploaded when and who changed metadata and when - just like on a wiki page
  2. A thumb with a description should be shown on the wiki page (like on wikipedia)
  3. If a user clicks on the thumb, the image should be shown in full screen/full resolution and the image metadata and edit options (according to permissions) should be accessible, like on wikipedia


I fiddled around a little bit with pluginIMG. It seems to be OK for the previe thumb on the wiki page (satisfies 2.), but I can't access image metadata nor edit options when I click on it as an admin with all permissions (only partly satisfies 3.).

In the file gallery, where the image is stored, there is a field for the source of the image. It is empty and I (as an admin) cannot edit this field. I can only Edit the Description field, not even the Comment field. I can edit creator field (viable for 1.2.). 1.1. is satisfied. 1.3. and 1.4. should be stored separately, but I can only edit one field, which is description. 1.5. seems not to be satisfied - or is there a history anywhere?

Ho can I implement all my wishes using Tiki? Do I have to create a wiki page for each image containing all the legal information and lin the thumbnail to it? This would also yield a history but only for the metadata on the page, not the metadata of the image itself (uploader etc.). What is possible, what is not?

posts: 8633 Israel

Hello,

I worked a bit on fiels fields as I needed to display different images and description based on fileId and language... and I still have a personal Photo Gallery project I need to complete.(darn... 😶) .

As a first step I'll try to check what is available.


If this is good enough and require little work, then bingo, you just need to work an interface to display the existing data.

Else, wouldn't it be possible for you to look for a tracker solution ?
A tracker item can mix user data, file data, tags, category and other fields.
Then you could adapt exactly to your need and create an interface to display data and to edit them. Sure it is more complexe than to use the file gallery directly, but it will be tailored for what you need exactly.

That's what I would do.


posts: 3665 United States

I think @Bernard Sfez / Tiki Specialist is on the right track — this seems like a perfect use for trackers.

Here's what I would do:

  1. Use trackers to store/upload your images. That takes care of all of your 1.x requirements. The trackers are highly flexible and allow you to add other fields (e.g., a signed PDF of a photo release form, or full multi-lingual support, for example) that are beyond the default fields. And trackers allow you to retain history, too.
  2. When adding the image to a page, you could use the img plugin (but I'm not sure how you'd get the description field from the tracker. Alternatively, you could use the trackerlist plugin + pretty template and have the image display however you want. This takes care of your 2.x requirement.
  3. If you use the img plugin to display the images in pages, use the link to link to a trackerlist + pretty tracker page that displays the details for the image (e.g., all the tracker fields). If you use a trackerlist instead of img to display the image in a page, you can also create whatever link you want. You can use permissions to make the fields editable, as needed. This takes care of your 2.x requirements.


You could probably use list plugin instead of trackerlist, too.

HTH,

- Rick | My Tiki Blog | My Tiki UserPage

Why be a dummy? Get smarty! TikiForSmarties.com
Tiki for Smarties, your source for the best (and only) Tiki books, guides, and tutorials.


posts: 55

I now have added a Tracker with 3 fields:

  • File
  • License
  • Creator


The file will be saved in a file gallery, so I can use it in the wiki easily. The Descriptin is stored in the file gallery, so it can be used with the IMG-plugin. There are 2 Questions now that I did not find the answer to:

  1. How can I allow multiple mime-types in the file-field? When separating them with commata, the file browser showed all the right files, but upload failed (Tiki 21 LTS).
  2. When editing a wiki page, the input box shows some tools. One of them is "choose or upload images". How can I disable normal file upload and show my add tracker form instead, with the upload properly functioning from there, and from there only - accessible for anonymous users?
posts: 126886 United Kingdom

Hi @FootlooseTraveller

Glad to hear you're having fun with trackers now! mrgreen

FootlooseTraveller wrote:
  1. How can I allow multiple mime-types in the file-field? When separating them with commata, the file browser showed all the right files, but upload failed (Tiki 21 LTS).

I usually put in image-* to allow all image types, not sure if there's a more specific way to do it (but it might be possible)

FootlooseTraveller wrote:
  1. When editing a wiki page, the input box shows some tools. One of them is "choose or upload images". How can I disable normal file upload and show my add tracker form instead, with the upload properly functioning from there, and from there only - accessible for anonymous users?

You can edit the toolbars for each section (and their comments) on tiki-admin_toolbars.php but that will change all (wiki in this case) toolbars - will that do? If not we could probably devise some javascript to remove that button from some pages only...

HTH

posts: 3665 United States
FootlooseTraveller wrote:
1. How can I allow multiple mime-types in the file-field? When separating them with commata, the file browser showed all the right files, but upload failed (Tiki 21 LTS).


To limit the uploads to images, only, I think you want something like: image/* as your MIME filter. There may be additional hints in the docs. The examples show using a pipe — not a comma.

You may also be able to limit the MIME type by configuring it for the file gallery you're using with the tracker.


FootlooseTraveller wrote:
2. When editing a wiki page, the input box shows some tools. One of them is "choose or upload images". How can I disable normal file upload and show my add tracker form instead, with the upload properly functioning from there, and from there only - accessible for anonymous users?


This may be more complex.... If you're trying to duplicate the Tiki process that allows you to upload an image and then select/use it immediately, you'll need something like this:

  • First, you'll want to edit the toolbar to remove the current upload button (or move to the Admin section).
  • Then, you'll want to make custom QuickTag that calls the page your tracker form uses (I assume you're using a pretty tracker page and not the default tracker form — it will make things much easier). You'll probably want to open the tracker form with no header/footer/modules, too, in a separate window or modal.
  • Finally, you'll need to write some JS for the tracker body/action that upon form submission, will close the popup window (e.g., window.close) and then add the {img...} to the wiki editing form. I'm sure that someone else may have a better solution for you.


This means, of course, that you only allow users to upload images while their editing pages. I'm not sure what your expected flow or usecase is for your site.

An alternative is to just let users upload their image separately from the editing process. Then you simply limit their ability to choose/browse images to whatever specific file gallery you're using for your tracker upload.

HTH,

- Rick | My Tiki Blog | My Tiki UserPage

Why be a dummy? Get smarty! TikiForSmarties.com
Tiki for Smarties, your source for the best (and only) Tiki books, guides, and tutorials.
posts: 55

Hi @Rick Sapir / Tiki for Smarties,

I was just about to add the new custom QuickTag and was flashed about the nearly nonexisting documentation. This is what I found:

  • https://doc.tiki.org/Toolbar
  • https://twbasics.tikiforsmarties.com/Adding-Custom-Buttons

These are the questions that are not answered:

  1. How do I know the name of the available Icons? Do I really have to browse my files on the server "in the ../img/icons/.. directory"? There should really be a dropdown box with the available icons. And there should be an easy way to upload additional ones through the website.
  2. What's a WYSIWYG-Token? Is there a place where the WYSIWYG system is explained? I understand how the wiki-syntax system works - just add markup syntax into the text - but how does WYSIWYG work and how is it saved? Is it basically the same markup just not shown in the editor? If so, how is the definition of these buttons different between WYSIWYG and wiki syntax? As a background for the explanation: I am a Delphi/Pascal programmer.
  3. What do I add in the syntax field? Is that what is added to the text when this button is clicked on? If so, how does it work if you have to incorporate highlighted text, like the bold-button? I guess there is kind of a variable that can be used within the text in this field, right?
  4. What are the types? Where are they explained? What do they do?
  5. What does the dropdown box "Plugin Name" do? Why are the items in this box not sorted (maybe a translation issue - I am using German)?
  6. After all these questions are answered - where should I document the answers for others? is https://doc.tiki.org/Toolbar the right place for them?
posts: 126886 United Kingdom

Hi @FootlooseTraveller

Sorry about the lack of documentation - i wrote (or revamped) tiki-admin_toolbars years ago and i suppose i hoped others would document it, but maybe no one worked out how to use it eek

1. In the icon field (on 24.x) i get an autocomplete dropdown of the (FontAwesome) icons available, do you not? It sounds not (ah, you need to type a couple of characters of what you're looking for to show the list)
2. A WYSIWYG-Token is what ckeditor calls the method you want to call then clicked, there isn't really a list apart from on ckeditor (somewhere). They're things like Copy, Paste but also PasteFromWord etc (let's call that one "advanced" ;)
3. The syntax field needs the wiki syntax for what you want the button to do, e.g. __text__ for bold (the string "text" gets replaced by the editor selection)
4. Hmm, seems the types dropdown isn't showing, select2 and bootstrap vs jquery-ui z-index issues, i'll fix that next... the types are:

  • Inline
  • Block
  • LineBased
  • Picker
  • Separator
  • FckOnly
  • Fullscreen
  • TextareaResize
  • Helptool
  • FileGallery
  • Wikiplugin

5. Again the dropdown is broken with select2 enabled, but it should show all the wiki plugins, if you pick Wikiplugin for the type (above)
6. Yes please, that page is a mess so it could do with some help! I think all the mentions of QuickTags should go, as should any references to non-supported versions (Tiki 2 and 4? surprised) I'll fill in any missing bits like what all the types mean.

Will try and fix the bugs, thanks for asking mrgreen

posts: 55

Hi @Jonny Bradley, thanks again for your answer!

I'm still using 21 LTS. If those images are done, I will make a complete backup and update to 24 LTS.

  1. Seems like I had a bad internet connection last time I tried. It shows up on the second letter. I would still love to see a complete overview of what's available - maybe a separate button, just for newbies like me.
  2. So it's kind of a function call. I understand. I will ignore that for now as I am only using wiki syntax. As a programmer, I like to see the source of the wiki page to see what's going on if something's fishy.
  3. Thanks, very easy and sufficient answer.
  4. Types are showing up, I just don't know all the meanings and why it is there. Seems sufficient to add the syntax...
  5. Plugins are showing. Order is mixed up, I guess it is ordered before translation. Could you switch that around? I guess this is just a helper for the filling in of syntax? Or does it show a modal window to get all the arguments of the plugin? I guess that makes sense once you explain the types above. ;-)
  6. So, in the end nearly the whole page needs to change. If I delete something of value, it can be resurrected from the history, right? In this case I would love to have the explanations for the types beforehand, for my understanding. This way this page is not half-done for an extended period of time. ;-)
posts: 55

Hi @Jonny Bradley,

thanks for your fixes.

This is where I got my version of tiki from. 24.0 is the most up to date version there - not including your changes, but official 24 LTS.
https://sourceforge.net/projects/tikiwiki/files/

I guess this is what I would download to get your last changes - but it would not be an official and tested LTS, right?
https://gitlab.com/tikiwiki/tiki/-/tree/24.x

As I don't do this every day - actually never before - and this is a production environment (just not yet widely advertised), I am reluctant to use a repo only version. I'd rather want to wait for 24.1 LTS if that's not too long to wait for. What would be your guess to how long it will be till 24.1 LTS comes out? A few weeks or several months?

Maybe you can give me a hint to the types in the list above? I guess with that I would be able to do a first implementation of images in my wiki and "go public" through advertising in facebook groups before updating to 24.1 LTS...

posts: 126886 United Kingdom

Hi @FootlooseTraveller

I guess you need to be careful then, but personally i run all my production sites (from git or svn) on the stable branch so things get tested. We don't have a huge funded Quality Control department here, just feedback from users really, so the more people who can use or test upcoming releases the better they will be when released, but frankly there's not much difference between 24.x on gitlab (or the daily build tarballs) and what will be 24.1.

So if you can run a staging server site to check your real world content before the next release that would be great, like we do with the tiki sites as described here Pre Dogfood Server

Meanwhile you're welcome to wait until an "official" release, but if it doesn't work for you it could be several months before another fix is released.

This is the cost of Free/Libre Open Source Software mrgreen

posts: 55

Hi @Jonny Bradley,

you're absolutely right. And the benefit can also be seen in this thread. ;-)

Your statement about the stable 24.x branch makes me test it. Will be some time, but I will reply when done.

posts: 126886 United Kingdom
Great, and thanks for participating here too @FootlooseTraveller, it all helps make Tiki a better thing for everyone!
posts: 55

Sorry to bother you with this @Jonny Bradley, but I can't help myself...

I downloaded the files from the git repository, uploaded them to my site, connected to my server via ssh to run setup.sh and got stuck there. Seems like the script has issues. I am not experienced with linux command line, so I am unable to debug this. This is what it prints:

Copy to clipboard
[root@[my server ip] test.wiki]# ./setup.sh /usr/bin/which: no php in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin) Tiki setup.sh - your options ============================ Composer: If you are installing via a released Tiki package (zip, tar.gz, tar.bz2, 7z), you can and should skip using Composer. If you are installing and upgrading via SVN, you need to run Composer after 'svn checkout' and 'svn upgrade'. More info at https://doc.tiki.org/Composer c run composer (log output on screen, not all warnings) and exit (recommended to be done first) L run composer (log output to logfile) and exit (recommended to be done first) V run composer (verbose log output on screen) and exit (recommended to be done first) H make composer download packages over HTTP and return here For all Tiki instances (via SVN or via a released package): f fix file & directory permissions (classic default) o open file and directory permissions (classic option) S clear screen q quit x exit m display more directory permissions commands recommended for advanced users only. More documentation about this: https://doc.tiki.org/Permission+Check Your choice [f]? c ./setup.sh: line 660: : command not found ./setup.sh: line 663: [: : integer expression expected ./setup.sh: line 663: [: : integer expression expected Local PHP version >= to required PHP version 74 - good ./setup.sh: line 556: : command not found We have failed to obtain the composer executable. NB: Maybe you are behind a proxy, just export https_proxy variable and relaunch setup.sh 1) Download it from http://getcomposer.org 2) Store it in temp/


Then I put composer.phar in ./temp/ inside the tiki directory. It did not change much:

Copy to clipboard
Your choice [f]? c ./setup.sh: line 660: : command not found ./setup.sh: line 663: [: : integer expression expected ./setup.sh: line 663: [: : integer expression expected Local PHP version >= to required PHP version 74 - good ./setup.sh: line 531: : command not found Composer self-update failed. Reinstalling composer ./setup.sh: line 556: : command not found We have failed to obtain the composer executable. NB: Maybe you are behind a proxy, just export https_proxy variable and relaunch setup.sh 1) Download it from http://getcomposer.org 2) Store it in temp/


-I checked that the server had direct internet access using ping google.com - no problem at all.
-I did run the "fix file & directory permissions" option - did not change anything.

Is it possible to just download 24.0 LTS and overwrite all files with the current 24.x branch? Maybe this way I don't need to run setup.sh... I cannot even compare 24.0 tagged commit with your toolbar revamp commit in 24.x branch (the gitlab website won't let me), to see if any dependencies changed.

Please give me a pointer to how I can get it working...

posts: 126886 United Kingdom

Hi @FootlooseTraveller again

It sounds like the initial issue you have is the setup script can't find a command line PHP executable to run:
> no php in (/usr/local/sbin... etc

What happens if you run php -v? It should give you the version of the php your shell can access...

However, it sounds like this isn't the right route for you, you're trying to set up the development version of Tiki rather than an installable build, so i'd suggest you get a "daily build tarball" from https://dev.tiki.org/Daily-Build and try that. It will have all the vendor dependencies built in for you so you just need to copy the files to your server and unpack the archive in your (test) web document root. Then set it up as usual via tiki-install.php in the browser (but using a copy of your database i would suggest).

Hope that helps, you might find it easier to chat in our gitter chatroom, here https://gitter.im/tiki-org/community

HTH

posts: 55

Thanks @Jonny Bradley and @Bernard Sfez / Tiki Specialist for your quick answers! I installed the Daily-Build no problem using my "old" database. Thanks for pointing out the difference between the daily and the direct download from git. At first glance the daily works like a charm - even my custom contact form using Trackers just works!

Now I was looking into the custom toolbar button again. I cannot see any changes - they all must be "under the hood" as your comments on your changes suggest. At least now I know how to get the latest snapshot tiki. So, I'll summarize what I know and what I don't know yet (all english labels are guesses as I use german language):

  1. Meanings of Name and Label are clear
  2. Icon needs 2 letters and then it shows a list of available icons - still needs a guess what's available, I'd prefer a possibility of some sort of accessing a complete list or even upload my custom icon.
  3. Wysiwyg Token will be ignored by me as it is not relevant to me - kind of the name of a function to call
  4. Syntax takes what is to be inserted in the text at cursor position with "text" being exchanged by what is currently highlighted
  5. Type - some elements are clear, others arent - see below
  6. Plugin Name is only active now, when Type is wikiplugin - clear


Types:

  1. Inline inserts the text in Syntax at cursor position exchanging "text" with the currently highlighted text - example: "__text__" for bold
  2. Block ?
  3. LineBased ?
  4. Picker ?
  5. Separator ?
  6. FckOnly ?
  7. Fullscreen ?
  8. TextareaResize ?
  9. Helptool ?
  10. FileGallery ?
  11. Wikiplugin inserts the plugin from the list below using the plugins form for getting its parameters


I refrained from taking guesses about the types - please complete the meanings. Also there is one question remaining:

How can I add custom code to display my Tracker form (for uploading an image including some further information) when the button is clicked (similar to the plugin form showing) and then show the image-plugin-form afterwards with some fields prefilled and inactive (i.e. the source linking the just uploaded - through the tracker - image file)?

posts: 126886 United Kingdom
P.S. This should be a separate thread, i wonder if that still works biggrin

posts: 55

Thanks @Jonny Bradley and @Rick Sapir / Tiki for Smarties!

1. I don't want to use "image/*" as I might want to allow "application/pdf" as well. "image/jpeg,image/png" only shows relevant files in ubuntu, but file upload itself does not work at all. "image/jpeg|image/png" shows all files (including pdf), but file upload only works with *.jpeg, *.jpg and *.png files. So "|" works better than "," - contrary to what the docs stated - I udated them. Thanks for rubbing the "|" under my nose once again.

I did not find a setting in the options of the file gallery regarding file types other than "Podcast (Audio)" and "Podcast (Video)", so this does not help.

2. Removing the file upload button from the toolbar is a good beginning. I'll have to look into the other points on how to make my own button afterwards.

My use-case are users editing wiki pages. I don't want them to upload images without information on the creator and the license, as I have to make sure that my site is allowed to use them. So I need to remove file upload other than trough the tracker. So, when someone is editing a wiki page and wants to upload an image, I don't want them to break their workflow, copy the text so far into another window, cancel editing, navigate to another page to be able to upload an image, navigate back to the wiki page, go into edit mode again, copy back the work he did so far, and search through all the images in the gallery to find the one he just uploaded. I would not like to contribute in a wiki with such a bad workflow. Image upload must be possible while in editing mode on the wiki page.


Page: 1/2  [Next]

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting