Exemple #1
0
 function jsdetect()
 {
     $facebookconnected = $twitterconnected = 0;
     if (isFacebookLogin()) {
         $facebookconnected = 1;
     }
     if (isTwitterLogin()) {
         $twitterconnected = 1;
     }
     header("content-type:application/x-javascript");
     echo "var SYS_JS_SOCIAL = {};";
     echo "SYS_JS_SOCIAL.facebook = {$facebookconnected};";
     echo "SYS_JS_SOCIAL.twitter = {$twitterconnected};";
     echo "var USER_ID = " . getAccountUserId() . ";";
 }
Exemple #2
0
        ?>
                    <td>
                        <input type="checkbox" name="tt_lock_pet" id="tt_lock_pet" value="1" <?php 
        echo $timeline_setting->tt_lock_pet == 1 ? 'checked="checked"' : '';
        ?>
 /> 
                    </td>
                <?php 
    }
    ?>
            </tr>
            
            <tr>
                <td>Post rate video</td>
                 <?php 
    if (isFacebookLogin()) {
        ?>
                    <td>
                        <input type="checkbox" name="fb_rate_video" id="fb_rate_video" value="1" <?php 
        echo $timeline_setting->fb_rate_video == 1 ? 'checked="checked"' : '';
        ?>
 /> 
                    </td>
                <?php 
    }
    ?>
                 <?php 
    if (isTwitterLogin()) {
        ?>
                    <td>
                        <input type="checkbox" name="tt_rate_video" id="tt_rate_video" value="1" <?php 
 function postOnWall()
 {
     $message = $this->input->post('message');
     $userdataobj = getAccountUserDataObject();
     if (isFacebookLogin()) {
         $this->facebookconnect_io_m->postOnUserWall($userdataobj->id_user, $message, $message, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
     }
     if (isTwitterLogin()) {
         $this->twittermodel->postOnWall($message, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
     }
     echo json_encode(array('message' => 'Post on your wall successfully.'));
     exit;
 }
 function postItemOnFbTt($id_wall, $context = '')
 {
     $this->load->model('user/wall_m');
     $this->load->model('mod_io/timeline_setting_io_m');
     $timeline_setting = $this->timeline_setting_io_m->init(getAccountUserId());
     $sql = $this->wall_m->get_all_post($result = '', $friend = '', $city = '', $limit = '', $my_chat = "", $country = '', $id_wall);
     $walldataarr = $this->db->query($sql)->result();
     $walldata = $this->wall_m->commentAccordingType($walldataarr[0]);
     $walldata = stripAllLinks($walldata);
     $userdataobj = getAccountUserDataObject();
     if (isFacebookLogin()) {
         //$this->facebookmodel->postOnWall($walldata ,$walldata ,$url=$this->user_io_m->getInviteUrl($userdataobj->username));
         if ($context) {
             if ($context == TIMELINE_BACKSTAGE_PHOTO and $timeline_setting->fb_backstage_photo == 1) {
                 $this->facebookconnect_io_m->postOnUserWall($id_user = getAccountUserId(), $walldata, $walldata, $this->user_io_m->getInviteUrl($userdataobj->username));
                 debug('TIMELINE_BACKSTAGE_PHOTO post on FACEBOOK wall :' . $walldata);
             }
             if ($context == TIMELINE_AKSME_ANSWER and $timeline_setting->fb_askme_answer == 1) {
                 $this->facebookconnect_io_m->postOnUserWall($id_user = getAccountUserId(), $walldata, $walldata, $this->user_io_m->getInviteUrl($userdataobj->username));
                 debug('TIMELINE_AKSME_ANSWER post on FACEBOOK wall :' . $walldata);
             }
             if ($context == TIMELINE_STATUS_UPDATE and $timeline_setting->fb_status_update == 1) {
                 $this->facebookconnect_io_m->postOnUserWall($id_user = getAccountUserId(), $walldata, $walldata, $this->user_io_m->getInviteUrl($userdataobj->username));
                 debug('TIMELINE_STATUS_UPDATE post on FACEBOOK wall :' . $walldata);
             }
             if ($context == TIMELINE_BUY_PET and $timeline_setting->fb_buy_pet == 1) {
                 $this->facebookconnect_io_m->postOnUserWall($id_user = getAccountUserId(), $walldata, $walldata, $this->user_io_m->getInviteUrl($userdataobj->username));
                 debug('TIMELINE_BUY_PET post on FACEBOOK wall :' . $walldata);
             }
             if ($context == TIMELINE_LOCKPET and $timeline_setting->fb_lock_pet == 1) {
                 $this->facebookconnect_io_m->postOnUserWall($id_user = getAccountUserId(), $walldata, $walldata, $this->user_io_m->getInviteUrl($userdataobj->username));
                 debug('TIMELINE_LOCKPET post on FACEBOOK wall :' . $walldata);
             }
             if ($context == TIMELINE_RATE_VIDEO and $timeline_setting->fb_rate_video == 1) {
                 $this->facebookconnect_io_m->postOnUserWall($id_user = getAccountUserId(), $walldata, $walldata, $this->user_io_m->getInviteUrl($userdataobj->username));
                 debug('TIMELINE_RATE_VIDEO post on FACEBOOK wall :' . $walldata);
             }
         } else {
             $this->facebookconnect_io_m->postOnUserWall($id_user = getAccountUserId(), $walldata, $walldata, $this->user_io_m->getInviteUrl($userdataobj->username));
             debug(' post on FACEBOOK wall :' . $walldata);
         }
     }
     if (isTwitterLogin()) {
         if ($context) {
             if ($context == TIMELINE_BACKSTAGE_PHOTO and $timeline_setting->tt_backstage_photo == 1) {
                 $this->twittermodel->postOnWall($walldata, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
                 debug('TIMELINE_BACKSTAGE_PHOTO post on TWITTER wall :' . $walldata);
             }
             if ($context == TIMELINE_AKSME_ANSWER and $timeline_setting->tt_askme_answer == 1) {
                 $this->twittermodel->postOnWall($walldata, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
                 debug('TIMELINE_AKSME_ANSWER post on TWITTER wall :' . $walldata);
             }
             if ($context == TIMELINE_STATUS_UPDATE and $timeline_setting->tt_status_update == 1) {
                 $this->twittermodel->postOnWall($walldata, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
                 debug('TIMELINE_STATUS_UPDATE post on TWITTER wall :' . $walldata);
             }
             if ($context == TIMELINE_BUY_PET and $timeline_setting->tt_buy_pet == 1) {
                 $this->twittermodel->postOnWall($walldata, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
                 debug('TIMELINE_BUY_PET post on TWITTER wall :' . $walldata);
             }
             if ($context == TIMELINE_LOCKPET and $timeline_setting->tt_lock_pet == 1) {
                 $this->twittermodel->postOnWall($walldata, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
                 debug('TIMELINE_LOCKPET post on TWITTER wall :' . $walldata);
             }
             if ($context == TIMELINE_RATE_VIDEO and $timeline_setting->tt_rate_video == 1) {
                 $this->twittermodel->postOnWall($walldata, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
                 debug('TIMELINE_RATE_VIDEO post on TWITTER wall :' . $walldata);
             }
         } else {
             $this->twittermodel->postOnWall($walldata, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
             debug('post on TWITTER wall :' . $walldata);
         }
     }
 }