Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixes and additional functions #1

Merged
merged 4 commits into from
Jun 2, 2024
Merged

Conversation

kuz-z-zma
Copy link
Contributor

  • Fixed Feed URL
  • Added more detailed description for Flickr User ID and where to find it
  • Fixed typos and inconsistent capitalization
  • Added separate URL and Title functions for use in themes

kuz-z-zma added 2 commits May 30, 2024 18:58
Fix for Feed URL, typos in description, uniform capitalization, description for User ID + link to get one
Added separate getItemTitle and getItemURL functions for use in themes
@acrylian
Copy link
Owner

Thanks for your contributions. I originally made this for a client whithout ever having used Flickr myself. A few notes:

  • Thanks for the case changes like flickrfeed -> flickrFeed. That's of course cosmentic since only variables are case senstive.
  • You changes some backticks in docblocks to semmicolons. The backticks are on purpose, those are markdown formatting for inline code. We use that also in main ZP because it is better readable and also our doc generator uses that.
  • I am not so sure the two new function add benefit because they just return the plain value you can easily get via the array index of the array as well. Especially since you need to pass that array first anyway.

Restored backticks in plugin description + clean up of leftover </p> for results of getItemLinkAndThumb
@kuz-z-zma
Copy link
Contributor Author

flickrfeed -> flickrFeed. That's of course cosmentic since only variables are case senstive.

It helps to differentiate easily between functions and keys for options, improves readability.

You changes some backticks in docblocks to semmicolons. The backticks are on purpose, those are markdown formatting for inline code. We use that also in main ZP because it is better readable and also our doc generator uses that.

I'm obviously not attached to this change - I don't think I saw them used as such for any Zenphoto plugins I've dealt with (code is just pasted as is in commented portion with plugin info) and since this does nothing for formatting when viewing plugin info in backend - never occurred to me to suspect their purpose. Where can I check the markdown documentation for that?

I am not so sure the two new function add benefit because they just return the plain value you can easily get via the array index of the array as well. Especially since you need to pass that array first anyway.

I wanted an easy way to construct output for the theme without Image preview - for custom headers, display of description etc.
pubDate is extracted like this, so why not URL and Title

Clarification in the description
@kuz-z-zma
Copy link
Contributor Author

kuz-z-zma commented May 31, 2024

Rolled back backticks and added some clean-up to the getItemLinkAndThumb output, as it produced an empty <p></p> as of now.

@acrylian
Copy link
Owner

It helps to differentiate easily between functions and keys for options, improves readability.

Yes , of course

Where can I check the markdown documentation for that?

Well, third party plugins are of course not use for our general doc. zenphoto does not have it consistently for historic reasons but whenever we change things we primarily use markdown.

It's a clean formatting even readable without processing. GitHub has a documentation: https://docs.github.com/de/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax

pubDate is extracted like this, so why not URL and Title

I added primarily functions only if the value requires some processing like pubDate does. No big deal otherwise to keep them.

@acrylian acrylian merged commit 0691c51 into acrylian:master Jun 2, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants