Hello,
How can i add a button to action block as php?
Hello,
How can i add a button to action block as php? |
Either by hand in the database table sys_objects_actions rather complex depending on what the action button is to do, who it is to be displayed to, ect. Which you did not mention. https://www.deanbassett.com |
Either by hand in the database table sys_objects_actions rather complex depending on what the action button is to do, who it is to be displayed to, ect. Which you did not mention. I found it in sql but how can i add the report button from Profile actions block to ProfileTitle? I've tried adding like this, but it did not: Caption: {cpt_report} Icon: exclamation-sign Script: {evalResult} Eval: if ({ID} == {member_id}) return; return "$.post('list_pop.php?action=spam', { ID: '{ID}' }, function(sData){ $('#ajaxy_popup_result_div_{ID}').html(sData) } );return false;"; Order: 4
Type: ProfileTitle
bDisplayInSubMenuHeader: 1
|
I found it in sql but how can i add the report button from Profile actions block to ProfileTitle?
I've tried adding like this, but it did not: Caption: {cpt_report} Icon: exclamation-sign Script: {evalResult} Eval: if ({ID} == {member_id}) return; return "$.post('list_pop.php?action=spam', { ID: '{ID}' }, function(sData){ $('#ajaxy_popup_result_div_{ID}').html(sData) } );return false;"; Order: 4 Type: ProfileTitle bDisplayInSubMenuHeader: 1
|
And your result was what? https://www.deanbassett.com |
Yes, but i'm not quite sure. I try it again. Do you think is right? And your result was what?
|
Yes, but i'm not quite sure. I try it again. Do you think is right? And your result was what?
Yes it looks right. I just did it the easy way in phpmyadmin for my site which was to edit the existing. Change profile to profile title and remove the id then insert as new row instead of saving which makes a duplicate of it. And it showed up after clearing the cache. Which is normal for manual database changes. You always have to clear the cache. https://www.deanbassett.com |
Yes just like you said:
Yes, but i'm not quite sure. I try it again. Do you think is right? And your result was what?
Yes it looks right. I just did it the easy way in phpmyadmin for my site with was to edit the existing. Change profile to profile title and remove the id then insert as new row which makes a duplicate of it. And it showed up after clearing the cache. Which is normal for manual database changes. You always have to clear the cache.
|
Now you have two choices. https://www.deanbassett.com |
Im sing Dolphin with multi language and I have a little php knowledge . I'm trying the second choice. 2) Edit profile.php and look for this
if(isFriendRequest($iMemberId, $iId)) { And insert this just before it. $aVars['cpt_report'] = _t('_Report Spam'); The simple way would be choice 1
|
I added it but now dashboard button not showing on profile page can you provide it to me please? |
I did not actually test that part, so let me test and i will get back to you. I may need to do something different. https://www.deanbassett.com |
I tested it, and it worked fine. https://www.deanbassett.com |
It worked fine from me too, but i need dashboard button row. I do not know why, but after added them its not showing.. Can you provide me the row? -And ya it's still there .. |
Your going to have to provide me with screen shots. https://www.deanbassett.com |
I added profile edit and subscribe to own profile title area. its showing there is no problem with them, but before adding them there was dashboard button from own profile title area, but there are not anymore dashboard button on my own profile..
|
Ok. So this is unrelated to what we just did. https://www.deanbassett.com |
This items caption for that button is {cpt_am_profile_account_page} https://www.deanbassett.com |
Thanks its done. but subscribe dont work. Why do you think could be? |
Thanks its done. but subscribe dont work. Why do you think could be? Most likely because it requires supporting code and a return area to display the message that's returned after it's done. https://www.deanbassett.com |
Its not able to fix? Most likely because it requires supporting code and a return area to display the message that's returned after it's done.
It was not designed to be placed in the title area.
|
Try this. I have not tested it. https://www.deanbassett.com |
This is not likely to work tho. I believe there is more code and i am not sure of the rest of it. https://www.deanbassett.com |
I removed it because It showing for the guests too and some of them is not working properly.. Thanks for your help i learned some things. |