-
-
Notifications
You must be signed in to change notification settings - Fork 840
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
TPL_ACTION_GET event #471
TPL_ACTION_GET event #471
Conversation
…on Starter template
… basing on Starter template" This reverts commit 362a4f0. Left the code with only TPL_ACTION_GET
Does this event name follows the naming structure? see https://www.dokuwiki.org/devel:events_list#naming_structure
The event data is now assigned as compacted array. When the variables are assigned by reference, the |
I think your handling of $data is incorrect.
Perhaps, rather than using compact and extract, you should create the $data array using reference assignments. |
What @Chris--S says. Also adding your own actions is already possible with implementing TPL_ACT_UNKNOWN and ACTION_ACT_PREPROCESS |
@splitbrain - i think this allows adding your own action link/button.. The two events you mention are for action handling. |
I've tried to apply your suggestions. What are your opinions about this event now? |
The further I would like to have this in a next release... so when this PR can get some love that would be nice ;) @Hafron, can you merge the master branch in this branch, there seems to be conflicts. |
@Hafron still there? can you merge master please? |
The inspection completed: 27 new issues |
Currently This pull request presents as solution a TPL_ACTION_GET event, which could override also the current behavior. I see no use for this. Because, for example, it let you change the link to Alternative is to use TPL_ACTION_UNKNOWN (quite similar to TPL_ACT_UNKNOWN) default:
return '[unknown %s type]';
break; What do you prefer? TPL_ACTION_GET or TPL_ACTION_UNKNOWN |
Todo: |
Hafron, I come back on my previous suggestion for event name. TPL_ACTION_GET is more consistent with the other events in inc/template.php Further a mergeable fork can be found in PR 1277 |
I've add new event to dokuwiki(TPL_ACTION_GET) which allows you to create own actions to tpl_action function. Together with my previous pull request(#470), you can add own actions to sitetools menu. Example: