Jump to content

display a custom message on registration


RRK

Recommended Posts

Posted

I want to display a custom message based on a database condition after success of registration, Where I can do this?

Requirements: If user coming from a specific url of website and complete the registration then user must have seen a custom message. Ex- You are now eligible for XXXXXXXX.

Please help me

Posted
  1. Firstly, you'd need a way to identify when the user comes from the specific URL. This may be best implemented as a plugin on your registration form that tracks the HTTP_REFERER header so you know where the user is coming from, or you may want to do it in javascript if that's easiest for you.
  2. Upon successful registration, you would then check the URL you earlier tracked, and if it matches you would show the message.

 

I'm not sure which part you are asking for help with. If you are not familiar with coding, you may need to contract a developer to help build this. If you are familiar, let us know which bits you are trying to work on.

Posted
On 1/24/2020 at 7:26 PM, bfarber said:
  1. Firstly, you'd need a way to identify when the user comes from the specific URL. This may be best implemented as a plugin on your registration form that tracks the HTTP_REFERER header so you know where the user is coming from, or you may want to do it in javascript if that's easiest for you.
  2. Upon successful registration, you would then check the URL you earlier tracked, and if it matches you would show the message.

 

I'm not sure which part you are asking for help with. If you are not familiar with coding, you may need to contract a developer to help build this. If you are familiar, let us know which bits you are trying to work on.

Thanks or your reply, Yes I know coding but I am new to IPS  forum coding structure. I will try with javascript first for referer url . I have issue issue with message that need to be display after success of registration. It would be very helpful i you can tell me where to code for this message in forum.

Posted
<div class='ipsMessage ipsMessage_info'>Your message here</div>

If you are going the javascript route, you can simply insert this HTML where-ever in the DOM you want. Note that there are other ipsMessage_* classes if they're more appropriate for your purposes (error and warning stand out).

Posted
18 hours ago, bfarber said:

<div class='ipsMessage ipsMessage_info'>Your message here</div>

If you are going the javascript route, you can simply insert this HTML where-ever in the DOM you want. Note that there are other ipsMessage_* classes if they're more appropriate for your purposes (error and warning stand out).

ok thanks, I will try

Posted
On 1/28/2020 at 7:16 PM, RRK said:

ok thanks, I will try

Can you tell me where is the forum registration code file so that i can put my code there.

Posted

Are you talking about for javascript? If so, javascript is dynamically compiled and cached with a random hashed extension, so you won't be able to actually just go in and edit our javascript files. You'll need to add inline script code into your templates, or write a plugin to add a new js file.

Posted
On 2/1/2020 at 3:01 AM, bfarber said:

Are you talking about for javascript? If so, javascript is dynamically compiled and cached with a random hashed extension, so you won't be able to actually just go in and edit our javascript files. You'll need to add inline script code into your templates, or write a plugin to add a new js file.

yes, i am talking about javascript. and i am not aware much about forum file structure so not sure where the template file for registration. I can see a lot of file in admin panel of theme template and we also have option to edit those but did not ind the particular file for registration inside the template.

Posted

As I mentioned, you cannot just edit our javascript code. It is actually stored in the database (in core_javascript), and then compiled into files that are built. These files can be deleted and rebuilt at any time, and the code in the database will be updated anytime an upgrade is ran.

What you will want to do is create a new plugin, and add a new javascript file in your plugin. You will likely want to create a mixin javascript file for your purpose.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...