[SOLVED] Create an auto action for popup message to a user to update his Avatar if none uploaded on his profile.

8 years 4 months ago #274705 by nant

pranaydhruv wrote: Dear Nick,

That resolves all issues with this function.




Thanks
Pranay


Great!

Would love if you could post back a summary of what you were trying to achieve and how you did it so others may benefit.
The topic has been locked.
8 years 4 months ago #274714 by pranaydhruv
Dear Nick,

Sure , summary as requested :-

what i wanted

if any user doesn't update an avatar to his profile then he should get an intimation when he logs in to his profile. this intimation should be a popup with an image that tells him the advantages of uploading his profile picture or avatar. and would have 2 buttons ,

button 1 - which says not now and skips that page to the users default page (his profile page)

button 2 - which says upload photo now , and which takes him to the edit profile page and specifically to the Portrait tab where he just needs to upload his image.


How i did it

i first created an auto action for Re-direct

trigger - onafterlogin
condition - [avatar]isregex /nophoto_n|tnnophoto_n.png/
action - Joomla Article url

I tried the Javascript Popup as well but that came out very standard and adding CSS was a pain , which is quite easy to an article and i can run the JS out of the article too.

to the article i added some HTML, JS and CSS and added a backgroung picture with the advantages on top i added the 2 buttons.

In the end it came out much better than a normal popup i was thinking in the begining, now i might add some animation of sliding etc when i have some more time, but for now it works perfect.



Thanks
Pranay
The topic has been locked.
8 years 4 months ago #274758 by nant
The topic has been locked.
Moderators: beatnantkrileon
Time to create page: 0.176 seconds

Facebook Twitter LinkedIn