Results 1 to 3 of 3

Thread: CPanel Plugin - Just a Link - But how to get Email Address?

  1. #1
    Registered User
    Join Date
    Apr 2012
    Posts
    2
    cPanel/WHM Access Level

    Root Administrator

    Default CPanel Plugin - Just a Link - But how to get Email Address?

    Hello fellow CPanel'ers, quick (and noobish) question.

    I wrote a plugin, which simply goes to a livephp page where I populate a text field with the user's email address. On submit it sends a GET to my server where I capture the email address and setup an account.

    I'm hoping to remove the livephp page and have the plugin just become a 'one click' that sends the GET email address to my page. Is that possible? The only way I see how is doing a location.href in the plugins javascript field when creating the plugin; if that is the case, is there a way to get the user's email address in the javascript?

    Thanks for any help or pointers you can give me.

  2. #2
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    570

    Default Re: CPanel Plugin - Just a Link - But how to get Email Address?

    unless you have a special Branding package, what you describe is not very doable.

    The cPanel interface is drawn using the Dynamic UI System, wish is kinda like a big hash table. When you register a cPanel Plugin, there's an 'include' of sorts created that extends the default 'hash table' to include a reference to your icon. These Dynamic UI entries are not very flexible. You'd have to fashion an entry with a very complex 'acontent' value that would retrieve the email address and submit it. I'm not even sure if it's technically possible for such a value entry to survive the Dynamic UI parser.

    The only other technical option I see left to achieve what you want is to have custom Branding too. With custom Branding you should be able to include custom JS code. Have the JS code alter the DOM so that there's a onclick event for the icon...you could use the Remote API to fetch the email when making the onclick event.

    All that said, I kinda scratching my head about the user experience that would come from your one-click scenario...firstly, would the user know that their email address was being transmitted? If that is not made clear prior to soliciting action, you could be walking a fine line with privacy concerns. Next, what happens when they click it? it just makes a JS call, but are they redirected to your site? how do they know that something was done...or when it's finished. What if they forget if they've clicked it before, what will happen when they click it more than once?

    ...My point is that while marketing research may say that more than one click causes N*10th number of users to become dis-interested, in IMO a minimum of two clicks is not too much to ask or expect. Having a navigation click to take them to a page that you have control over, it's content, etc provides you, the Business, the opportunity to assert your brand, services, and integrity.

    Best Regards,
    -DavidN
    David Neimeyer
    Integration Developer

    sdk.cpanel.net
    APIs: XML-API API1 & API2
    Check Out: Developer Downloads Integration Blog
    Need Support? Support Ticket Developer Forum Feature Requests

  3. #3
    Registered User
    Join Date
    Apr 2012
    Posts
    2
    cPanel/WHM Access Level

    Root Administrator

    Default Re: CPanel Plugin - Just a Link - But how to get Email Address?

    Thank you very much for the response, truly helpful.

    OK, I'll have to re-work some of this, again - thank you!

Similar Threads

  1. [HOW TO] Unregister a cPanel Plugin WITHOUT the plugin file
    By lakotahosting in forum Workarounds
    Replies: 0
    Last Post: 02-21-2012, 11:54 AM
  2. Automatic cPanel backup sent to Email address.
    By loki8 in forum New User Questions
    Replies: 3
    Last Post: 06-13-2011, 11:16 AM
  3. Replies: 1
    Last Post: 02-11-2011, 04:55 PM
  4. Replies: 24
    Last Post: 11-23-2010, 07:44 PM
  5. Default address option removed but link still visable..
    By 10101 in forum cPanel & WHM Discussions
    Replies: 8
    Last Post: 05-06-2008, 02:02 PM