Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Demo plugin (where lf_stuff field is displayed ?) #2000

Open
bonnebulle opened this issue Jul 3, 2023 · 7 comments
Open

Demo plugin (where lf_stuff field is displayed ?) #2000

bonnebulle opened this issue Jul 3, 2023 · 7 comments
Labels
bug it's broken! help-wanted help-wanted plugin bells and whistles
Milestone

Comments

@bonnebulle
Copy link

bonnebulle commented Jul 3, 2023

Hello, I try the demo_plugin
https://github.com/shaarli/Shaarli/tree/master/plugins/demo_plugin
Am working around render_editlink and edit_link_plugin
https://links.portailpro.net/doc/Plugin-System.html#render_editlink

In the demo_plugin, lf_stuff is well saved
but the demo_plugin dont help me to integrate it !
Where the content of this field lf_stuff is showing up ?

Thanks

@nodiscc
Copy link
Member

nodiscc commented Jul 3, 2023

Where the content of this field lf_stuff is showing up ?

It's not displayed anywhere, as far as I remember. The demo plugin only gives an example of how to add a custom field to the editlink dialog/datastore entries. I agree that it could be improved/include an example of how to render the value of the vield somewhere in the page.

What are you trying to achieve exactly?

@nodiscc nodiscc added plugin bells and whistles documentation tools developer tools support installation and configuration issues labels Jul 3, 2023
@nodiscc nodiscc added this to the backlog to the future milestone Jul 3, 2023
@bonnebulle
Copy link
Author

Yes, you get my point !
Here, in a Demo, the field should be ready to use (showing as final output, maybe in the shaarli description).
A short explanation about how to do the final integration should help.
Me, I can figure how to do this, but not every body !
Thanks, amazing work !

@nodiscc
Copy link
Member

nodiscc commented Jul 4, 2023

Me, I can figure how to do this, but not every body

Feel free to send a pull request that improves the demo plugin/shows how to display the content of lf_stuff somewhere in the linklist.

@bonnebulle
Copy link
Author

bonnebulle commented Jul 16, 2023

Thanks, I will do in the future...
But, for now, my problem is : the demo field doesn't works, not saving.

In past...
I was on Shaarli 0.11.1 and all the demo was ok ; lf_stuff was saved
now...
I am on 0.12.1
When I add some text into the demo field (edit mod) and save it (publish a shaare)...
When I come back the field is empty.

EDIT : I notice, the demo field in /admin/plugins page is working ok (saving)

I try with 2 hosted versions of Shaarli (new ones, different dockers images)
First :
ghcr.io/shaarli/shaarli:latest
Second :
e2jk/shaarli-armhf:latest

What can I do to find the bug, can I help ?
I will try do my own plugin following the rules of the art.
Thanks

@nodiscc nodiscc added the help-wanted help-wanted label Jul 20, 2023
@nodiscc nodiscc modified the milestones: backlog to the future, 0.13.0 Jul 20, 2023
@nodiscc
Copy link
Member

nodiscc commented Nov 15, 2023

Related (or duplicate?) #1808

@bonnebulle
Copy link
Author

Yes, looks the same !
Will maybe fix in the v14 :)
Can I help ?

@nodiscc
Copy link
Member

nodiscc commented Nov 30, 2023

Can I help ?

I think it needs to be reimplemented from scratch, since so much has changed between v0.11.1 and v0.12.2 (457 changed files with 46,990 additions and 17,068 deletions). The Bookmark object was introduced in v0.12 (336a28f) and I think it never implemented saving keys other than the default/built-in ones (id, shorturl, url, title, description, thumbnail, sticky, created, updated, private).

But there is now an additionalContent key for each Bookmark (added in bf8bec3) which could help standardize where plugins save their custom data.

@nodiscc nodiscc added bug it's broken! and removed documentation tools developer tools support installation and configuration issues labels Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug it's broken! help-wanted help-wanted plugin bells and whistles
Projects
None yet
Development

No branches or pull requests

2 participants