Click anywhere to close this dialog

Farewell

Great is the art of beginning, but greater is the art of ending
Henry Wadsworth Longfellow

I announce that I cease all development and activity in the programming universe indefinitely. My career has reached the turning point I was not expecting for at least another year, leaving me highly off guard and without laid-out plans for this hobby's continuity. I have begun a 5-year residency program in Neurosurgery which is clearly not compatible, time-wise, with programming.

I gave in all my passion for developing, and you gave me back your loyalty and trust, even when I did not deserve that much. Now it is the time for payback. I release all my present and past work as Open Source software, in the hope some talented developer will continue maintaining and expanding my vision of a modern, sleek forum software. The intrinsic flexibility of MyBB is the true hidden gem of an otherwise outdated codebase; I do hope the project can continue and be updated complying to the latest coding standards.

I hereby thank Euan, kawaii, andrewjs18, Ben, Matt, Omar G., effone, Eric J., Devilshakerz, Wildcard, JordanMussi and all the other team members I have had the opportunity to work with when I was a MyBB team member. I thank Tomm M, my mentor, who inspired me to pick up coding with his piece-of-art plugins. And finally, I thank all of you MyBBoost subscribers who have helped me getting through my toughest university years economically.

Yours sincerely, Filippo

Alert Modal Read/Delete Buttons

31 Oct 2019
#1
This issue is marked as solved

You are viewing page #2

Show original post
Shade 1 Nov 2019 Edited
#11
https://github.com/MyBBStuff/MyAlerts/bl...rts.js#L35

Also it disappears because you're missing a ">" closure char for that <a> HTML tag.
RocketFoot 1 Nov 2019 Edited
#12
Ok...you're probably getting tired of me, LOL!

I made the edits in FTP and fixed the template...the buttons are showing with the classes added but the modal still closes when I click READ and nothing happens when I click DELETE.

<tr class="alert {$alert['alert_status']} alert--{$alert['alert_code']}"
    id="alert_row_popup_{$alert['id']}">
    <td class="{$altbg} align-center alert__avatar" align="center">
        <a class="avatar" href="{$alert['from_user_raw_profilelink']}"><img
                src="{$alert['avatar']['image']}"
                alt="{$alert['username']}'s avatar" {$alert['avatar']['width_height']}/></a>
    </td>
    <td class="{$altbg} alert__content">
        <a href="{$mybb->settings['bburl']}/alerts.php?action=view&amp;id={$alert['id']}">
            {$alert['message']}
        </a>
       </td>
    <td class="{$altbg} alert__time">
        {$alert['received_at']}</br>
    
        <a href="{$mybb->settings['bburl']}/alerts.php?action=markread&amp;id={$alert['id']}&amp;my_post_key={$mybb->post_code}" class="markReadAlertButton" id="markread_alert_{$alert['id']}"><i class="fa fa-fw fa-check" style="font-size:20px;color:green;" title="Mark Read"></i></a>
        
        <a href="{$mybb->settings['bburl']}/alerts.php?action=delete&amp;id={$alert['id']}&amp;my_post_key={$mybb->post_code}" class="deleteAlertButton id="delete_alert_{$alert['id']}" title="{$lang->myalerts_delete}"><i class="fa fa-fw fa-times" style="font-size:20px;color:red;"></i></a>

    </td>
</tr>

Here are the 2 edited files jsut incase I messed something up! I am still learning this coding stuff, haha!

Thanks for all the help!
Filename Size Downloads
43.05 KB 1
3.19 KB 0
Eldenroot likes this post
Eldenroot 1 Nov 2019
#13
I am curious too and need this "nice enahncement too"... and what about auto read notification when you visit thread/post/mention? Would be great ;)
RocketFoot likes this post
RocketFoot 2 Nov 2019
#14
Yes...I had members already asking for auto read!
Eldenroot 2 Nov 2019
#15
And the second request - display "absolute" date and time on mouse hover on date in modal window...
Shade 2 Nov 2019
#16
All I can do is to share my modified files. Here's my myalerts_alert_popup_row template:

<tr class="alert-row alert--{$alert['alert_code']} {$alert['alert_status']}" id="alert_row_{$alert['id']}">
    <td class="uk-table-shrink uk-padding-remove">
        <a href="{$alert['from_user_raw_profilelink']}" class="uk-margin-small-right">
            <img src="{$alert['avatar']['image']}" class='uk-border-circle uk-preserve-width' style="width: 30px; height: 30px" />
        </a>
    </td>
    <td>
        <a href="{$mybb->settings['bburl']}/alerts.php?action=view&amp;id={$alert['id']}">{$alert['message']}</a><br>
        <span class="uk-text-meta">{$alert['received_at']}</span>
    </td>
    <td class="uk-visible@s uk-text-nowrap uk-text-center">
        <a href="{$mybb->settings['bburl']}/alerts.php?action=markread&amp;id={$alert['id']}&amp;my_post_key={$mybb->post_code}" class="markReadAlertButton" id="markread_alert_{$alert['id']}" title="Mark as read" uk-tooltip uk-icon="icon: check"></a>
        <a href="{$mybb->settings['bburl']}/alerts.php?action=delete&amp;id={$alert['id']}&amp;my_post_key={$mybb->post_code}" class="deleteAlertButton uk-text-danger" id="delete_alert_{$alert['id']}" title="{$lang->myalerts_delete}" uk-tooltip uk-icon="icon: close"></a>
    </td>
</tr>
Filename Size Downloads
3.33 KB 4
43.87 KB 4
RocketFoot and little.evil.genius like this post
RocketFoot 2 Nov 2019 Edited
#17
Thanks Shade...I'll dig through it and see what I can see.

I was ale to get the READ check marks working but I can not figure out what is wrong with the DELETE button...it is not working at all. You must have some classes set up somewhere else to handle that function...I'm just not sure.


@Eldenroot
Ok...I did a line for line comparison and found a lone set of missing quotes! I think it is working on my board nicely now! Back up your originals and replace your myalerts_alert_popup_row template with this: (you might have to adjust the icons if you are not using Font Awesome)

<tr class="alert {$alert['alert_status']} alert--{$alert['alert_code']}"
    id="alert_row_popup_{$alert['id']}">
    <td class="{$altbg} align-center alert__avatar" align="center">
        <a class="avatar" href="{$alert['from_user_raw_profilelink']}"><img
                src="{$alert['avatar']['image']}"
                alt="{$alert['username']}'s avatar" {$alert['avatar']['width_height']}/></a>
    </td>
    <td class="{$altbg} alert__content">
        <a href="{$mybb->settings['bburl']}/alerts.php?action=view&amp;id={$alert['id']}">
            {$alert['message']}
        </a>
       </td>
    <td class="{$altbg} alert__time">
        {$alert['received_at']}</br>
    
        <a href="{$mybb->settings['bburl']}/alerts.php?action=markread&amp;id={$alert['id']}&amp;my_post_key={$mybb->post_code}" class="markReadAlertButton" id="markread_alert_{$alert['id']}"><i class="fa fa-fw fa-check" style="font-size:20px;color:green;" title="Mark Read"></i></a>
        
        <a href="{$mybb->settings['bburl']}/alerts.php?action=delete&amp;id={$alert['id']}&amp;my_post_key={$mybb->post_code}" class="deleteAlertButton" id="delete_alert_{$alert['id']}" title="{$lang->myalerts_delete}"><i class="fa fa-fw fa-times" style="font-size:20px;color:red;"></i></a>

    </td>
</tr>
Then upload and overwrite these files to jscripts/myalerts.js & Inc/plugins/myalerts.php
Filename Size Downloads
3.33 KB 4
43.87 KB 5
Eldenroot likes this post
Eldenroot 2 Nov 2019
#18
Thank you, I will try ASAP!
RocketFoot likes this post
Eldenroot 2 Nov 2019
#19
@RocketFoot - OK, works fine, thank you!

What about this page?

https://www.mybboost.com/alerts.php
Shade 2 Nov 2019
#20
It's the same template copied onto myalerts_alert_row.
Eldenroot and RocketFoot like this post