Page 4 of 4

Re: [BETA 3] Calendar Alerts MOD v0.0.3

PostPosted: Thu Mar 03, 2011 9:54 am
by quahappy
This MOD is absolutely brilliant and being used constantly; especially for many notable global calendar dates/events. A couple of questions (in addition to above):

1. Allow BBCode. Would be extremely handy for [url] usage as could point members to a specific topic/post or another website.

2. I'd like to be able to display this MOD on my Portal page. Would I need to copy and paste the required Calendar Alerts MOD code to index.php into portal.php? And of course same for template file?

Thanks battye. :)

Re: [BETA 3] Calendar Alerts MOD v0.0.3

PostPosted: Sat Mar 05, 2011 2:10 pm
by giardiniere
Many thanks for this very useful mod.
Is it possible to notice by e-mail too?

Re: [BETA 3] Calendar Alerts MOD v0.0.3

PostPosted: Sat Mar 05, 2011 3:27 pm
by battye
Sorry quahappy, I haven't had a chance to look at the Calendar Alerts MOD for a while. I'll look into your requests in all likelihood once the first beta of UQM is out (I might be able to help you with the portal question before then because it is more of a personalisation) :)

giardiniere, welcome to CMX :)
Like quahappy's personalisation request, I'll try and look into the email notification shortly as well (seeing it is not a feature I would actually implement into the MOD) :)

Re: [BETA 3] Calendar Alerts MOD v0.0.3

PostPosted: Tue Jun 28, 2011 9:26 pm
by vova_ob
Hi
help
how I can Parse BBCode and smilies in alert message ?

thanks))

Re: [BETA 3] Calendar Alerts MOD v0.0.3

PostPosted: Sat Jul 23, 2011 4:42 pm
by battye
vova_ob, sorry for the delayed reply. Typically bbCode and smilies complicate matters (more columns are required in the table, etc) so I probably won't include that feature.

v0.0.4 has just been released, including UMIL and a fix for a bug which has affected this MOD for a long time. I feel terrible about how long it has taken for this release to occur, this and another UQM release are always high on my list of priorities - time is always getting ahead of me though :(

The download link is at: http://www.cmxmods.net/downloads/Calend ... _Beta4.zip

Re: [BETA 4] Calendar Alerts MOD v0.0.4

PostPosted: Tue Mar 13, 2012 6:30 pm
by victory1
This topic is close on phpBb.com so I was able to add parse bbcode and smilies to this mod. The only thing is you will get a general error due to the length of your alert if your message is too long so it's best to adjust it. I had to go my phpMyAdmin and adjust it since it will initially count all characters of your message like the below Example Message and with urls and bbcodes, they can be easily filled up with just a couple of links. So I changed my alert_text varchar to 800 to accommodate my message plus links.

Open:
roots/index.php

Find:
Code: Select all
$template->assign_block_vars('alerts', array(


Add Before:
Code: Select all
         $message = utf8_normalize_nfc($row['alert_text']);
         $uid = $bitfield = $options = '';
         $allow_bbcode = $allow_urls = $allow_smilies = true;
         generate_text_for_storage($message, $uid, $bitfield, $options, $allow_bbcode, $allow_urls, $allow_smilies);
         $row['alert_text'] = generate_text_for_display($message, $uid, $bitfield, $options);



Open:
roots/includes/ucp/ucp_alerts.php

Find:
Code: Select all
            $template->assign_block_vars('alerts', array(
            'U_ALERT'         => $row['alert_text'],


Add Before:
Code: Select all
            $message = utf8_normalize_nfc($row['alert_text']);
            $uid = $bitfield = $options = '';
            $allow_bbcode = $allow_urls = $allow_smilies = true;
            generate_text_for_storage($message, $uid, $bitfield, $options, $allow_bbcode, $allow_urls, $allow_smilies);
            $row['alert_text'] = generate_text_for_display($message, $uid, $bitfield, $options);



Example Message:
Code: Select all
HOLIDAY LIGHTS / SNOW - You might have noticed the holiday lights and snow! When you hover over the lights with your mouse they smash. Be aware, there is a smashing sound. They are our holiday decoration for the month of December. You can turn off the lights/snow permanently in the User CP, choose Board preferences and click No for both options! For GUESTS - You can stop the snow temporally by clicking on Stop Snowing in the menu item. It will resume again when you maneuver to a new page.
[br][/br]Feel free to share your thoughts: [url=http://www.sonyreaderboards.com/forums/viewtopic.php?f=28&t=2374]Go To Light Topic[/url] and [url=http://www.sonyreaderboards.com/forums/viewtopic.php?f=28&t=2389]Go To Snow Topic[/url]! Happy Holidays! :party:

Re: [BETA 3] Calendar Alerts MOD v0.0.3

PostPosted: Tue Apr 24, 2012 6:24 am
by Floyd
Firstly, thanks ever so much for doing this mod and taking the time to help people out. Its appreciated.

I too, would like to do what Quahappy has asked, about putting it into a portal block, but I cant seem to get the code to work from the index_body.html or index.php file. It just returns blank when added to a custom html block etc.

I would also like to know where the css coding might be for this block, as my results are just a white background with red text ( but the ucp area is fine ). Do we have to hard code the mod, or can this pick up the css from our templates?

Also, is there a way to EDIT existing alerts, or do we have to delete them and re-add them?

Many thanks

Floyd.


quahappy wrote:This MOD is absolutely brilliant and being used constantly; especially for many notable global calendar dates/events. A couple of questions (in addition to above):

2. I'd like to be able to display this MOD on my Portal page. Would I need to copy and paste the required Calendar Alerts MOD code to index.php into portal.php? And of course same for template file?

Thanks battye. :)


Let me know if you sort it :)