Example #1
0
 $redirect_to = param('redirect_to', 'url', '');
 $post_id = NULL;
 $comment_id = param('comment_id', 'integer', 0);
 $BlogCache =& get_BlogCache();
 $Blog = $BlogCache->get_by_ID($blog_ID);
 locale_activate($Blog->get('locale'));
 if ($recipient_id > 0) {
     // Get identity link for existed users
     $RecipientCache =& get_UserCache();
     $Recipient = $RecipientCache->get_by_ID($recipient_id);
     $recipient_link = $Recipient->get_identity_link(array('link_text' => 'nickname'));
 } else {
     if ($comment_id > 0) {
         // Anonymous Users
         $gender_class = '';
         if (check_setting('gender_colored')) {
             // Set a gender class if the setting is ON
             $gender_class = ' nogender';
         }
         $recipient_link = '<span class="user anonymous' . $gender_class . '" rel="bubbletip_comment_' . $comment_id . '">' . $recipient_name . '</span>';
     }
 }
 $blog_skin_ID = $Blog->get_skin_ID();
 if (!empty($blog_skin_ID)) {
     // check if Blog skin has specific concact message form
     $SkinCache =& get_SkinCache();
     $Skin =& $SkinCache->get_by_ID($blog_skin_ID);
     $ads_current_skin_path = $skins_path . $Skin->folder . '/';
 }
 require skin_template_path('_contact_msg.form.php');
 break;
Example #2
0
 /**
  * Get the comment anonymous author's name with gender class.
  *
  * @param string format to display author
  * @param array Params
  * @return string
  */
 function get_author_name_anonymous($format = 'htmlbody', $params = array())
 {
     // Make sure we are not missing any param:
     $params = array_merge(array('before' => '', 'after' => ''), $params);
     $gender_class = '';
     if (check_setting('gender_colored')) {
         // Set a gender class if the setting is ON
         $gender_class = ' nogender';
     }
     $author_name = $this->dget('author', $format);
     $author_name = '<span class="user anonymous' . $gender_class . '" rel="bubbletip_comment_' . $this->ID . '">' . $params['before'] . $author_name . $params['after'] . '</span>';
     return $author_name;
 }
Example #3
0
/**
 * Registers headlines required to a bubbletip above user login.
 */
function init_bubbletip_js($relative_to = 'rsc_url')
{
    if (!check_setting('bubbletip')) {
        // If setting "bubbletip" is OFF for current case
        return;
    }
    require_js('#jquery#', $relative_to);
    // dependency
    require_js('jquery/jquery.bubbletip.min.js', $relative_to);
    require_js('bubbletip.js', $relative_to);
    require_css('jquery/bubbletip/bubbletip.css', $relative_to);
    add_headline('<!--[if IE]>');
    require_css('jquery/bubbletip/bubbletip-IE.css', $relative_to);
    add_headline('<![endif]-->');
}
Example #4
0
 /**
  * Get the comment anonymous author's name with gender class.
  *
  * @param string format to display author
  * @param array Params
  * @return string
  */
 function get_author_name_anonymous($format = 'htmlbody', $params = array())
 {
     // Make sure we are not missing any param:
     $params = array_merge(array('before' => '', 'after' => '', 'rel' => NULL), $params);
     $gender_class = '';
     if (check_setting('gender_colored')) {
         // Set a gender class if the setting is ON
         $gender_class = ' nogender';
     }
     $author_name = $this->dget('author', $format);
     if (is_null($params['rel'])) {
         // Set default rel:
         $params['rel'] = 'bubbletip_comment_' . $this->ID;
     }
     if (!empty($params['rel'])) {
         // Initialize attribure "rel"
         $params['rel'] = ' rel="' . $params['rel'] . '"';
     }
     $author_name = '<span class="user anonymous' . $gender_class . '"' . $params['rel'] . '>' . $params['before'] . $author_name . $params['after'] . '</span>';
     return $author_name;
 }
Example #5
0
 /**
  * Return attr class depending on gender of the user
  */
 function get_gender_class()
 {
     $gender_class = 'user';
     if ($this->check_status('is_closed')) {
         // Set different gender color if user is closed
         return 'user closed';
     }
     if (!check_setting('gender_colored')) {
         // Don't set gender color if setting is OFF
         return $gender_class;
     }
     switch ($this->gender) {
         // Set a class name for each gender type
         case 'M':
             $gender_class .= ' man';
             break;
         case 'F':
             $gender_class .= ' woman';
             break;
         default:
             $gender_class .= ' nogender';
             break;
     }
     return $gender_class;
 }
Example #6
0
     foreach ($stocks as $stock) {
         $stock->stockUpdate();
     }
     StockHolder::updateLeaderBoard();
     /*
      * TODO : update stocks bought by each company now
      * right now it gets updated in stock update only when no news or override is present!
      */
     unset($news);
     unset($stock);
     unset($stocks);
     /*
      *Check to see if the end of script execution is demanded
      */
     usleep(100000);
     check_setting();
     if ($script_r == 1) {
         continue;
     } else {
         break;
     }
 }
 //end while
 /*
  * Script end starts here where the script has to 
  * close all day_closings!! direct function in stockhistory
  * also update StockCompany - dayclose = cur price and dayopen = cur price as well!
  */
 $histories = array();
 $companies = array();
 $controls = array();
Example #7
0
/**
 * Registers headlines required to a bubbletip above user login.
 *
 * @param string alias, url or filename (relative to rsc/css, rsc/js) for JS/CSS files
 * @param string Library: 'bubbletip', 'popover'
 */
function init_bubbletip_js($relative_to = 'rsc_url', $library = 'bubbletip')
{
    if (!check_setting('bubbletip')) {
        // If setting "bubbletip" is OFF for current case
        return;
    }
    require_js('#jquery#', $relative_to);
    switch ($library) {
        case 'popover':
            // Use popover library of bootstrap
            require_js('build/popover.bmin.js', $relative_to, true);
            break;
        case 'bubbletip':
        default:
            // Use bubbletip plugin of jQuery
            require_js('jquery/jquery.bubbletip.min.js', $relative_to);
            require_js('build/bubbletip.bmin.js', $relative_to, true);
            require_css('jquery/jquery.bubbletip.css', $relative_to);
            break;
    }
}