1. Гость, мы просим Вас ознакомиться с Правилами Форума и Отказом от ответственности!

Результаты поиска

  1. mr.Slink
  2. mr.Slink
  3. mr.Slink
  4. mr.Slink
    основа этого личного кабинета, полагаю сделана на php? в любом случае, думаю у тебя товар берется из базы mysql, так что тебе мешает сделать 2-ю переменную суммы товара (вторую) , назовем её TovSum т.е. переменная будет подсчитывать "какова сумма, если добавить в корзину". например: у тебя клиент взял товар на сумму 24руб, до лимита у него остается ещё 1 руб. он клацает по товару, который стоит 1руб, TovSum = 25, значит разрешает добавлять, иначе - лесом. Да там просто проверки надо ставить. Самая главная есть ли у перса столько денег для покупки. А потом при нажатии купить, скрипт считает сколько галок стоит в чекбоксах и минусует лк. На самом деле несколько строчек скрипта. И в топку джиквери с аяксом. Да с этим мне уже помогли. Осталось решить проблему отправки данных на сервер чтобы потом с помощью $_POST сделать запись в базу данных.
    Сообщение от: mr.Slink, 24 окт 2012 в разделе: Javascript и JQuery
  5. mr.Slink
  6. mr.Slink
  7. mr.Slink
    Требуется ваша помощь. Нужен скрипт. И так. Я делаю небольшой "магазин". Необходимо чтобы человек не смог купить на сумму более 25 рублей. Товары на сайте выбираются по checkbox ам. Пример: Товар #1 - 15руб | Товар #2 - 15руб | Товар #3 - 15руб | Товар #4 - 15руб | Товар #5 - 15руб | Товар #6 - 15руб | Товар #7 - 10руб | Товар #8 - 10руб | Товар #9 - 10руб | Товар #10 - 5руб | Товар #11 - 5руб | Товар #12 - 5руб | Код должен запретить пользователю выбрать товаров на сумму больше 25 рублей. При этом есть select, в котором есть выбор максимальной суммы... и последнее без лимита <div id=content> <form> <input name="15" type="checkbox">15 рублей</input> <input name="15" type="checkbox">15 рублей</input> <input name="15" type="checkbox">15 рублей</input> <input name="15" type="checkbox">15 рублей</input> <input name="15" type="checkbox">15 рублей</input> <input name="10" type="checkbox">10 рублей</input> <input name="10" type="checkbox">10 рублей</input> <input name="10" type="checkbox">10 рублей</input> <input name="10" type="checkbox">10 рублей</input> <input name="10" type="checkbox">10 рублей</input> <input name="10" type="checkbox">10 рублей</input> <input name="5" type="checkbox">5 рублей</input> <input name="5" type="checkbox">5 рублей</input> <input name="5" type="checkbox">5 рублей</input> <input name="5" type="checkbox">5 рублей</input> <input name="5" type="checkbox">5 рублей</input> </form> <select> <option value="25">25</option> <option value="50">50</option> <option value="75">75</option> <option value="unlim">Неогр</option> </select> </div> На другом сайте дали такой вариант: <script type="text/javascript"> $(document).ready(function() { var cnt = 0; $("#content > input:checkbox:checked").each(function(){ cnt++; }) var allCheckboxes = $("#content input:checkbox"); $("#content > input").change(function(){ if(this.checked) {cnt++;} else{cnt -= 1 ;} if(cnt >= 3){ var notChecked = allCheckboxes.not(':checked'); $("#content > input:checkbox:checked").each(function(){ $(notChecked).attr('disabled',true); }) } else{ $("#content > input:checkbox:checked").each(function(){ $(allCheckboxes).attr('disabled',false); }) } $("#images").text(cnt); }) }); </script> <div id=content> <input name="cb[]" type="checkbox">15 рублей</input> <input name="cb[]" type="checkbox">15 рублей</input> <input name="cb[]" type="checkbox">15 рублей</input> <input name="cb[]" type="checkbox">15 рублей</input> <input name="cb[]" type="checkbox">15 рублей</input> <input name="cb[]" type="checkbox">10 рублей</input> <input name="cb[]" type="checkbox">10 рублей</input> <input name="cb[]" type="checkbox">10 рублей</input> <input name="cb[]" type="checkbox">10 рублей</input> <input name="cb[]" type="checkbox">10 рублей</input> <input name="cb[]" type="checkbox">10 рублей</input> <input name="cb[]" type="checkbox">10 рублей</input> <input name="cb[]" type="checkbox">5 рублей</input> <input name="cb[]" type="checkbox">5 рублей</input> <input name="cb[]" type="checkbox">5 рублей</input> <input name="cb[]" type="checkbox">5 рублей</input> </div> Но он подсчитывает количество нажатых checkboxов а не стоимость
    Автор темы: mr.Slink, 23 окт 2012, ответов - 16, в разделе: Javascript и JQuery
  8. mr.Slink
    Сообщение

    Мне нравится

    Наткнулся в инете на обычный хайд, можно его изменить admin\sources\classes\bbcode\custom\tbHideContent.php <?php /** * (TB) Hide Content * @file tbHideContent.php BBcode custom plugin * * @copyright (c) 2006 - 2012 Invision Byte * @link http://www.invisionbyte.net/ * @author Terabyte * @since 01/07/2009 * @updated 21/07/2011 * @version 3.0.4 (30004) */ /* Load the parent class if it is not available at this point */ if( !class_exists('bbcode_parent_class') ) { require_once( IPS_ROOT_PATH.'sources/classes/bbcode/custom/defaults.php'); } /** * * @class bbcode_hide * @brief BBcode custom plugin */ class bbcode_hide extends bbcode_parent_class implements bbcodePlugin { /** * Topic Data * * @var $topic */ private $topic; /** * Can bypass the check or not * * @var $bypass */ private $bypass = FALSE; /** * Constructor * * @param object $registry Registry object * @param object $_parent Parent bbcode class * @return @e void */ public function __construct( ipsRegistry $registry, $_parent=null ) { $this->currentBbcode = 'hide'; parent::__construct( $registry, $_parent ); if ( $_parent->parsing_section != 'topics' ) { $this->topic = array( 'tid' => 0 ); } /* Init our code */ $this->cache->updateCacheWithoutSaving( '_tmp_bbcode_hide', array() ); /* Can bypass the check? */ $this->settings['tb_hc_groups'] = IPSText::cleanPermString( trim($this->settings['tb_hc_groups']) ); $this->settings['tb_hc_members'] = IPSText::cleanPermString( trim($this->settings['tb_hc_members']) ); if ( $this->settings['tb_hc_groups'] != '' && in_array( $this->memberData['member_group_id'], explode(",", $this->settings['tb_hc_groups']) ) ) { $this->bypass = TRUE; } elseif ( $this->memberData['member_id'] > 0 && $this->settings['tb_hc_members'] != '' && in_array( $this->memberData['member_id'], array_map( 'trim', explode(",", $this->settings['tb_hc_members']) ) ) ) { $this->bypass = TRUE; } ipsRegistry::getAppClass('forums'); } /** * Method that is run before the content is stored in the database * You are responsible for ensuring you mark the replaced text appropriately so that you * are able to unparse it, if you wish to have bbcode parsed on save * * @param string $txt BBCode text from submission to be stored in database * @return @e string Formatted content, ready for display */ public function preDbParse( $txt ) { return parent::preDbParse( $txt ); } /** * Method that is run before the content is displayed to the user * This is the safest method of parsing, as the original submitted text is left in tact. * No markers are necessary if you use parse on display. * * @param string $txt BBCode/parsed text from database to be displayed * @return @e string Formatted content, ready for display */ public function preDisplayParse( $txt ) { return parent::preDisplayParse( $txt ); } /** * Setup the topic ID * * @return @e boolean Returns FALSE if check fails otherwise returns true */ private function _setupTopic() { // Topic is already setup? if ( !isset($this->topic['tid']) ) { if ( $this->cache->exists('tb_hide_topic') && !empty($this->caches['tb_hide_topic']['tid']) ) { $this->topic = $this->cache->getCache('tb_hide_topic', false); $this->cache->updateCacheWithoutSaving( 'tb_hide_topic', array() ); } elseif ( isset($this->registry->class_forums->topic_cache['tid']) && $this->registry->class_forums->topic_cache['tid'] ) { $this->topic['tid'] = $this->registry->class_forums->topic_cache['tid']; $this->topic['starter_id'] = $this->registry->class_forums->topic_cache['starter_id']; $this->topic['last_poster_id'] = $this->registry->class_forums->topic_cache['last_poster_id']; } else { /* If we are here we are not parsing a topic or something is wrong :| */ $this->topic = array( 'tid' => 0 ); } } return TRUE; } /** * Do the actual replacement * * @param string $txt Parsed text from database to be edited * @return @e string BBCode content, ready for editing */ protected function _replaceText( $txt ) { # Setup the topic $this->_setupTopic(); //----------------------------------------- // Get all our aliases :| //----------------------------------------- $_tags = $this->_retrieveTags(); foreach( $_tags as $_tag ) { //----------------------------------------- // Start building open/close tag //----------------------------------------- $open_tag = '[' . $_tag . ']'; $close_tag = '[/' . $_tag . ']'; /* Infinite loop catcher */ $_iteration = 0; //----------------------------------------- // Doz I can haz opin tag? Loopy loo //----------------------------------------- while( ( $this->cur_pos = stripos( $txt, $open_tag, $this->cur_pos ) ) !== false ) { /* Stop infinite loops */ if( $_iteration > $this->settings['max_bbcodes_per_post'] ) { break; } $_iteration++; /* Grab the new position to jump to */ $new_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1; /* No closing tag */ if( stripos( $txt, $close_tag, $new_pos ) === false ) { break; } /* Different topic ID? */ if ( isset($this->caches['tb_hide_topic']['tid']) && $this->topic['tid'] != $this->caches['tb_hide_topic']['tid'] ) { $this->topic = $this->cache->getCache('tb_hide_topic', false); } // Init cache things =O $existing = $this->cache->getCache('_tmp_bbcode_hide', false); if( !isset($existing[ $this->topic['tid'] ])) { $existing[ $this->topic['tid'] ] = false; # Bypass if ( $this->bypass ) { $existing[ $this->topic['tid'] ] = true; } # Topic starter/Last Poster elseif ( $this->memberData['member_id'] ) { if ( $this->topic['starter_id'] == $this->memberData['member_id'] || $this->topic['last_poster_id'] == $this->memberData['member_id'] ) { $existing[ $this->topic['tid'] ] = true; } # Get from DB elseif ( $this->topic['tid'] > 0 ) { $hideCheck = $this->DB->buildAndFetch( array( 'select' => 'pid', 'from' => 'posts', 'where' => 'topic_id=' . $this->topic['tid'] . ' AND author_id=' . $this->memberData['member_id'] . ' AND ' . $this->registry->class_forums->fetchPostHiddenQuery('visible'), 'limit' => array( 0, 1 ) ) ); $existing[ $this->topic['tid'] ] = ( intval($hideCheck['pid']) > 0 ) ? true : false; } } /* Update our cache */ $this->cache->updateCacheWithoutSaving( '_tmp_bbcode_hide', $existing ); } /* Grab content */ $_content = substr( $txt, ($this->cur_pos + strlen($open_tag)), (stripos( $txt, $close_tag, $this->cur_pos ) - ($this->cur_pos + strlen($open_tag))) ); /* Replace time */ if( $_content ) { $txt = substr_replace( $txt, $this->_buildOutput( $_content, $existing[ $this->topic['tid'] ] ), $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) ); } else { $txt = substr_replace( $txt, '', $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) ); } /* Reset current position */ $this->cur_pos = stripos( $txt, $open_tag ) ? stripos( $txt, $open_tag ) : $this->cur_pos + 1; if( $this->cur_pos > strlen($txt) ) { $this->cur_pos = 0; break; } } } return $txt; } /** * Build the actual output to show * * @param string $content This is the contents of the quote * @param bool $hasReplied TRUE if the member has replied to the topic or can bypass * @return @e string Content to replace bbcode with */ private function _buildOutput( $content, $hasReplied=false ) { //----------------------------------------- // Build output and return it //----------------------------------------- $output = '<!--TB_HIDE_CONTENT-->'; /* Init our state, yay! */ $hideState = $this->cache->getCache( 'tb_hide_topicState', false ); $hideState = is_array($hideState) ? $hideState : array(); /* Has replied to the topic already? */ if ( $hasReplied ) { $hideState[ $this->topic['tid'] ] = true; $output .= $this->registry->getClass('output')->getTemplate('post')->tbUnhiddenContent( $content ); } else { $hideState[ $this->topic['tid'] ] = false; /* Sort if we have attachments to remove.. */ if ( stripos( $content, '[attachment=' ) !== FALSE ) { preg_match_all( "#\[attachment=(\d+?)\:(?:[^\]]+?)\]#is", $content, $match ); if ( is_array($match[0]) and count($match[0]) ) { /* No cache setup yet? */ if ( $this->cache->exists('tb_hide_attachs') ) { $_currentAttachs = $this->cache->getCache('tb_hide_attachs', false); } else { $_currentAttachs = array(); } /* Cycle through attachments */ for ( $i = 0 ; $i < count($match[0]) ; $i++ ) { if ( intval($match[1][$i]) == $match[1][$i] ) { $_currentAttachs[ $match[1][$i] ] = $match[1][$i]; } } $this->cache->updateCacheWithoutSaving( 'tb_hide_attachs' , $_currentAttachs ); } } /* ..and take care of the output */ $output .= $this->registry->getClass('output')->getTemplate('post')->tbHiddenContent(); } /* Save our topic status, yup save it here! */ $this->cache->updateCacheWithoutSaving( 'tb_hide_topicState', $hideState ); return $output; } } admin\sources\classes\bbcode\class_tbHideContent.php <?php /** * (TB) Hide Content * @file class_tbHideContent.php Hide content main functions * * @copyright (c) 2006 - 2012 Invision Byte * @link http://www.invisionbyte.net/ * @author Terabyte * @since 01/07/2009 * @updated 21/07/2011 * @version 3.0.4 (30004) */ /** * * @class TBHideContent * @brief Hide content main functions */ class TBHideContent { /** * Flag to check for initialization * * @var $initialized */ private static $initialized = false; /** * Flag to keep track if the post contains hide tags * * @var $_hasHide */ private static $_hasHide = false; /** * Array data for group or member bypass? * * @var $_bypass */ private static $_bypass = array( 'groups' => array(), 'members' => array() ); /** * Array with all the hide tags used (hide+aliases) * * @var $_hideTags */ private static $_hideTags = array(); /** * Keep track of what settings are linked to which key * * @var $_post */ private static $_post = array( 'original' => '', 'parsed' => '', 'removed' => '' ); /** * Check is the variables are already initialized * * @return @e bool TRUE if initialized, otherwise FALSE */ static public function isInitialized() { return self::$initialized === TRUE ? TRUE : FALSE; } /** * Initializes the class: bypass settings and other things * * @return @e void * @todo Initialize here the tags too? */ static public function init() { if ( !self::isInitialized() ) { ipsRegistry::getAppClass('forums'); if ( ipsRegistry::$settings['tb_hc_groups'] ) { self::$_bypass['groups'] = explode(",", ipsRegistry::$settings['tb_hc_groups']); } if ( ipsRegistry::$settings['tb_hc_members'] ) { self::$_bypass['members'] = explode(",", ipsRegistry::$settings['tb_hc_members']); } /* Yeah, initialized now! */ self::$initialized = TRUE; } } /** * Retrieves all the tags used to hide content on the board * * @return @e array All the tags retrieved, 'hide' included */ static public function _getAllTags() { /* Haven't parsed the tags yet? */ if ( !count(self::$_hideTags) ) { /* Still here? Parse them ;) */ self::$_hideTags[] = 'hide'; #Main tag /* Now let's sort the aliases... */ $bbcodes = ipsRegistry::cache()->getCache('bbcode'); if( $bbcode['hide']['bbcode_aliases'] ) { $aliases = explode( ',', trim($bbcode['hide']['bbcode_aliases']) ); if( is_array($aliases) && count($aliases) ) { foreach( $aliases as $alias ) { $alias = trim($alias); if ( $alias ) { self::$_hideTags[] = $alias; } } } } } return self::$_hideTags; } /** * Remove all "type" data from the cache * * @param string $post Post content * @return @e bool TRUE if hidden content is found otherwise FALSE */ static public function checkPostContent( $post='' ) { self::init(); /* Store original */ self::$_post['original'] = $post; self::$_post['parsed'] = $post; self::$_post['removed'] = $post; /* Reset hasHide just in case.. */ self::$_hasHide = false; /* Check if we got our language strings.. */ if ( empty(ipsRegistry::getClass('class_localization')->words['tb_hc_unhidden_msg']) ) { ipsRegistry::getClass('class_localization')->loadLanguageFile( array('public_post'), 'forums' ); } /* Do we have any tag available? */ foreach( self::_getAllTags() as $tag ) { /* Search for the end tag as it is likely to have only the starting one more */ if ( stripos( $post, '[/'.$tag.']' ) !== false ) { self::$_post['parsed'] = preg_replace( '#\['.$tag.'\](.+?)\[/'.$tag.'\]#is', "<br />".ipsRegistry::getClass('class_localization')->words['tb_hc_unhidden_msg']."<br />\\1", self::$_post['parsed'] ); self::$_post['removed'] = preg_replace( '#\['.$tag.'\](.+?)\[/'.$tag.'\]#is', "<br />".ipsRegistry::getClass('class_localization')->words['tb_hc_hidden_msg']."<br />", self::$_post['removed'] ); self::$_hasHide = true; } } return self::$_hasHide; } /** * Gets the content for the email notification * based on the parsed post (original|parsed|removed) * * @param integer $group Group ID * @param integer $mid Member ID * @param integer $tid Topic ID * @param integer $starter Topic starter ID * @param integer $last Topic last poster ID * @return @e string Parsed post content */ static public function getEmailNotification( $group=0, $mid=0, $tid=0, $starter=0, $last=0 ) { /* Not initialized yet? */ if ( !self::isInitialized() ) { /** * We should never see this error but added it * in case a third party mods calls it improperly */ throw new Exception( 'TB_HC_NOT_INITIALIZED' ); } /* Has hidden content? */ if ( self::$_hasHide ) { /* Show the parsed one? */ if ( $group && in_array( $group, self::$_bypass['groups'] ) ) { return self::$_post['parsed']; } elseif ( $mid ) { if ( $starter && $starter == $mid ) { return self::$_post['parsed']; } elseif ( $last && $last == $mid ) { return self::$_post['parsed']; } elseif ( in_array( $mid, self::$_bypass['members'] ) ) { return self::$_post['parsed']; } elseif ( $tid ) { /* Fallback on the query if we have both topic and member IDs */ $hideCheck = ipsRegistry::DB()->buildAndFetch( array( 'select' => 'pid', 'from' => 'posts', 'where' => 'topic_id=' . $tid . ' AND author_id=' . $mid . ' AND ' . ipsRegistry::getClass('class_forums')->fetchPostHiddenQuery('visible'), 'limit' => array( 0, 1 ) ) ); if ( intval($hideCheck['pid']) > 0 ) { return self::$_post['parsed']; } } } /* Fallback on removed */ return self::$_post['removed']; } else { return self::$_post['original']; } } /** * Checks if we are allowed to see the hidden content * or not in a specific topic * * @param string $post Post content * @param array $topic Topic Data * @return @e string Parsed post content */ static public function checkPostForReply( $post='', $topic=array() ) { if ( $post != '' ) { self::init(); /* Init vars */ $removeHide = true; $memberID = ipsRegistry::member()->getProperty('member_id'); /* Check for bypass */ if ( in_array( ipsRegistry::member()->getProperty('member_group_id'), self::$_bypass['groups'] ) ) { $removeHide = false; } elseif ( $memberID ) { if ( in_array( $memberID, self::$_bypass['members'] ) || $topic['starter_id'] == $memberID || $topic['last_poster_id'] == $memberID ) { $removeHide = false; } elseif( $topic['tid'] > 0 ) { $tmp = ipsRegistry::DB()->buildAndFetch( array( 'select' => 'pid', 'from' => 'posts', 'where' => 'topic_id=' . $topic['tid'] . ' AND author_id=' . $memberID . ' AND ' . ipsRegistry::getClass('class_forums')->fetchPostHiddenQuery('visible'), 'limit' => array( 0, 1 ) ) ); $removeHide = ( intval($tmp['found']) > 0 ) ? false : true; } } if ( $removeHide ) { foreach( self::_getAllTags() as $tag ) { $post = preg_replace( '#\['.$tag.'\](.+?)\[/'.$tag.'\]#is', '', $post ); } } } return $post; } } и xml <?xml version="1.0" encoding="utf-8"?> <hookexport> <hookdata> <config> <hook_name>(TB) Hide Content</hook_name> <hook_desc>Allows members to post hidden content in their posts and others must reply to see the content.</hook_desc> <hook_author>Terabyte</hook_author> <hook_email/> <hook_website/> <hook_update_check/> <hook_requirements><![CDATA[a:3:{s:21:"required_applications";a:1:{s:4:"core";a:3:{s:8:"app_name";s:6:"System";s:11:"min_version";i:32003;s:11:"max_version";i:0;}}s:20:"hook_php_version_min";s:0:"";s:20:"hook_php_version_max";s:0:"";}]]></hook_requirements> <hook_version_human>3.0.4</hook_version_human> <hook_version_long>30004</hook_version_long> <hook_extra_data><![CDATA[a:5:{s:9:"templates";a:2:{s:9:"skin_post";a:2:{i:0;s:15:"tbHiddenContent";i:1;s:17:"tbUnhiddenContent";}s:10:"skin_topic";a:1:{i:0;s:26:"tbHiddenContentDisableAjax";}}s:7:"display";a:4:{s:9:"templates";s:99:"From skin_post: tbHiddenContent, tbUnhiddenContent<br />From skin_topic: tbHiddenContentDisableAjax";s:6:"custom";s:30:"install_tbHideContentSetup.php";s:8:"settings";s:33:"Setting groups: (TB) Hide Content";s:8:"language";s:132:"From core_public_global: tb_hc_bbcode_content, tb_hc_bbcode_title<br />From forums_public_post: tb_hc_hidden_msg, tb_hc_unhidden_msg";}s:6:"custom";s:22:"tbHideContentSetup.php";s:13:"settingGroups";a:1:{s:0:"";s:5:"tb_hc";}s:8:"language";a:2:{s:18:"core_public_global";a:2:{s:0:"";s:20:"tb_hc_bbcode_content";i:1;s:18:"tb_hc_bbcode_title";}s:18:"forums_public_post";a:2:{s:0:"";s:16:"tb_hc_hidden_msg";i:1;s:18:"tb_hc_unhidden_msg";}}}]]></hook_extra_data> <hook_key>tb_hc</hook_key> <hook_global_caches/> </config> </hookdata> <hookfiles> <file> <hook_file_real>tbHideContentAjaxTopics.php</hook_file_real> <hook_type>commandHooks</hook_type> <hook_classname>tbHideContentAjaxTopics</hook_classname> <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:25:"public_forums_ajax_topics";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data> <hooks_source><![CDATA[<?php /** * (TB) Hide Content * @file tbHideContentAjaxTopics.php Action overloader (public_forums_ajax_topics) * * @copyright (c) 2006 - 2012 Invision Byte * @link http://www.invisionbyte.net/ * @author Terabyte * @since 20/07/2011 * @version 3.0.4 (30004) */ class tbHideContentAjaxTopics extends (~extends~) { protected function _quote() { $this->cache->updateCacheWithoutSaving( 'tb_hide_force', 'ajaxQuote' ); return parent::_quote(); } }]]></hooks_source> </file> <file> <hook_file_real>tbHideContentHanEmail.php</hook_file_real> <hook_type>libraryHooks</hook_type> <hook_classname>tbHideContentHanEmail</hook_classname> <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:4:"core";s:15:"classToOverload";s:8:"hanEmail";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data> <hooks_source><![CDATA[<?php /** * (TB) Hide Content * @file tbHideContentHanEmail.php Library hook (hanEmail) * * @copyright (c) 2006 - 2012 Invision Byte * @link http://www.invisionbyte.net/ * @author Terabyte * @since 22/07/2011 * @updated 17/10/2011 * @version 3.0.4 (30004) */ class tbHideContentHanEmail extends (~extends~) { public function buildMessage( $words, $noClean=false, $rawHtml=FALSE ) { if ( !empty($words['POST']) ) { $hideData = ipsRegistry::cache()->getCache( 'tb_hide_emailNotify', false ); if ( is_array($hideData) && count($hideData) ) { $words['POST'] = TBHideContent::getEmailNotification( $hideData['member_group_id'], $hideData['member_id'], $hideData['topic_id'] ); ipsRegistry::cache()->updateCacheWithoutSaving( 'tb_hide_emailNotify', null ); } } return parent::buildMessage( $words, $noClean, $rawHtml ); } }]]></hooks_source> </file> <file> <hook_file_real>tbHideClassTopic.php</hook_file_real> <hook_type>libraryHooks</hook_type> <hook_classname>tbHideClassTopic</hook_classname> <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:6:"forums";s:15:"classToOverload";s:25:"app_forums_classes_topics";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data> <hooks_source><![CDATA[<?php /** * (TB) Hide Content * @file tbHideClassTopic.php Library hook (app_forums_classes_topics) * * @copyright (c) 2006 - 2012 Invision Byte * @link http://www.invisionbyte.net/ * @author Terabyte * @since 20/07/2011 * @updated 12/11/2011 * @version 3.0.4 (30004) */ class tbHideClassTopic extends (~extends~) { private $tbHcCaching = NULL; public function getTopics( $filters ) { $__return = parent::getTopics( $filters ); $hideData = ipsRegistry::cache()->getCache( 'tb_hide_emailNotify', false ); if ( is_array($hideData) && count($hideData) ) { foreach( $__return as $tid => $topic ) { if ( TBHideContent::checkPostContent( $topic['post'] ) ) { $__return[ $tid ]['post'] = TBHideContent::getEmailNotification( $hideData['member_group_id'], $hideData['member_id'], 0, $topic['starter_id'], $topic['last_poster_id'] ); } } ipsRegistry::cache()->updateCacheWithoutSaving( 'tb_hide_emailNotify', null ); } return $__return; } public function getPosts( $filters ) { $__return = parent::getPosts( $filters ); $hideData = ipsRegistry::cache()->getCache( 'tb_hide_emailNotify', false ); if ( is_array($hideData) && count($hideData) ) { foreach( $__return as $pid => $post ) { /* Post is not parsed? */ if ( empty($filters['parse']) ) { if ( $test = TBHideContent::checkPostContent( $post['post'] ) ) { $__return[ $pid ]['post'] = TBHideContent::getEmailNotification( $hideData['member_group_id'], $hideData['member_id'], $post['tid'], $post['starter_id'], $post['last_poster_id'] ); } } else { if ( $test = TBHideContent::checkPostContent( $post['post']['post'] ) ) { $__return[ $pid ]['post']['post'] = TBHideContent::getEmailNotification( $hideData['member_group_id'], $hideData['member_id'], $post['tid'], $post['starter_id'], $post['last_poster_id'] ); } } } ipsRegistry::cache()->updateCacheWithoutSaving( 'tb_hide_emailNotify', null ); } return $__return; } public function parsePost( array $post ) { $this->cache->updateCacheWithoutSaving( 'tb_hide_topic', array( 'tid' => intval($this->getTopicData('tid')), 'starter_id' => intval($this->getTopicData('starter_id')), 'last_poster_id'=> intval($this->getTopicData('last_poster_id')) ) ); /* Store caching setting */ if ( $this->tbHcCaching === NULL ) { $this->tbHcCaching = intval($this->settings['cc_on']); } /* Got a hide tag? ^o) */ if ( !empty($post['cache_content']) && strpos( $post['cache_content'], '<!--TB_HIDE_CONTENT-->' ) !== false ) { unset($post['cache_content']); unset($post['cache_updated']); /* Don't cache posts with hide tags! >< */ $this->settings['cc_on'] = 0; } $__return = parent::parsePost( $post ); /* Reset caching setting and topic ID - must be here or won't work on the last cycle! */ $this->settings['cc_on'] = $this->tbHcCaching; $this->cache->updateCacheWithoutSaving( 'tb_hide_topic', array( 'tid' => 0, 'starter_id' => 0, 'last_poster_id'=> 0 ) ); return $__return; } }]]></hooks_source> </file> <file> <hook_file_real>tbHideContentPostForms.php</hook_file_real> <hook_type>libraryHooks</hook_type> <hook_classname>tbHideContentPostForms</hook_classname> <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:6:"forums";s:15:"classToOverload";s:14:"classPostForms";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data> <hooks_source><![CDATA[<?php /** * (TB) Hide Content * @file tbHideContentPostForms.php Library hook (classPostForms) * * @copyright (c) 2006 - 2012 Invision Byte * @link http://www.invisionbyte.net/ * @author Terabyte * @since 13/11/2010 * @updated 22/07/2011 * @version 3.0.4 (30004) */ class tbHideContentPostForms extends (~extends~) { private $tbHcFormType = ''; protected function _displayForm( $formType, $extraData=array() ) { $this->tbHcFormType = $formType; return parent::_displayForm( $formType, $extraData ); } protected function _checkMultiQuote( $postContent ) { $postContent = parent::_checkMultiQuote( $postContent ); if ( $this->tbHcFormType == 'reply' ) { require_once( IPS_ROOT_PATH . 'sources/classes/class_tbHideContent.php' ); $postContent = TBHideContent::checkPostForReply( $postContent, $this->getTopicData() ); } return $postContent; } public function editPost() { /* Set ids for the quick save box! :o */ $this->cache->updateCacheWithoutSaving( 'tb_hide_topic', array( 'tid' => $this->getTopicID() ? $this->getTopicID() : $this->getTopicData('tid'), 'starter_id' => $this->getTopicData('starter_id'), 'last_poster_id' => $this->getTopicData('last_poster_id') ) ); return parent::editPost(); } protected function _generateTopicSummary( $topicID ) { $this->cache->updateCacheWithoutSaving( 'tb_hide_topic', array( 'tid' => $this->getTopicID() ? $this->getTopicID() : ( $this->getTopicData('tid') ? $this->getTopicData('tid') : $topicID ), 'starter_id' => $this->getTopicData('starter_id'), 'last_poster_id' => $this->getTopicData('last_poster_id') ) ); return parent::_generateTopicSummary( $topicID ); } }]]></hooks_source> </file> <file> <hook_file_real>tbHideContentPostAttach.php</hook_file_real> <hook_type>libraryHooks</hook_type> <hook_classname>tbHideContentPostAttach</hook_classname> <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:6:"forums";s:15:"classToOverload";s:11:"plugin_post";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data> <hooks_source><![CDATA[<?php /** * (TB) Hide Content * @file tbHideContentPostAttach.php Library hook (plugin_post) * * @copyright (c) 2006 - 2012 Invision Byte * @link http://www.invisionbyte.net/ * @author Terabyte * @since 13/11/2010 * @updated 24/03/2012 * @version 3.0.4 (30004) */ class tbHideContentPostAttach extends (~extends~) { public function renderAttachment( $attach_ids, $rel_ids=array(), $attach_post_key=0 ) { $tbHcRows = parent::renderAttachment( $attach_ids, $rel_ids, $attach_post_key ); /* Got some attachments to hide? */ if ( count($tbHcRows) && ipsRegistry::cache()->exists('tb_hide_attachs') ) { $hideCache = ipsRegistry::cache()->getCache( 'tb_hide_attachs', false ); if ( is_array($hideCache) && count($hideCache) ) { foreach( $hideCache as $_aid ) { unset($tbHcRows[ $_aid ]); } } } /* Finally return other attachments */ return $tbHcRows; } }]]></hooks_source> </file> <file> <hook_file_real>tbHideContentTopicNotify.php</hook_file_real> <hook_type>libraryHooks</hook_type> <hook_classname>tbHideContentTopicNotify</hook_classname> <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:6:"forums";s:15:"classToOverload";s:28:"like_forums_topics_composite";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data> <hooks_source><![CDATA[<?php /** * (TB) Hide Content * @file tbHideContentTopicNotify.php Library hook (like_forums_topics_composite) * * @copyright (c) 2006 - 2012 Invision Byte * @link http://www.invisionbyte.net/ * @author Terabyte * @since 22/07/2011 * @updated 24/03/2012 * @version 3.0.4 (30004) */ class tbHideContentTopicNotify extends (~extends~) { public function notificationCanSend( $metaData ) { $this->cache->updateCacheWithoutSaving( 'tb_hide_emailNotify', array( 'topic_id' => $metaData['like_rel_id'], 'member_id' => $metaData['member_id'], 'member_group_id' => $metaData['member_group_id'] ) ); return parent::notificationCanSend( $metaData ); } public function sendNotifications( $relId, $type, $notificationOpts=array(), &$sentToIds=array() ) { /* Get & init our class */ require_once( IPS_ROOT_PATH . 'sources/classes/class_tbHideContent.php' ); TBHideContent::checkPostContent( $notificationOpts['build_message_array']['POST'] ); return parent::sendNotifications( $relId, $type, $notificationOpts, &$sentToIds ); } public function buildNotificationData( $data, $type ) { $this->cache->updateCacheWithoutSaving( 'tb_hide_emailNotify', array( 'topic_id' => $data['like_rel_id'], 'member_id' => $data['member_id'], 'member_group_id' => $data['member_group_id'] ) ); return parent::buildNotificationData( $data, $type ); } public function sendDigestNotifications( $type, $sendMax=null ) { /* Get our class */ require_once( IPS_ROOT_PATH . 'sources/classes/class_tbHideContent.php' ); return parent::sendDigestNotifications( $type, $sendMax ); } }]]></hooks_source> </file> <file> <hook_file_real>tbHideContentForumNotify.php</hook_file_real> <hook_type>libraryHooks</hook_type> <hook_classname>tbHideContentForumNotify</hook_classname> <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:6:"forums";s:15:"classToOverload";s:28:"like_forums_forums_composite";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data> <hooks_source><![CDATA[<?php /** * (TB) Hide Content * @file tbHideContentForumNotify.php Library hook (like_forums_forums_composite) * * @copyright (c) 2006 - 2012 Invision Byte * @link http://www.invisionbyte.net/ * @author Terabyte * @since 22/07/2011 * @updated 24/03/2012 * @version 3.0.4 (30004) */ class tbHideContentForumNotify extends (~extends~) { public function notificationCanSend( $metaData ) { $this->cache->updateCacheWithoutSaving( 'tb_hide_emailNotify', array( 'topic_id' => 0, 'member_id' => $metaData['member_id'], 'member_group_id' => $metaData['member_group_id'] ) ); return parent::notificationCanSend( $metaData ); } public function sendNotifications( $relId, $type, $notificationOpts=array(), &$sentToIds=array() ) { /* Get & init our class */ require_once( IPS_ROOT_PATH . 'sources/classes/class_tbHideContent.php' ); TBHideContent::checkPostContent( $notificationOpts['build_message_array']['POST'] ); return parent::sendNotifications( $relId, $type, $notificationOpts, &$sentToIds ); } public function buildNotificationData( $data, $type ) { $this->cache->updateCacheWithoutSaving( 'tb_hide_emailNotify', array( 'topic_id' => $data['like_rel_id'], 'member_id' => $data['member_id'], 'member_group_id' => $data['member_group_id'] ) ); return parent::buildNotificationData( $data, $type ); } public function sendDigestNotifications( $type, $sendMax=null ) { /* Get our class */ require_once( IPS_ROOT_PATH . 'sources/classes/class_tbHideContent.php' ); return parent::sendDigestNotifications( $type, $sendMax ); } }]]></hooks_source> </file> <file> <hook_file_real>tbHideContentParseBbcode.php</hook_file_real> <hook_type>libraryHooks</hook_type> <hook_classname>tbHideContentParseBbcode</hook_classname> <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:4:"core";s:15:"classToOverload";s:11:"parseBbcode";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data> <hooks_source><![CDATA[<?php /** * (TB) Hide Content * @file tbHideContentParseBbcode.php Library hook (parseBbcode) * * @copyright (c) 2006 - 2012 Invision Byte * @link http://www.invisionbyte.net/ * @author Terabyte * @since 22/07/2011 * @version 3.0.4 (30004) */ class tbHideContentParseBbcode extends (~extends~) { public function stripSharedMedia( $t ) { $hideLocation = $this->cache->getCache( 'tb_hide_force', false ); if ( $hideLocation && $hideLocation == 'ajaxQuote' ) { require_once( IPS_ROOT_PATH . 'sources/classes/class_tbHideContent.php' ); $t = TBHideContent::checkPostForReply( $t, $this->registry->getClass('topics')->getTopicData() ); } $t = parent::stripSharedMedia( $t ); return $t; } }]]></hooks_source> </file> <file> <hook_file_real>tbHideContentSkinProfile.php</hook_file_real> <hook_type>skinHooks</hook_type> <hook_classname>tbHideContentSkinProfile</hook_classname> <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:12:"skin_profile";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data> <hooks_source><![CDATA[/** * (TB) Hide Content * @file tbHideContentSkinProfile.php Skin overloader (profile) * * @copyright (c) 2006 - 2012 Invision Byte * @link http://www.invisionbyte.net/ * @author Terabyte * @since 22/07/2011 * @version 3.0.4 (30004) */ class tbHideContentSkinProfile extends skin_profile(~id~) { public function tabSingleColumn( $row=array(), $read_more_link='', $url='', $title='' ) { if ( !empty($row['tid']) && !empty($row['pid']) && !empty($row['post']) && strpos( $row['post'], '<!--TB_HIDE_CONTENT-->' ) !== false ) { /* Re-get post and re-parse, much fun! */ $_tmp = $this->DB->buildAndFetch( array( 'select' => 'post', 'from' => 'posts', 'where' => 'pid='.$row['pid'] ) ); $this->cache->updateCacheWithoutSaving( 'tb_hide_topic', array( 'tid' => intval($row['tid']), 'starter_id' => intval($row['starter_id']), 'last_poster_id'=> intval($row['last_poster_id']) ) ); IPSText::getTextClass('bbcode')->parse_smilies = $row['use_emo']; IPSText::getTextClass('bbcode')->parse_html = ( $row['use_html'] and $this->caches['group_cache'][ $row['member_group_id'] ]['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0; IPSText::getTextClass('bbcode')->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0; IPSText::getTextClass('bbcode')->parse_bbcode = 1; IPSText::getTextClass('bbcode')->parsing_section = 'topics'; IPSText::getTextClass('bbcode')->parsing_mgroup = $row['member_group_id']; IPSText::getTextClass('bbcode')->parsing_mgroup_others = $row['mgroup_others']; $row['post'] = IPSText::getTextClass('bbcode')->preDisplayParse( $_tmp['post'] ); if ( strpos( $row['post'], '[attachment=' ) !== false ) { $row['post'] = IPSText::stripAttachTag( $row['post'] ); } } return parent::tabSingleColumn( $row, $read_more_link, $url, $title ); } }]]></hooks_source> </file> <file> <hook_file_real>tbHideContentSkinTopic.php</hook_file_real> <hook_type>skinHooks</hook_type> <hook_classname>tbHideContentSkinTopic</hook_classname> <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:10:"skin_topic";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data> <hooks_source><![CDATA[/** * (TB) Hide Content * @file tbHideContentSkinTopic.php Skin overloader (topic) * * @copyright (c) 2006 - 2012 Invision Byte * @link http://www.invisionbyte.net/ * @author Terabyte * @since 22/07/2011 * @version 3.0.4 (30004) */ class tbHideContentSkinTopic extends skin_topic(~id~) { public function topicViewTemplate($forum, $topic, $post_data, $displayData) { $template = parent::topicViewTemplate($forum, $topic, $post_data, $displayData); $hideState = $this->cache->getCache( 'tb_hide_topicState', false ); if ( is_array($hideState) && empty($hideState[ $topic['tid'] ]) ) { $template .= $this->tbHiddenContentDisableAjax(); } return $template; } }]]></hooks_source> </file> <file> <hook_file_real>tbHideContentReputationForums.php</hook_file_real> <hook_type>libraryHooks</hook_type> <hook_classname>tbHideContentReputationForums</hook_classname> <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:6:"forums";s:15:"classToOverload";s:17:"reputation_forums";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data> <hooks_source><![CDATA[<?php /** * (TB) Hide Content * @file tbHideContentReputationForums.php Library hook (reputation_forums) * * @copyright (c) 2006 - 2012 Invision Byte * @link http://www.invisionbyte.net/ * @author Terabyte * @since 24/03/2012 * @version 3.0.4 (30004) */ class tbHideContentReputationForums extends (~extends~) { public function process( $row ) { #var_dump( $row );exit; ipsRegistry::cache()->updateCacheWithoutSaving( 'tb_hide_topic', array( 'tid' => $row['tid'], 'starter_id' => $row['starter_id'], 'last_poster_id' => $row['last_poster_id'] ) ); return parent::process( $row ); } }]]></hooks_source> </file> </hookfiles> <hookextras_custom> <file> <filename>tbHideContentSetup.php</filename> <source><![CDATA[<?php /** * (TB) Hide Content * @file install_tbHideContentSetup.php Hook installation script * * @copyright (c) 2006 - 2012 Invision Byte * @link http://www.invisionbyte.net/ * @author Terabyte * @since 01/07/2009 * @updated 24/03/2012 * @version 3.0.4 (30004) */ class tbHideContentSetup { /** * Registry Object Shortcuts * * @var object */ protected $registry; protected $DB; protected $cache; public function __construct( ipsRegistry $registry ) { /* Make object */ $this->registry = $registry; $this->DB = $this->registry->DB(); $this->cache = $this->registry->cache(); } public function install() { $bbcodeData = array( 'bbcode_title' => '(TB) Hide Content', 'bbcode_desc' => "Hides the content between the tags if the members hasn't replied to the topic", 'bbcode_tag' => 'hide', 'bbcode_replace' => '', 'bbcode_useoption' => 0, 'bbcode_example' => '***Hidden text***', 'bbcode_switch_option' => 0, 'bbcode_menu_option_text' => '', 'bbcode_menu_content_text' => 'Write here the text you want to hide:', 'bbcode_single_tag' => 0, 'bbcode_groups' => 'all', 'bbcode_sections' => 'topics', 'bbcode_php_plugin' => 'tbHideContent.php', 'bbcode_no_parsing' => 0, 'bbcode_protected' => 1, 'bbcode_aliases' => 'hide_me', 'bbcode_optional_option' => 0, 'bbcode_image' => 'hide.png', 'bbcode_app' => 'core' ); /* Check if we already have an hide tag =O */ $check = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'custom_bbcode', 'where' => "bbcode_tag='hide' OR bbcode_php_plugin='tbHideContent.php'" ) ); if ( $check['bbcode_id'] > 0 ) { /* Don't update some vars */ unset($bbcodeData['bbcode_desc']); unset($bbcodeData['bbcode_example']); unset($bbcodeData['bbcode_menu_content_text']); # Let's add the hide_me tag by default if not here already if ( $check['bbcode_aliases'] != '' ) { unset($bbcodeData['bbcode_aliases']); } # Update available BBCODE $this->DB->update( 'custom_bbcode', $bbcodeData, "bbcode_id=".intval($check['bbcode_id']) ); } else { # Insert new BBCODE $this->DB->insert( 'custom_bbcode', $bbcodeData ); } /* Clear posts cache and rebuild cache */ $this->DB->delete('content_cache_posts'); $this->cache->rebuildCache( 'bbcode', 'global' ); } public function uninstall() { # Delete our BBCODE based on tag & plugin name to be sure! :D $this->DB->delete( 'custom_bbcode', "bbcode_tag='hide' AND bbcode_php_plugin='tbHideContent.php'" ); /* Clear posts cache and rebuild cache */ $this->DB->delete('content_cache_posts'); $this->cache->rebuildCache( 'bbcode', 'global' ); } }]]></source> </file> </hookextras_custom> <hookextras_settings> <setting> <conf_is_title>1</conf_is_title> <conf_title_title>(TB) Hide Content</conf_title_title> <conf_title_desc/> <conf_title_noshow>0</conf_title_noshow> <conf_title_keyword>tb_hc</conf_title_keyword> <conf_title_app>forums</conf_title_app> <conf_title_tab>Invision Byte</conf_title_tab> </setting> <setting> <conf_id>301</conf_id> <conf_title>Groups</conf_title> <conf_description>Select here which groups will be able to bypass the check and see the hidden content without replying.</conf_description> <conf_group>30</conf_group> <conf_type>multi</conf_type> <conf_key>tb_hc_groups</conf_key> <conf_value/> <conf_default/> <conf_extra>#show_groups#</conf_extra> <conf_evalphp><![CDATA[if ( $save == 1) { if ( is_array($_POST[ $key ]) ) { $_POST[ $key ] = implode(",",$_POST[ $key ]); } else { $_POST[ $key ] = ""; } } if ( $show == 1 ) { $key .= '[]'; }]]></conf_evalphp> <conf_protected>1</conf_protected> <conf_position>1</conf_position> <conf_start_group>Bypass Permissions</conf_start_group> <conf_add_cache>1</conf_add_cache> <conf_keywords/> <conf_title_keyword>tb_hc</conf_title_keyword> <conf_is_title>0</conf_is_title> </setting> <setting> <conf_id>302</conf_id> <conf_title>Member IDs</conf_title> <conf_description><![CDATA[Write here the IDs of the members that will be able to bypass the check and see the hidden content without replying.<br /><br /><strong style='color:blue'>Please separate each member ID with a comma and remove all spaces!</strong>]]></conf_description> <conf_group>30</conf_group> <conf_type>textarea</conf_type> <conf_key>tb_hc_members</conf_key> <conf_value/> <conf_default/> <conf_extra/> <conf_evalphp/> <conf_protected>1</conf_protected> <conf_position>2</conf_position> <conf_start_group/> <conf_add_cache>1</conf_add_cache> <conf_keywords/> <conf_title_keyword>tb_hc</conf_title_keyword> <conf_is_title>0</conf_is_title> </setting> </hookextras_settings> <hookextras_language> <language> <word_app>core</word_app> <word_pack>public_global</word_pack> <word_key>tb_hc_bbcode_title</word_key> <word_default>Hidden Content</word_default> </language> <language> <word_app>core</word_app> <word_pack>public_global</word_pack> <word_key>tb_hc_bbcode_content</word_key> <word_default><![CDATA[You'll be able to see the hidden content once you reply to this topic.]]></word_default> </language> <language> <word_app>forums</word_app> <word_pack>public_post</word_pack> <word_key>tb_hc_unhidden_msg</word_key> <word_default>HIDDEN CONTENT:</word_default> </language> <language> <word_app>forums</word_app> <word_pack>public_post</word_pack> <word_key>tb_hc_hidden_msg</word_key> <word_default><![CDATA[HIDDEN CONTENT: You'll be able to see the hidden content once you reply to this topic.]]></word_default> </language> </hookextras_language> <hookextras_modules/> <hookextras_help/> <hookextras_templates> <templates> <template_group>skin_post</template_group> <template_content><![CDATA[<div class='message error'<if test="isPrintPage:|:!empty($this->request['forcePrint'])"> style='display:block;'</if>> <strong>{$this->lang->words['tb_hc_bbcode_title']}</strong> <br />{$this->lang->words['tb_hc_bbcode_content']} </div>]]></template_content> <template_name>tbHiddenContent</template_name> <template_data/> <template_updated>1332622707</template_updated> <template_removable>0</template_removable> <template_added_to>0</template_added_to> <template_user_added>0</template_user_added> <template_user_edited>0</template_user_edited> <template_master_key>root</template_master_key> </templates> <templates> <template_group>skin_post</template_group> <template_content><![CDATA[<div class='message error'<if test="isPrintPage:|:!empty($this->request['forcePrint'])"> style='display:block;'</if>> <strong>{$this->lang->words['tb_hc_bbcode_title']}</strong> <br />{$this->lang->words['tb_hc_bbcode_content']} </div>]]></template_content> <template_name>tbHiddenContent</template_name> <template_data/> <template_updated>1332622709</template_updated> <template_removable>0</template_removable> <template_added_to>0</template_added_to> <template_user_added>0</template_user_added> <template_user_edited>0</template_user_edited> <template_master_key>mobile</template_master_key> </templates> <templates> <template_group>skin_post</template_group> <template_content><![CDATA[<div class='message'<if test="isPrintPage:|:!empty($this->request['forcePrint'])"> style='display:block;'</if>> <strong>{$this->lang->words['tb_hc_bbcode_title']}</strong> <br /><br />{$content} </div>]]></template_content> <template_name>tbUnhiddenContent</template_name> <template_data><![CDATA[$content=""]]></template_data> <template_updated>1332622707</template_updated> <template_removable>0</template_removable> <template_added_to>0</template_added_to> <template_user_added>0</template_user_added> <template_user_edited>0</template_user_edited> <template_master_key>root</template_master_key> </templates> <templates> <template_group>skin_post</template_group> <template_content><![CDATA[<div class='message'<if test="isPrintPage:|:!empty($this->request['forcePrint'])"> style='display:block;'</if>> <strong>{$this->lang->words['tb_hc_bbcode_title']}</strong> <br /><br />{$content} </div>]]></template_content> <template_name>tbUnhiddenContent</template_name> <template_data><![CDATA[$content=""]]></template_data> <template_updated>1332622709</template_updated> <template_removable>0</template_removable> <template_added_to>0</template_added_to> <template_user_added>0</template_user_added> <template_user_edited>0</template_user_edited> <template_master_key>mobile</template_master_key> </templates> <templates> <template_group>skin_topic</template_group> <template_content><![CDATA[<script type="text/javascript"> document.observe("dom:loaded", function(){ if ( $('submit_post') ) { $('submit_post').stopObserving(); } }); </script>]]></template_content> <template_name>tbHiddenContentDisableAjax</template_name> <template_data/> <template_updated>1332622708</template_updated> <template_removable>0</template_removable> <template_added_to>0</template_added_to> <template_user_added>0</template_user_added> <template_user_edited>0</template_user_edited> <template_master_key>root</template_master_key> </templates> <templates> <template_group>skin_topic</template_group> <template_content><![CDATA[<script type="text/javascript"> document.observe("dom:loaded", function(){ if ( $('submit_post') ) { $('submit_post').stopObserving(); } }); </script>]]></template_content> <template_name>tbHiddenContentDisableAjax</template_name> <template_data/> <template_updated>1332622709</template_updated> <template_removable>0</template_removable> <template_added_to>0</template_added_to> <template_user_added>0</template_user_added> <template_user_edited>0</template_user_edited> <template_master_key>mobile</template_master_key> </templates> </hookextras_templates> <hookextras_css/> <hookextras_replacements/> <hookextras_tasks/> <hookextras_database_create/> <hookextras_database_alter/> <hookextras_database_update/> <hookextras_database_insert/> </hookexport>
    Сообщение от: mr.Slink, 15 сен 2012 в разделе: PHP
  9. mr.Slink
  10. mr.Slink
    [IMG] [IMG] Auto_Reset_Generator.zip
    Автор темы: mr.Slink, 3 авг 2012, ответов - 0, в разделе: MuOnline
  11. mr.Slink
  12. mr.Slink
  13. mr.Slink
  14. mr.Slink
  15. mr.Slink
    Уже Что такое кандибобер?
    Сообщение от: mr.Slink, 8 апр 2011 в разделе: Оффтоп
  16. mr.Slink
    Сообщение

    Помощь с ftp

    Не знал где создать тему и решил запихать сюда. Недавно арендовал выделенный сервер. Все хорошо вроде. Работает идеально. Вот только не могу понять как сделать к примеру файловый архив на ftp. То есть чтобы заходили не через http://site.ru/ а ftp://site.ru/ Пробовал гуглить и яндексить xD не помогло. Если кому не трудно объясните как сделать сие чудо. P.S. На сервере панель управления ISP Lite. 1.Создание пользователя 2.Создание на юзере сайтов 3.Настройка фтп аккаунтов в аккаунте юзеров http://ru.ispdoc.com...%B8%D1%86%D0%B0 Установить ftp сервер для начала :О Написано же - Хост, там 100% установлен FTP сервер Ftp это типа обмен файлами чз сервер? FTP (англ. File Transfer Protocol — протокол передачи файлов) — протокол, предназначенный для передачи файлов в компьютерных сетях. FTP позволяет подключаться к серверам FTP, просматривать содержимое каталогов и загружать файлы с сервера или на сервер; кроме того, возможен режим передачи файлов между серверами. FTP является одним из старейших прикладных протоколов, появившимся задолго до HTTP, в 1971 году. Он и сегодня широко используется для распространения ПО и доступа к удалённым хостам. Протокол FTP относится к протоколам прикладного уровня и для передачи данных использует транспортный протокол TCP. Команды и данные, в отличие от большинства других протоколов, передаются по разным портам. Исходящий Порт 20, открываемый на стороне сервера, используется для передачи данных,порт 21 для передачи команд. Порт для приема данных клиентом определяется в диалоге согласования. В случае, если передача файла была прервана по каким-либо причинам, протокол предусматривает средства для докачки файла, что бывает очень удобно при передаче больших файлов.
    Сообщение от: mr.Slink, 24 мар 2011 в разделе: Оффтоп
  17. mr.Slink
  18. mr.Slink
  19. mr.Slink
  20. mr.Slink