PBS Forum

Geophyte discussions => General Discussion => Topic started by: gastil on March 24, 2021, 07:43:57 AM

Title: pretty flowers
Post by: gastil on March 24, 2021, 07:43:57 AM
Testing the image upload features.
(http://tiny%20mice%20clicky-icon%20to%20make%20an%20image%20tag)
Hmmm... have not yet figured out how to embed an image in a message. Maybe it is only attachments.
How to give each photo its caption?
Title: Re: pretty flowers
Post by: Martin Bohnet on March 26, 2021, 11:35:07 PM
There is a mod allowing for attachments to be used inline: https://custom.simplemachines.org/mods/index.php?mod=3770 (https://custom.simplemachines.org/mods/index.php?mod=3770)

The question is: is that too complicated? It does call for additional BBC-operations, so that's another learning curve thing...
Title: Re: pretty flowers
Post by: David Pilling on March 27, 2021, 05:05:02 AM
Probably the extension would do no harm - if people have an easy way they can use it, if they are more skilled/interested they can use a better way.

I wonder what ElkArte with its drag and drop does.
Title: Re: pretty flowers
Post by: Martin Bohnet on March 27, 2021, 05:51:01 AM
 
Quote from: DavidPilling on March 27, 2021, 05:05:02 AM
Probably the extension would do no harm - if people have an easy way they can use it, if they are more skilled/interested they can use a better way.
if only it would install. the alternatives don't either. hmm alternatives are not updated since 2008, maybe we miss a function that went core?



Edit: No, but installing order does matter!

  [attach id=0 msg=91]

[attach id=1 msg=91]
Tropaeolum brachyceras

[attach id=2 msg=91]



Quote from: DavidPilling on March 27, 2021, 05:05:02 AM
I wonder what ElkArte with its drag and drop does.

no idea

Edit: oh great - made inline possible, and screwed up display below... anyway: the attchment menu now offers to insert the picture.
Title: Re: pretty flowers
Post by: David Pilling on March 27, 2021, 08:49:10 AM
some text
[attach id=0 msg=92]
some more text

Martin - that is a big improvement
Title: Re: pretty flowers
Post by: David Pilling on March 27, 2021, 08:50:49 AM
Ah but, click on thumbnail does download...

Title: Re: pretty flowers
Post by: gastil on March 27, 2021, 08:51:36 AM
Is the crocus photo (between some text and some more text) done with an img tag and url to david's TEG site or with an uploaded/attached image?
Title: Re: pretty flowers
Post by: gastil on March 27, 2021, 08:52:32 AM
when I clicked on the crocus photo (which I believe is a thumbnail) it did NOT download. It just got bigger.
Title: Re: pretty flowers
Post by: Martin Bohnet on March 27, 2021, 09:17:51 AM
it's the

[attach id=x]

tag, which gets auto-inserted with the link in the attachment-area, not an image-tag

but david is also right - the attachments not inlined now stopped to respond in the "right" way.... i couldn't find a configuration to improve that...
Title: Re: pretty flowers
Post by: David Pilling on March 27, 2021, 09:35:48 AM
Quote from: gastil on March 27, 2021, 08:51:36 AM
Is the crocus photo (between some text and some more text) done with an img tag and url to david's TEG site or with an uploaded/attached image?

It was done with the new insert button next to image upload. Inline thumbnails on this page are now working correctly for me. Progress...

hover over images will probably show how they're done

click on traditional end of message uploads is still doing download. I notice they are now in a row rather than as previously a column.
Title: Re: pretty flowers
Post by: gastil on March 27, 2021, 09:57:59 AM
ok I will try adding more pretty flowers inline using the image tag and a wild guess how to refer to a given attached file...
(1) first I upload my pretty flowers
(2) the only identifiers I see so far are the filenames and the attachment indices {0,1,2,3} so... poking blindly in the dark...
(3) I copied the link to David's crocus:
https://www.pacificbulbsociety.org/smf/index.php?action=dlattach;ts=1616860150;topic=11.0;attach=59;image (https://www.pacificbulbsociety.org/smf/index.php?action=dlattach;ts=1616860150;topic=11.0;attach=59;image)
which as code is:
https://www.pacificbulbsociety.org/smf/index.php?action=dlattach;ts=1616860150;topic=11.0;attach=59;image
so wrapping an img tag around that...
(https://www.pacificbulbsociety.org/smf/index.php?action=dlattach;ts=1616860150;topic=11.0;attach=59;image)
Nope that does not put an image there. [Update: later it did appear.]
Could one of you do a screenshot of the markup to insert an inline image using an attached file's link?
And please delete the eye-roll emoticon before posting. I do realize my incompetence.
(4) Well by all the sand on the shore that crocus photo DOES now appear above. It did not before. So Im going to try to reverse engineer to get it to show my own new attachments by incrementing that 59 of the crocus...
(https://www.pacificbulbsociety.org/smf/index.php?action=dlattach;ts=1616860150;topic=11.0;attach=60;image) is 60
(https://www.pacificbulbsociety.org/smf/index.php?action=dlattach;ts=1616860150;topic=11.0;attach=61;image) is 61
(https://www.pacificbulbsociety.org/smf/index.php?action=dlattach;ts=1616860150;topic=11.0;attach=62;image) is 62
Maybe those will not appear until they upload.
Title: Re: pretty flowers
Post by: Martin Bohnet on March 27, 2021, 10:10:02 AM
now why exactly would you want to use the image  code when you could use the attach code? btw one can also use other peoples attachments:

[attach id=0 msg=98]
makes
[attach id=0 msg=98]

and if you want it big,

[attachment id=0 msg=98]

[attachment id=0 msg=98]

btw I adore the rolleys-smily, it's the one i most often use, usually when noticing my own mistakes.
Title: Re: pretty flowers
Post by: gastil on March 27, 2021, 10:15:18 AM
Thank you Martin.
The Code: [Select] thing is supposed to show the code, right?
Perhaps it is a permission thing, but for me, it does not show any code.
It says:
[font=dejavu sans mono][size=x-small][ You are not allowed to view this attachment ][/size][/font]
I also tried hovering and have not yet discovered a hover that shows a clue.
OK, I like the eye-rolley smiley too. And it does often apply to me.


Update: well NOW that codes DOES show. Did you change a setting?
And the reason I did not try the attach code is because I did not know it existed, no having been able to see the code.
Title: Re: pretty flowers
Post by: Martin Bohnet on March 27, 2021, 10:32:01 AM
the link in the  attachment menu does the code inserting for you!

[attach id=0 msg=103]

see here:

[attach id=1 msg=103]

as you can see, if you use this code, the attachment below the post will be hidden.

the code-markup just keeps text from being executed
Title: Re: pretty flowers
Post by: gastil on March 27, 2021, 10:38:12 AM
Sorry. I did not realize that "Insert attachment" text was an actionable thing. Your screenshot makes that clear now. So, I will test it:
I re-uploaded my Iris_ordinarious.jpg and I clicked on the "Insert Attachment 0" text to the right of the Choose File box. Nothing happened. I looked at Preview and I see no image. I tried the Toggle View and still no image. Do I understand correctly that you did not type in the squarebracket attach tag yourself, that having clicked the "Insert Attachment 0" inserted that code for you? I am going to Post to see if that makes the image show up.

Edit by Martin: [attach id=0 msg=104]
Edit by Gastil: [attach id=0 msg=104]
Title: Re: pretty flowers
Post by: Martin Bohnet on March 27, 2021, 11:12:26 AM
ok, it works when I modify your post. Apple hardware is not that rare that I big forum like SMF would not test for it, so I'd guess it's a problem with your browser preferences - do you have Java script blocked by default?
Title: Re: pretty flowers
Post by: gastil on March 27, 2021, 11:52:17 AM
Another test. I will click my Sparaxis id=0 now. Nothing happened.
Javascript is enabled. I am using Chrome. When I do "inspect" to see the underlying page code, it shows that the attachment-related links do point to javascript. I will attach a screenshot of "Inspect" as the fourth attachment to this post. (After clearing the marmalade recipe that I was going to post for David's amusement, which, btw, never did gel.)


Now, manually typing in the markup to put the 4th attachment inline:
Well I typed that in but then when I clicked the Toggle View icon (sqbrkt-arrow-sqbrkt) that erased what I had typed, (expletive redacted).
I will try clicking the "(Insert Attachment 3)" link again now... [attach id=3 msg=106]
Ah hah - and now it magically DOES insert. I am convinced this smf has a random function to turn things on and off and that Users are rats in a maze being tested for their tenacity. I dare not click Preview for fear it will delete the markup.
Title: Re: pretty flowers
Post by: Martin Bohnet on March 27, 2021, 12:45:40 PM
strange, it seems your browser is the only one behaving as erratic, just like with that top-and-bottom thing (wait, that sounds...never mind). Though I don't understand how the browser could change the message order unless that's done via CSS.

Marmalade - well that could the only possible good aspect of brexit - maybe we finally get back Kirschmarmelade. In German, Marmelade was used to describe any fruit & sugar & pectin cook-up. And since the British limited the word to citrus species, we're forced to call it "Konfitüre" officially. Don't get me wrong, I love orange marmalade. I just don't like the EU-forced exclusivity of the word. By the way, I once cooked pineapple&orange peel -insert word here- would that still qualify for british marmalade?
Title: Re: pretty flowers
Post by: gastil on March 27, 2021, 12:57:10 PM
Marmalade ONLY refers to citrus peel in thickened sugar syrup. Any other use of the word is semantic dilution. (I was raised by a parent who told me never to correct people, unless it was for English usage or grammar.)  ::)
Title: Re: pretty flowers
Post by: Martin Bohnet on March 27, 2021, 01:18:58 PM
Quote from: gastil on March 27, 2021, 12:57:10 PM
Marmalade ONLY refers to citrus peel in thickened sugar syrup. Any other use of the word is semantic dilution. (I was raised by a parent who told me never to correct people, unless it was for English usage or grammar.)  ::)

well. ask aunt wiki, she'll tell you that a) it was historically also used for other fruit preserves even in English and b) the word originates from the Spanish word for Cydonia oblonga which I regularly use to make variations in, yes, Marmelade. Figs&quince is exeptionally delicious. Last fall I even made quince&Passion fruit, as my passiflora incarnata finally got at least nearly ripe. my second plant is a bit in the shadow, and i need both in flower to set fruit....
Title: Re: pretty flowers
Post by: gastil on March 27, 2021, 02:34:30 PM
I stand corrected, as I was wrong. There's a first for everything.
Title: Re: pretty flowers
Post by: David Pilling on March 27, 2021, 03:05:38 PM
Wikipedia says marmalade comes from Portuguese for quince. Interesting discussion. Things I never knew. Hard to believe you could have orange marmalade that did not set - usually lots of pectin about. Maybe we could debate the meaning of jelly/jello/jam.
Title: Re: pretty flowers
Post by: Martin Bohnet on March 27, 2021, 08:38:40 PM
While this thread is getting sweet and sticky, we still have to solve the mystery of gastils erratic browser - that shouldn't happen for a big forum software that is in productive stage for such a long time. Let's have everyone post their browsers - I've been here on several instances of firefox on different computers. I'm still hesitant to try edge, it's usually the second thing I ban on a forced windows update - the first being cortana.

Meanwhile I see this forum software is a quick method to generate wiki-sized photos. Useful:
[attach id=1 msg=118]
I'll post Iris aucheri 'Olof' on the wiki soon - there's only one picture up to now...

[attach id=0 msg=118]
I have a soft spot for the more subtle colors of spring - most people won't even notice Fritillaria sewerzowii
Title: Re: pretty flowers
Post by: David Pilling on March 28, 2021, 04:29:24 AM
Quote from: Martin Bohnet on March 27, 2021, 08:38:40 PM
Let's have everyone post their browsers

Chrome on Windows 10, and Chrome on Ubuntu.

I have a Mac I could try on that.

Title: Re: pretty flowers
Post by: gastil on March 28, 2021, 08:04:44 AM
Quote from: Martin Bohnet on March 27, 2021, 08:38:40 PM
While this thread is getting sweet and sticky,... people won't even notice Fritillaria sewerzowii
I love the green hue background. I might suggest tweeking the purple of the Home button and our usernames. On the crocus logo it looks darker, perhaps because of the black outline there. If the purple in the Change Color menu is the only purple, that's fine as-is.
Maybe F. sewerzowii has adapted to human predation to hide its blooms like that other one recently published.
Chrome Version 89.0.4389.90 on Mac OS X 10.14.16.
I just now opened this same post in Safari and see that it would allow me to concurrently edit the same post in two browsers. I wouldn't, but that is interesting.

Update: on a different screen the purple looks just fine as-is. So, it was my monitor, not the choice of rgb.
Title: Re: pretty flowers
Post by: David Pilling on March 28, 2021, 08:12:21 AM
So I tried living my life on my phone. Mired in a sea of missing passwords. Eventually I got to posting to this forum, to upload files I was told I needed an upgrade, and Google/Android update told me the phone was no longer supported. Which was fine since I was going to stamp on the phone and throw it away anyway.

We went to the vaccination centre today, and I saw these blue primroses.

I've been told there is a devil set aside for anyone who posts shrub photos to the PBS, so there's a Forsythia to conclude with.

Wait there's more, having painstakingly typed all this in and selected the photos, post resulted in a new message screen and no post. Seems this was about the time Gastil posted.

Won't get fooled again, I'll copy my text before posting.

Yep, it happened again. Chucks away the post. I'll now post without the photos.

Title: Re: pretty flowers
Post by: David Pilling on March 28, 2021, 08:13:24 AM
Photos
Title: Re: pretty flowers
Post by: David Pilling on March 28, 2021, 08:15:04 AM
photos
Title: Re: pretty flowers
Post by: gastil on March 28, 2021, 08:56:25 AM
These photos download when I click on them. I was expecting them to show larger when I clicked on the thumbnail, like in the wiki.
Sorry if my posting messed with your posting. I would not have expected that kind of concurrency issues for a forum that expects thousands of users.
Can I "Report to moderator" for shrub photos?
Half joking. I actually want to test that feature. I'll moderate one of my own posts so if anyone gets blacklisted it will be me.
I am going to experiment with putting one of the primrose photos inline here...
[attach id=0 msg=127]
Well that does not show up (at least not in preview) when I do (attach id=0 msg=127) but with square brackets not parenthesis.[/attach]

Update: This is weird. My post robbed David's post when I attached his primrose photos to my post.
Title: Re: pretty flowers
Post by: David Pilling on March 28, 2021, 09:33:00 AM
Yes the photos are still downloading instead of expanding.

You're thinking, old bloke, anger management issues, flip phone. The phone is actually six years old. Didn't seem that old, but CoVid has passed another year by.

I tried my photoswipe pages, and photoswipe did not load. Phone too old.

Getting the red mist out of the way, I am saying that four photos, and small ones (it's an old phone) won't upload, and if you try there is some sort of crash. Possibly I could look in the PHP error log.
Title: Re: pretty flowers
Post by: Diane Whitehead on March 28, 2021, 03:32:53 PM
I'm using Safari.

Photos were enlarging a couple of days ago and only downloaded if I clicked the paper clip.  Now they download instead of enlarging.

Here is Coelogyne cristata, blooming in my front hall to entertain  visitors.  I break off a branch of flowers for them to take home.
Title: Re: pretty flowers
Post by: Martin Bohnet on March 28, 2021, 08:41:25 PM
@David: I had these crashes too from time to time, and I guess it's a timeout problem, because I only had them with big files and you've already removed the size limit. Another possible culprit could be the limit on memory for the scaling process.

@Diane: That's a known issue. The mod that allows us to use the pictures in the Text with the attach id=0-3 somehow stops them from using the thumbnail->expand behavior when below the post. the Link to the right of the file in the Attachment menu generates the embedding code on click, as long as you're not Gastil -> that's another problem we're investigating.

[attach id=0 msg=131]
Title: Re: pretty flowers
Post by: David Pilling on March 29, 2021, 05:49:55 AM
Martin - good ideas. It reminded me that there are commands to set the max amount of core for PHP to use. At one time we had that in a .htaccess file. Seems to not be there now, at least in the main one.

Title: Re: pretty flowers
Post by: Martin Bohnet on April 07, 2021, 11:19:07 AM
I consider this lèse-majesté:
[attach id=0 msg=155] 

Hmm - more big files at once still gets me crashed.. I've allowed for both more atachment folder space and computing memory, no effect.

[attach id=1 msg=155]

Title: Re: pretty flowers
Post by: David Pilling on April 07, 2021, 02:00:32 PM
Hi Martin, thing would be do a crash and look at the Apache/PHP log file to see what happened. You can look now, but best if you know the time when the crash happened.

Title: Re: pretty flowers
Post by: Martin Bohnet on April 07, 2021, 02:27:55 PM
those logs in /var/log/apache2 ? belong to root admin, I can't open them. The cash happened around the time of that frozen crown imperial post
Title: Re: pretty flowers
Post by: David Pilling on April 08, 2021, 09:32:54 AM
OK, I feared they might. Those logs are not easy for me to access either - I often end up setting them to 777 permissions. I will try to look later...
Title: Re: pretty flowers
Post by: David Pilling on April 08, 2021, 01:33:15 PM
Looking at the log files is good fun - probly there are some bugs I should fix. But most of the contents are driven by hackers - every few seconds someone tries to log in to our word press installation. Anyway I found this:

[Wed Apr 07 18:11:10.611501 2021] [php7:warn] [pid 24519] [client 95.222.28.145:14703] PHP Warning:  POST Content-Length of 14394519 bytes exceeds the limit of 8388608 bytes in Unknown on line 0, referer: https://www.pacificbulbsociety.org/smf/index.php?action=post;topic=11.30;last_msg=133
[Wed Apr 07 18:17:33.315059 2021] [php7:warn] [pid 24519] [client 95.222.28.145:14687] PHP Warning:  POST Content-Length of 14394539 bytes exceeds the limit of 8388608 bytes in Unknown on line 0, referer: https://www.pacificbulbsociety.org/smf/index.php?action=post;topic=11.30;last_msg=133
Title: Re: pretty flowers
Post by: David Pilling on April 08, 2021, 01:39:55 PM
In /etc/apache2/php/7.2/php.ini

upload_max_filesize was 32M

post_max_size was 8M

I have changed post_max_size to 32M and rebooted Apache.

Title: Re: pretty flowers
Post by: David Pilling on April 09, 2021, 05:55:07 AM
As I say (usually about the mail list), somewhere in the system there is a max size for photos. However much people may not know or want to know about it. I am looking at a new phone, cheap and cheerful, 48Mpix camera.

Anyway there are some interesting config options for SMF - lets you set a max upload size - which has to be more graceful than the thing dumping everything with no explanation.

The two lots of options PHP and SMF have to be compatible. Interesting that we have not hit this limit with the wiki - but I never use image upload with that.

I also observe SMF seems to be set to 40MB for all uploads combined, which we will hit soon.

This is where the options are:

https://www.pacificbulbsociety.org/smf/index.php?action=admin;area=manageattachments;sa=attachments;f07ce3d5=e90132d436856ffb487d9f29075ac297

Title: Re: pretty flowers
Post by: Martin Bohnet on April 09, 2021, 08:31:08 AM
Quote from: DavidPilling on April 09, 2021, 05:55:07 AM

I also observe SMF seems to be set to 40MB for all uploads combined, which we will hit soon.


I've already raised it to that point, from 10 mb in the basic config. but that's one of the reasons why I forced the drastic reduction - 1024px on larger side with  75% JPG Quality will give us lots of air to breathe... So lets check the new limits
[attach id=0 msg=162]
Jeffersonia

[attach id=1 msg=162]
late easter greeting

[attach id=2 msg=162]
somewhat a mystery bulb - Leucocoryne alliacea?

[attach id=3 msg=162]
one of my beloved green monsters


Edit: Works! that was about 25 mb as upload and about 430 kb on disk. OK, Yes, we need to increase the overall limit, or we'll hit it with less than 100 4 pic posts
Title: Re: pretty flowers
Post by: Diane Whitehead on April 10, 2021, 05:27:29 PM
If that is Leucocoryne alliacea, I would love some seeds.

I've been trying for years to get some, to cross with my other species and produce hybrids that will be hardy outside here.

Chileflora never has seeds, and the message is always the same: These seeds are generally restocked in: January      This item is temporarily out of stock.. 

Obviously not true, since I've been looking frequently.

Two years ago I managed to buy some from rareplants.eu, apparently supplied from Chileflora, but they have not germinated, so were probably ancient.
Title: Re: pretty flowers
Post by: David Pilling on April 11, 2021, 06:11:39 AM
Observations on downloading images - from new posts everything seems to download. From forum boards only attachments at the end. Over at the SRGC forum many photos open in a new window. This makes me wonder if somewhere, like Apache config, I should be setting things up to display rather than download.

My other idea  is that javascript for thumbnails is not being set up -  seemingly when the script for inline thumbnails was added things changed.

For thumbnails in new posts, it is definitely the case that .js is not being set up.

On the SRGC forum I found one page where one photo (end of message thumb) opened in the browser window as a new page (back button returned to forum page), and the other photos appeared in a new browser window (but a browser window with no tools bars etc). Comparing the URLs I could see no difference.

I'm still not really involved here - Photoswipe is finished. I have successfully fed Lauw's book through Google translate - I am now stuck with reformatting all the pages.

Title: Re: pretty flowers
Post by: Martin Bohnet on April 12, 2021, 09:08:33 AM
Quote from: Diane Whitehead on April 10, 2021, 05:27:29 PM
If that is Leucocoryne alliacea, I would love some seeds.

I've been trying for years to get some, to cross with my other species and produce hybrids that will be hardy outside here.

Chileflora never has seeds, and the message is always the same: These seeds are generally restocked in: January      This item is temporarily out of stock.. 

Obviously not true, since I've been looking frequently.

Two years ago I managed to buy some from rareplants.eu, apparently supplied from Chileflora, but they have not germinated, so were probably ancient.

we'll see, leucocoryns don't seem to like me, and this is a single bulb ( as always with rareplants.co.uk, Paul's prices are massive, even for an automotive engineer  . So if I get seeds they will be too few for the exchange anyway - I#ll keep you in mind.
Title: Re: pretty flowers
Post by: Diane Whitehead on April 12, 2021, 07:19:40 PM
Thank you, Martin.

Though pollen would be good, too,
Title: Re: pretty flowers
Post by: David Pilling on April 13, 2021, 06:15:44 AM
Trading pollen would be a good idea. How often did I grow a packet of seed and end up with just one - non-self-fertile - flowering plant.

Title: Re: pretty flowers
Post by: David Pilling on August 03, 2021, 02:17:25 PM
test
Title: Re: pretty flowers
Post by: anotheruser on September 06, 2022, 01:28:07 PM
test message