Page 3 of 4

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

Posted: Sat Aug 07, 2010 7:50 am
by battye
Hmm :?

Find

Code: Select all

else
{
redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", "i=alerts&mode=alerts")); 
}
Replace with:

Code: Select all

else if( !$_POST )
{
redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", "i=alerts&mode=alerts")); 
}
FIND:

Code: Select all

confirm_box(false, 'UCP_ALERTS_DELETE');
Replace with:

Code: Select all

else
{
confirm_box(false, 'UCP_ALERTS_DELETE');
}
Does that fix it?

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

Posted: Sat Aug 07, 2010 4:26 pm
by pluto
Hello

This is exactly the same :cry:
When I click to delete an alert, it nothing happens.
There is no longer the expression "Are you sure you want to delete this alert ? "

Here is my file: ucp_alerts.php

Thank you again.

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

Posted: Thu Sep 09, 2010 2:20 pm
by pluto
Hello,

Person for the solution ?

Thank you.

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

Posted: Tue Sep 28, 2010 2:13 pm
by pluto
Hello,

For additional information, trying to undo the deletion of an alert on your forum by clicking "No", you get a blank page :!:

Thank you for your answers.

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

Posted: Tue Sep 28, 2010 3:28 pm
by battye
I'm sorry for the slow reply pluto I have been quite busy :cry: :cry: :cry:

Try this:

find:

Code: Select all

			if (confirm_box(true))
			{
				$sql = "DELETE FROM " . ALERTS_TABLE . "
						WHERE alert_id = " . request_var('delete', 0) . "
						AND user_id = " . $user->data['user_id'];
				$db->sql_query($sql);

				// Clear the cache
				$cache->destroy('sql', ALERTS_TABLE);

				trigger_error( sprintf($user->lang['UCP_ALERTS_DELETE_SUCCESS'], "<a href='" . append_sid($this->u_action) . "'>", "</a>") );
			}
			else if( !$_POST )
{
redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", "i=alerts&mode=alerts")); 
}

			else
{
confirm_box(false, 'UCP_ALERTS_DELETE');
}
	

Replace with:

Code: Select all

			if (confirm_box(true))
			{
				$sql = "DELETE FROM " . ALERTS_TABLE . "
						WHERE alert_id = " . request_var('delete', 0) . "
						AND user_id = " . $user->data['user_id'];
				$db->sql_query($sql);

				// Clear the cache
				$cache->destroy('sql', ALERTS_TABLE);

				trigger_error( sprintf($user->lang['UCP_ALERTS_DELETE_SUCCESS'], "<a href='" . append_sid($this->u_action) . "'>", "</a>") );
			}

			else
			{
						confirm_box(false, 'UCP_ALERTS_DELETE');
			}
What happens if you do this? :)

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

Posted: Wed Sep 29, 2010 10:09 pm
by pluto
Good evening,

No luck, now I find myself again with the line:
template->_tpl_load_file(): File ./styles/acidtech/template/.html does not exist or is empty :?
Thank you.

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

Posted: Tue Oct 19, 2010 6:46 pm
by pluto
Hello,

A little up, thank you.

Pluto.

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

Posted: Mon Nov 15, 2010 4:59 pm
by pluto
Hello,

No one to support ?
Thanks.

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

Posted: Tue Nov 16, 2010 6:36 am
by battye
pluto, I'm looking at http://up.sur-la-toile.com/iCEe - if you replace:

Code: Select all

		if($delete) // delete an event
		{
			if (confirm_box(true))
			{
				$sql = "DELETE FROM " . ALERTS_TABLE . "
						WHERE alert_id = " . request_var('delete', 0) . "
						AND user_id = " . $user->data['user_id'];
				$db->sql_query($sql);

				// Clear the cache
				$cache->destroy('sql', ALERTS_TABLE);

				trigger_error( sprintf($user->lang['UCP_ALERTS_DELETE_SUCCESS'], "<a href='" . append_sid($this->u_action) . "'>", "</a>") );
			}
			else if( !$_POST )
{
redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", "i=alerts&mode=alerts")); 
}

			else
{
confirm_box(false, 'UCP_ALERTS_DELETE');
}
		}
With

Code: Select all

		if($delete) // delete an event
		{
						$sql = "DELETE FROM " . ALERTS_TABLE . "
						WHERE alert_id = " . request_var('delete', 0) . "
						AND user_id = " . $user->data['user_id'];
				$db->sql_query($sql);

				// Clear the cache
				$cache->destroy('sql', ALERTS_TABLE);

				trigger_error( sprintf($user->lang['UCP_ALERTS_DELETE_SUCCESS'], "<a href='" . append_sid($this->u_action) . "'>", "</a>") );
		}
Is that okay?

Sorry for the delay again :oops:

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

Posted: Tue Nov 16, 2010 10:45 pm
by pluto
Hello,

The removal works perfectly, cons, there is more demand confirmation of removal.
Thanks.

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

Posted: Thu Nov 18, 2010 3:42 pm
by battye
I think I have an idea to add the confirmation back :D

Try replacing

Code: Select all

      if($delete) // delete an event
      {
                  $sql = "DELETE FROM " . ALERTS_TABLE . "
                  WHERE alert_id = " . request_var('delete', 0) . "
                  AND user_id = " . $user->data['user_id'];
            $db->sql_query($sql);

            // Clear the cache
            $cache->destroy('sql', ALERTS_TABLE);

            trigger_error( sprintf($user->lang['UCP_ALERTS_DELETE_SUCCESS'], "<a href='" . append_sid($this->u_action) . "'>", "</a>") );
      }
With

Code: Select all

if($delete) // delete an event
{
      if(request_var('confirm', 0) > 0) // confirm
      {

                  $sql = "DELETE FROM " . ALERTS_TABLE . "
                  WHERE alert_id = " . request_var('delete', 0) . "
                  AND user_id = " . $user->data['user_id'];
            $db->sql_query($sql);

            // Clear the cache
            $cache->destroy('sql', ALERTS_TABLE);

            trigger_error( sprintf($user->lang['UCP_ALERTS_DELETE_SUCCESS'], "<a href='" . append_sid($this->u_action) . "'>", "</a>") );
      }

      else
      {
      trigger_error('Please confirm that you wish to delete this event: <a href="' . append_sid($this->u_action . '&confirm=1') . '">Confirm</a>');
      }
}
Let me know if that works :)

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

Posted: Fri Nov 19, 2010 7:20 pm
by pluto
Good evening,

No, when I click, it brings me back to the panel without removing the alert :|

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

Posted: Sat Nov 27, 2010 10:30 am
by victory1
pluto wrote:Hello,

When I want to cancel a deletion warning, I get this error:

Code: Select all

Général error
template->_tpl_load_file(): File ./styles/acidtech/template/.html does not exist or is empty
Thank you to you.
I migrated from another forum software on October 25th and I am slowly adding Mods to my new phpBB forum. My old forum had something similar built in so I knew what I was looking for. I found this and the Calendar 0.1.0 (alightner) which is a little to complicated for what I have in mind. I'm also getting the same error as the above poster when I cancel delete!

Code: Select all

General Error
template->_tpl_load_file(): File ./styles/redsteel/template/.html does not exist or is empty
Also when do you plan to add the bbcode functionality? I saw it was mentioned several times in the phpBB Support forum. I would love to add an url to direct them to the forum, topic, or post that the alert is referring to.


Thanks

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

Posted: Tue Nov 30, 2010 1:48 pm
by victory1
No answers forthcoming? :?: Thanks :)

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

Posted: Thu Feb 10, 2011 2:20 pm
by quahappy
Have some suggestions for your excellent Calendar Alerts MOD, battye. ;)

1. At present, when adding a new Alert, if no year is specified when submitting, you'll be informed of this. Is is possible to change it so if no year isn't specified, it takes the Alert entry as "repeat for every year"? Would be handy for Birthday reminders, Christmas Day, Valentine Day, etc. Basically where the day/month never changes each year.

2. Suggestion: Edit mode. Saves deleting and re-creating because of mistake.

3. Limit admin global alerts to logged in members only / or set global alert visibility by usergroup.