Skip to Content Skip to Menu

js on first login

10 years 8 months ago #240968 by thewebsurfer
js on first login was created by thewebsurfer
hi, there is a way to use some html/js code at first user login?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
10 years 8 months ago #240989 by krileon
Replied by krileon on topic js on first login
During login there is no output so your JS would never be added to the DOM so I doubt it'd do anything if you added it using CB Auto Actions. Code actions that execute PHP would work fine though. So would Request actions if you want to send an HTTP request.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

10 years 8 months ago - 10 years 8 months ago #240992 by thewebsurfer
Replied by thewebsurfer on topic js on first login
wait a minute, CB has in backend configuration the first login URL:
i could set index.php?option=com_comprofiler&Itemid=131&firstlogin=1
instead of index.php?option=com_comprofiler&Itemid=131
this should works right?

but pls you have to help me with the settings of a new autoaction code in php, i need to print some js code not just process php.

dont know if its clear: its just some php code beginning with if(isset($_GET))
Last edit: 10 years 8 months ago by thewebsurfer.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
10 years 8 months ago #241006 by krileon
Replied by krileon on topic js on first login
I don't understand what you're trying to do. Why do you need to append to the first login redirect? There's no need for auto actions for that though. Just edit the first time login redirect within CB > Configuration > Registration and add your variables to the URL as needed.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

10 years 8 months ago #241013 by thewebsurfer
Replied by thewebsurfer on topic js on first login

krileon wrote: I don't understand what you're trying to do.


sorry :cheer:
i tryng to make a quick js site tour
www.webresourcesdepot.com/11-awesome-jquery-site-tour-plugins-for-guiding-users-with-style/
for explaining to the user how their profile work
a variable in $_GET array could activate the tour, something like:
<?php if(isset($_GET)) echo "<script>StartTour();</script>"; ?>

i just figure it out where to place this code

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
10 years 8 months ago - 10 years 8 months ago #241018 by krileon
Replied by krileon on topic js on first login
First append your variable to the first time login redirect within CB > Configuration > Registration. Next you'll need to create a code action that acts on the profile display trigger with a conditional as follows.

Conditional: [get_firstlogin] Equal To 1

You can then use the JS or jQuery methods to add whatever code you like. Note when using either of those you provide raw JS/jQuery, you do not need script tags or anything (e.g. StartTour(); ).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 10 years 8 months ago by krileon.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum