Hi everyone,
I haven't seen this posted up here before. I thought this might come in useful to other rescue users. I am a wordpress junky, i find it to be a nice and easy way to start up a website and I use it on all of my web programing.
So let me get down to it... What I have done is create an extremely simple PHP script to integrate my wordpress sign-ons with the Channel "Custom Live Support Form". To do this, I needed a platform to inject my PHP without disturbing the rest of my functions of the site. I used a plug in called Shortcode Exec PHP that is available for download on wordpress.org.
The following code gets information if the user is logged in; if not, it shows the input box so the "guest user cantype in their information. In order to increase business, I didn't want to stop people from being able to connect if they didn't have an account on the website.
global $current_user;
get_currentuserinfo(); ?>
<div class="wrapper">
<form class="form2" name="CHANNEL_ID_HERE" action="https://secure.logmeinrescue.com/Customer/Download.aspx" method="post">
<div class="formtitle">Get Help</div>
<?php if ( is_user_logged_in() ) {?>
<input name="name" type="hidden" value="<?php echo $current_user->user_firstname . "\n"; ?>"/>
<input name="comment1" type="hidden" value="<?php echo $current_user->user_lastname . "\n"; ?>"/>
<input name="comment2" type="hidden" value="<?php echo $current_user->user_email . "\n"; ?>"/>
<div class="input" id="in1">
<div class="inputtext">Company Name:</div><div class="inputcontent"><input type="text" name="comment3" maxlength="512" /></div>
</div>
<?php } else { ?>
<div class="input" id="in1">
<div class="inputtext">First Name:</div><div class="inputcontent"><input type="text" name="name" maxlength="512" /></div>
</div>
<div class="input" id="in1">
<div class="inputtext">Last Name:</div><div class="inputcontent"><input type="text" name="comment1" maxlength="512" /></div>
</div>
<div class="input" id="in1">
<div class="inputtext">E-Mail Address:</div><div class="inputcontent"><input type="text" name="comment2" maxlength="512" /></div>
</div>
<div class="input" id="in1">
<div class="inputtext">Company Name:</div><div class="inputcontent"><input type="text" name="comment3" maxlength="512" /></div>
</div>
<?php } ?>
<div class="buttons">
<input class="orangebutton" type="submit" value="Connect">
<input type="hidden" name="EntryID" value="CHANNEL_ID_HERE" />
<input type="hidden" name="tracking0" maxlength="64" />
<input type="hidden" name="language" maxlength="5" />
</div>
</form>
</div>
I named the Shortcode [getuser] and placed it on my support page but the code can be placed anywhere on the site... even a side bar! I added the CLASS and ID tags that you see in the code for customized CSS reasons but they are not important. (Also, I, had to change the form from <table> to <div>'s for CSS reasons, but that's another topic :smileywink:)
If you would like to see an example my site is http://www.rtct.net/support/
I hope this helps someone. I was looking high and low for a plugin before i just broke down and decided to code it in myself.
Good luck!