edit by margarett -- Custom Actions Mod#1
Conversation
* remove CA from ACP * create permissions to create, edit and remove CA's * CA's ordered in a single menu Signed-off-by: margarett <bruno.m.alves@gmail.com>
|
those files are not in a files folder so the install fails on that part. |
|
Ups 👅 That got lost in the installer-combination between what I've done and what was already done :( |
Signed-off-by: margarett <bruno.m.alves@gmail.com>
|
as admin i can not view the button in the menu to add/control the mod. giving permissions to a user to create custom actions and edit, they can not view the button in the menu either, once i created an action then the button shows but only if the action is set to show the menu button. i assume the edit url is http://localhost:8080/github2.1/index.php?action=ca_edit going to that url i get Parse error: syntax error, unexpected '&&' (T_BOOLEAN_AND), expecting ')' in F:\wamp\www\github2.1\Sources\CustomAction.php on line 319 it should be
then i get my smf1_custom_actions table does not have id_author in the table if i tell the package manager to remove the data then the id_author column is added but not on a "reinstall" when i go to ca_edit and create a new action, the permissions mode is grayed out as an admin and i can not select who can view the page now that i created a page and set it to show the button my user that has permission to create new actions can create them my user that can only edit their own actions can view the one the admin use created. also we may want to consider a way to limit who can create html and php actions. |
|
line 406 CustomAction.php undefined permission_mode for all users Invalid argument supplied for foreach() Undefined index: ca_temp |
Fixed. Duh!
It is. I can't reproduce that, it opens the page clearly, no errors reported. But looking at the line, there was a parenthesis out of place, yes :P XAMPP doesn't complaint about that :P
Yes, you really have to recreate the table (meaning, delete it before installing the MOD. I'm not yet familiar with the "database flow" on MOD install/uninstall :(
Fixed (not thoroughly tested, though) Have to reboot the computer :tongue but I'll continue in a minute |
Could not reproduce :(
Could not reproduce :( I'm updating the package, can you completely uninstall (probably get a fresh SMF copy from GH), including database, and retry? |
|
did you commit your changes? i dont see any showing up since you fixed the installer |
|
Just updated now. I thought I commited but I didn't. This GH stuff is still pretty new to me 👅 |
|
the normal user i have can still see the action that the admin made... might also be nice to see who created the pages in the list and still i have those errors posted above about permissions_mode, undefined index:ca_temp and invalid argument supplied for foreach() |
Check if the user is not part of several groups. I can't really reproduce that :(
And I still can't see this happening. Can you clear your log and try to see in which action this happens? I usually do this with 2 open tabs (or 2 browsers for different users) and, each time I do something in the forum, I refresh the error log in the second tab/browser... |
|
the action created by the admin is visible to all groups, but it should only be able to be edited by the admin or the person that created it. Undefined index: permissions_mode 2: Invalid argument supplied for foreach() 8: Undefined index: ca_temp the errors only show up when the test user creates an action not the admin user. |
|
Got it, thanks. Working on it edit: dang, no idea why this happens :( |
|
I think I fixed undefined/invalid issues now. Scrambling with permissions is really tricky :P |
|
Ah, it's per design, it's not really a bug :)
|
|
thanks for looking into it. |
|
Submitting now ;) |
Signed-off-by: margarett <bruno.m.alves@gmail.com>
|
2: Invalid argument supplied for foreach() 8: Undefined index: ca_2 the user is not able to edit the admin's action that is good. also there is no check if an existing action with the same name already exists. |
|
What were you doing when such error appears? The check for same name is a "todo". First we need to have the "ground" stable. That, the appearance of the buttons, etc... |
|
looks like creating an action with my test account |
|
no it was editing the article with the test user. |
|
article was created with the test user if admin edits it no errors |
|
Same permission trick as before :s |
|
i will check it out again tomorrow |
Signed-off-by: margarett <bruno.m.alves@gmail.com>
|
I've fixed it already. |
|
i thought we said that only admin should change who can view the action? |
|
If you test this and find no bugs, I'd suggest you to merge it now so that you can add your stuff. Anyway, from what I've seen, (and from what I understand, which is not much) there are several issues that need to be addressed:
On the create action, the boxes should be bigger. BBC should be more or less same size as the normal post box (and it would be gold if we could add the BBC buttons 😄 ). For PHP/HTML, since it uses 2 boxes, they should be one-on-top-of the other, again, full size as it should be a real PITA to have code in such a small textbox... |
|
remove the span stuff where? in the template ? i was the one that added the spans to make it look better then it did in the old version. where is your code? |
|
or is there no new code since the last? |
|
Latest commit was yesterday:
Now I was searching on what to do next, but I hate this graphics stuff 👅 |
|
make an issue on that over at the 2.1 repo |
|
Now you got me lost :P |
|
the template in manageMembergroups.template.php so they can add the spans. unless you mean i need to add spans somwhere? |
|
No, we're in circles :P The template at ManageMembergroups is fine. We need to fix our template to remove the spans and use the dl/dt/dd operators to better align the action options ;) Ha, just remembered, I need to fix the possibility to add actions with the same name! |
|
the old mod was using tables, i am not that familiar with tables or dl/dt/dd's i just made the page match the existing formats on other admin pages |
|
Oh :P So we saw different admin pages, then :P There is no harm in using tables if the content is tabbed ;-) |
|
there is an issue when it looks ugly. go install the old mod from the mod site on 2.0 and check it out. |
|
Notice: Undefined index: custom_action_only_admin_change_permissions in F:\wamp\www\github2.1\Themes\default\CustomAction.template.php on line 107 |
|
Missed that language string in the install file :( I fixed it here, offline, when I commit will be there already. I'm thinking in include a dedicated language file for easy maintenance :) |
|
do we want normal users to be able to toggle the enabled box? i am thinking it may be useful to just allow admin to handle that, maybe also show menu button as well. |
|
Actually I thought about that, and I think it does make sense. Imagine that if the user wants to create an action but wants to have non-default visibility. This brings me to another issue :( The actual visibility setting will ALWAYS set it to everyone, every time a non-admin user edits an action. Even if the admin had it set to "groups", then the save will overwrite that and put it back to "everyone". |
|
Not quite ready to merge, then :P |
|
and one more thing, on the action list can you add the author of the action? |
|
Yes, that's on the "todo list". But that also messes with that "createList" function, the one that keeps banging my mind :P |
|
you could always ask for help if you need it on the forum. |
|
Yup, will do that. Later, though, we still have things to polish (and everytime I think "almost done", something comes up. I wonder how developers feel :P ) |
|
Time to go to bed. I'm reviewing hard the CustomAction.php source file. |
|
I have the feeling I bit more that I can chew :P :P :P I hope you're not in a hurry :) |
|
i am not as long as 2.1 is not released :P |
|
Jeez, what a pain :P Still trying to work out something here. I need not only to make it work but I also need to do something that "moves" to keep motivation. AAAAARGGGG!!!!! 👊 |
|
Starts too look better. Finally :P I'm still just on the layout thing. I still need to go again through all the database operations because I broke all of this when re-writing it :P When this is again "workable", we need to go through the debug all over again :P Not so sure if this was a good idea now, was it? :) |
|
whatever works for you. |
|
Howdy :) Don't think I forgot this. I've been working on it. Unfortunately I've had little time and I stumbled on a LOT of new things for me :P
We'll get there. But I need time, really... |
|
UPDATE !!! :) It still requires some work. A lot of it, really 👅 |
|
but you are getting there, that is good. |
|
Yup, it is :) Unfortunately I'm having almost no time to play with this. And due to the complexity involved (to me, at least ehehheh) it's not something I can pick when I have like 30 minutes to spare :) Now I just did some "aesthetic", just-for-fun changes: linktree (not yet in every functions) and the "Custom Actions" menu button is active when a "ca-related-action" is being performed :P |
Signed-off-by: margarett bruno.m.alves@gmail.com