Subject: Glossary

Posted on: 02/10/21 10:41am
By: remy

I am re-developing the Glossary plugin. This plugin has some configuration, and a few items are suitable to have them personalised. I'm thinking of adding an additional tab in the myAccount page for these configuration values, as opposed to create a dedicated configuration script.

Is this possible, and, when yes, how could that be done?

it means also to have some storage in the user tables. Does this fit in the Geeklog core?
( I am aware of plugins that create custom user pages. )

Re: Glossary

Posted on: 02/10/21 03:10pm
By: Laugh

Yup that is possible you can add a tab or to a section on the My Account page. The Forum plugin does this. You can check it out to see what API it uses to insert the required fields into the My Account page along with displaying the information on the User Profile page.

Look for functions like:
plugin_profileextrassave_forum
plugin_profilevariablesedit_forum
plugin_profilevariablesdisplay_forum

You can't store data directly into the Geeklog users table. What you would have to do is create your own table with a user id and then the columns you need for your data. From there you would have to use the Geeklog API so your plugin will be notified when a user is added, updated or deleted (so if need be you can update your table. The forum plugin has this functionality as well. It is stored in its functions.php file.

Look for functions like:
plugin_user_create_forum
plugin_user_delete_forum

There are probably more API functions that help with this type of stuff (I can't remember off the top of my head). Look in the /system/lib-plugins.php file for similar type of API functions.

Sorry about not having a well written doc on how to use the API.

Re: Glossary

Posted on: 02/10/21 07:57pm
By: remy

Thank you so much for the clear hints.

Found the api's, and tested them here; the extra data fields works in the profile page, but not in the myAccount page.
Though the forum clearly uses the api. But the forum has its own scripts too for maintaining the user prefs.

In here, the forum preferences display weird options by its own scripts. So I do suspect that the templates are not updated. F.i. the profile template in layout/theme/preferences contains none option to add a tab. Neither it contains variables to show the api-added content
And the profile template in layout/theme/users does contain variables to show (but not edit) the api-added content.

But the idea works and is nice.

Re: Glossary revisited

Posted on: 07/11/21 12:36pm
By: remy

The plugin is available as of today, but as soon as the moderator submits his/her approval. Find it then in Downloads.

The contents of the plugin is focussed on being a plugin, though 'old style'. For this release (0.9.8) there is a stats interface, but no counts yet. There is what's new, and you may hack gltext to show glossary links in the stories. See install.txt and todo.txt.
The plugin maintains its own logging file; see log viewer after install.

If you find bugs, or are missing functionality, please let me know.
The next release will be 1.0 and will contain other nifty features like configuration editing by admin, user preferences, profile stats.
Integration of the comment engine is planned. This gives a similar appearance as the PHP manual of php.net.

See the plugin with a large glossary in action at www.mycobol.net.
See boxary.nlbox.com to watch the progress in further development.

Re: Glossary

Posted on: 08/11/21 09:39am
By: Laugh

Hey remy,

Your file submission has been approved and is now hosted on Geeklog.net.

Glossary Plugin

Thanks for your contribution to the Geeklog community.

I plan on testing your plugin in the next few days on my development setup.

Tom

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=97456