Since 2009

SMFPacks Conversations - Question

Discussion started on Pre-Sale Questions

Gano

I want to buy the mod. One question:
Does it change something heavy, so that the custom alert of my custom theme at new private messages no longer work?
(I use the premium theme Darkly by SMF Tricks.)

Linkback: https://www.smfpacks.com/b2/smfpacks-conversations-question/4023/
#1 - June 13, 2017, 01:58:05 PM
« Last Edit: June 13, 2017, 02:00:49 PM by Gano »

NIBOGO

That would depend on how you implement it. The mod uses its own sendpm function to provide compatibility, but based on the changes you have made it might require an adjustment
#2 - June 13, 2017, 02:02:24 PM

Gano

The following is the code of the alert function
Code: [Select]
function theme_st_alerts()
{
    global $context, $settings, $options, $scripturl, $txt, $modSettings;
    if ($context['user']['is_logged'])
    {
            if(!empty($context['user']['unread_messages']))
            {
                st_create_alert('fa-exclamation-triangle',$context['forum_name'],$url = ''. $scripturl. '?action=pm', '_blank',$txt['show_personal_messages']);            
            }
    }
    
}
function st_create_alert($icon = 'fa-exclamation-triangle',$title = '', $url = '', $target = '',$message = '')
{
    global $context, $settings, $options, $txt, $scripturl, $modSettings, $win;
    echo'<script type="text/javascript">
            $(document).ready(function(){
                $.notify({
                    icon: "fa ',$icon,' fa-4x pull-left",
                    title: "<strong>' . $title . '</strong>",';
                    if (!empty($url) && !empty($target))
                    {
                        echo'
                            url: "',$url,'",
                            target: "',$target,'",';
                    }
                    echo'                    
                    message: "', $message, '"
                },{
                    icon_type: "class",
                    type: "minimalist",
                    delay: ',empty($settings['st_alerts_delay']) ? '0' : $settings['st_alerts_delay'],',
                    template: "<div data-notify=\'container\' class=\'col-xs-11 col-sm-3 alert alert-{0}\' role=\'alert\'> "  
                                        "<button type=\'button\' aria-hidden=\'true\' class=\'close\' data-notify=\'dismiss\'><i class=\'fa fa-times\' aria-hidden=\'true\'></i></button>"
                                        "<span data-notify=\icon\></span>"
                                        "<span data-notify=\'title\'>{1}</span>"
                                        "<span data-notify=\'message\'>{2}</span>" ';
                                        if (!empty($url) && !empty($target))
                                        {
                                            echo'"<a href=\'{3}\' target=\'{4}\' data-notify=\'url\'></a>" ';
                                        }
                                        echo'
                                    "</div>"
                });
            });
        </script>';    
}
#3 - June 13, 2017, 02:13:48 PM

NIBOGO

I can't know what the code does nor what you aim to achieve, but the pm action will be indeed work when the mod is installed.
#4 - June 13, 2017, 02:17:39 PM

Gano

Alright. That's all I wanted to know. :)
#5 - June 13, 2017, 02:42:47 PM

NIBOGO

Keep in mind it will show the same conversations window.
#6 - June 13, 2017, 02:44:03 PM

Gano

I know, but thanks
#7 - June 13, 2017, 03:37:04 PM

NIBOGO

I just wanted to make sure :)
#8 - June 13, 2017, 03:42:12 PM

Members:

0 Members and 1 Guest are viewing this topic.


* Share Topic

Share via delicious Share via digg Share via facebook Share via linkedin Share via pinterest Share via reddit Share via stumble Share via tumblr Share via twitter

* Similar Topics

xx
SMFPacks Personal Conversations Mod!

Started by NIBOGO on Main News

0 Replies
7085 Views
Last post December 23, 2014, 12:30:11 PM
by NIBOGO
xx
SMFPacks Conversations - German lanuage pack

Started by bernd.schaaf@inl.ag on Pre-Sale Questions

1 Replies
1159 Views
Last post August 05, 2016, 09:58:52 AM
by NIBOGO
solved
SMFPacks Shoutbox Question

Started by Spacecraft on Pre-Sale Questions

1 Replies
2527 Views
Last post November 27, 2013, 10:20:24 PM
by NIBOGO
question
Question for SMFPacks Facepunch | Rates Mod

Started by guy2000xp on Pre-Sale Questions

1 Replies
745 Views
Last post September 07, 2017, 09:51:05 AM
by NIBOGO