Search

Hi everybody, I try to create an extension for sending email to author with role 'admin' (for exemple, using Author Roles extension) when author with role 'author' create or modify an entry in the backend.

When sending is ok, i would like to use the class Alert to prevent the user but the default alert (entry successfully created) seems to block my new alert...
I try with "Symphony::Engine()->Page->Alert = new Alert(...)" and with "Administration::instance()->Page->pageAlert(...)". without success.

If you know how to use alert for backend/edit or create, i'll very happy to hear you!

Thank's in advance,

Valéry ps : i'm using Symphony 2.2.4

the default alert (entry successfully created) seems to block my new alert

That shouldn't be the case as recent version of Symphony are able to display more than one message of any type.

I have been using an extension stub to display loads of backend alerts for Symphony 2.3 development, can you get that one to work?

No i can't, only one alert is displaying (is it due to my version of Symphony.. 2.2.4?)

Oh sorry, that feature has been implemented in 2.3 but not in 2.2.4.

If you're using Git you could try merging that patch into your codebase (don't know if it will break things though):

curl https://github.com/symphonycms/symphony-2/commit/90cda6cd7804cd99b562b72e8b44133d4bb0c702.diff | git am

ok, i tried with 2.3 and it's ok for multiple alert, but i can't use this version because Email Template Manager Extension isn't compatible with it :

Fatal error: main() [function.require]: Failed opening required '/Applications/MAMP/htdocs/symphony-2-23/symphony/lib/toolkit/class.manager.php' (includepath='.:/Applications/MAMP/bin/php/php5.3.6/lib/php') in /Applications/MAMP/htdocs/symphony-2-23/extensions/emailtemplate_manager/lib/class.emailtemplatemanager.php on line 5

Oh no, I didn't mean you should use 2.3. It's far from being finished!

Instead you could try back-porting that single feature into your 2.2.4-installation.

ok, i wiil try...

i'm not a pro git user so... this is what i get when i try to merge the feature :

iMac-de-Valery:symphony valery$ curl https://github.com/symphonycms/symphony-2/commit/90cda6cd7804cd99b562b72e8b44133d4bb0c702.diff | git am
previous rebase directory /Applications/MAMP/htdocs/symphony/.git/rebase-apply still exists but mbox given.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1177  100  1177    0     0   1667      0 --:--:-- --:--:-- --:--:--  2050

and nothing is changing in files... so i'm a little confuse.

Oh sorry, I meant

curl https://github.com/symphonycms/symphony-2/commit/90cda6cd7804cd99b562b72e8b44133d4bb0c702.patch | git am

Thank's Nils, patch is working on 2.2.4 !

okay, i'm not so far from the end but i have a problem to implement the alert in my extension.
1) patch is okay,
2) extension stub work nice,
3) i put this in my code (after sending email when user create or modify an entry in backend):

Administration::instance()->Page->pageAlert("Un message vient d'être envoyé aux administrateurs du site.",Alert::SUCCESS);

4) only the default alert appear on the page (edit backend page)...

if you know how i can implement this...

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details