Hello! I just want to share a simple Skype "Add Contact" thing for Couchcms with Databound.

This you can use if you have a community site or what ever you like. I Using this right now for a community site I building, and is working great for all people that are writing on my website.


When they write down their "Skype account in that input field" can people add them instantly by clicking on the skype icon.



Code: Select all
<script type="text/javascript" src="http://www.skypeassets.com/i/scom/js/skype-uri.js"></script>
<div id="SkypeButton_Call_<cms:show skype />_1">
<script type="text/javascript">
Skype.ui({
"name": "chat",
"element": "SkypeButton_Call_<cms:show skype />_1",
"participants": ["<cms:show skype />"]
});
</script>


FULL CODE HERE:
Code: Select all
<?php require_once("couch/cms.php") ?>
<!DOCTYPE>
<html>
<head>
  <link rel="stylesheet" href="index.css" type="text/css" />
</head>
</html>
<cms:template title="skype" clonable="1">
<cms:editable name="skype" type="text" />
</cms:template>

<cms:set submit_success="<cms:get_flash 'submit_success' />" />
<cms:if submit_success >
    <h4>Success: Your application has been submitted.</h4>
</cms:if>

<div class="testform">

<cms:form
    masterpage=k_template_name
    mode='create'
    enctype='multipart/form-data'
    method='post'
    anchor='0'
    >

    <cms:if k_success >

      <cms:db_persist_form
          _invalidate_cache='0'
          _auto_title='1'
      />

      <cms:set_flash name='submit_success' value='1' />
      <cms:redirect k_page_link />

  </cms:if>

    <cms:if k_error >
        <div class="error">
            <cms:each k_error >
                <br><cms:show item />
            </cms:each>
        </div>
    </cms:if>

    <label>Skype Account:</label>
    <cms:input name="skype" type="bound" />
    <br />


    <cms:if "<cms:not submit_success />" >
        <button type="submit">Submit Application</button>
    </cms:if>

</cms:form>
</div>

<cms:pages masterpage="test.php">
<script type="text/javascript" src="http://www.skypeassets.com/i/scom/js/skype-uri.js"></script>
<div id="SkypeButton_Call_<cms:show skype />_1">
<script type="text/javascript">
Skype.ui({
"name": "chat",
"element": "SkypeButton_Call_<cms:show skype />_1",
"participants": ["<cms:show skype />"]
});
</script>
</div>

</cms:pages>
<?php COUCH::invoke(); ?>