Новые сообщения (с предпросмотром)

Новые сообщения (с предпросмотром) 1.1.0

Нет прав для скачивания

Ragnar

Пользователь
РАЛЬФ, пробуй этот код
PHP:
<?php
 
define('IN_FORUM', true);
define('BB_ROOT', './');
require(BB_ROOT .'common.php');
 
//
// Start session management
//
$user->session_start();
//
// End session management
//
 
$post_id = $_GET['id'] ? $_GET['id'] : 0;
// Get Post Data
$post_data = DB()->query("SELECT post_html FROM ".BB_POSTS_HTML." WHERE post_id = $post_id LIMIT 1");
$post = DB()->sql_fetchrow($post_data);
// Get Post Data
// Construct Post HTML
$html  =('<script type="text/javascript">');
$html .=('var postImgAligned_MaxWidth = screen.height - 390;');
$html .=('initPostBBCode("div#postpr");');
$html .=('var maxH  = screen.height - 290;');
$html .=('var maxW  = screen.width - 60;');
$html .=('var $post  = $(\'div#postpr\');');
$html .=('$post.css({ maxWidth: maxW, maxHeight: maxH });');
$html .=('</script>');
$html .=('<div id="postpr">'.$post['post_html'].'<br />');
// Print Post
print $html;
 
Р

РАЛЬФ

Гость
Ragnar, картинки появились, но не могу урегулировать размер пред.предпросмотра Безымянный.png. и еще один касяк, пред.просмотр долго грузится, может из-за того что код совсем другой? вот оригинал
PHP:
<?php
if(!defined('IN_SEO'))
{
    define('INIT_BB',  true);
    define('BB_ROOT', './');
    require(BB_ROOT ."common.php");
}
$user->session_start();
$post_id = $_GET['id'] ? $_GET['id'] : 0;
$post_id = (int) $post_id;
$sql = DB()->fetch_row("SELECT post_html FROM ".BB_POSTS_HTML." WHERE post_id = $post_id LIMIT 1");
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
$message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $sql['post_html'] . '<'), 1, -1));
$html = '<div id="post_ajax">'.$message.'</div>';
print $html;
 

drew

Пользователь
РАЛЬФ, дело не в том что он другой или ещё что-то. Дело в том что ему надо успеть построить данные. Поглядел у тебя на трекере долго все грузит, и особенно тормозит все.
 
Р

РАЛЬФ

Гость
помогите пожалуйста урегулировать размер пред.предпросмотра
Код:
/* - - - - - - CSS Document - - - - - - - - -
 
Title : Global style sheet for client-side web development
Author : Cody Lindley
 
- - - - - - - - - - - - - - - - - - - - - */
 
 
/* ----- add selectors here for font sizing ----- */
#JT_close_left, #JT_close_right{font-size: 1.1em;}
#JT_copy p, #JT_copy ul{font-size: 1.1em;}
.formInfo a, .formInfo a:active, formInfo a:visited{
  background-color:#FF0000;
  font-size: 1.3em;
  font-weight:bold;
  padding:1px 2px;
  margin-left:5px;
  color:#FFFFFF;
  text-decoration: none;
}
 
.formInfo a:hover{
  color:#660000;
  text-decoration: none;
}
 
/* ---------->>> jtip <<<---------------------------------------------------------------*/
 
#JT_close_left, #JT_close_right {
    font-size: 1.1em;
}
 
#JT_copy p, #JT_copy ul {
    font-size: 1.1em;
}
 
.formInfo a, .formInfo a:active, formInfo a:visited {
    background-color: #D0E9F5;
    color: #FFFFFF;
    font-size: 1.3em;
    font-weight: bold;
    margin-left: 5px;
    padding: 1px 2px;
    text-decoration: none;
}
 
.formInfo a:hover {
    color: #660000;
    text-decoration: none;
}
 
#JT_arrow_left {
    -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    -moz-border-right-colors: none;
    -moz-border-top-colors: none;
    border-color: transparent rgba(64, 64, 64, 0.406) transparent rgba(64, 64, 64, 0.406);
    border-image: none;
    border-style: solid solid solid none;
    border-width: 12px 15px 12px 1px;
    display: block;
    height: 0;
    overflow: hidden;
    position: absolute;
    top: -1px;
    white-space: nowrap;
    width: 0;
    margin-left:-19px;
    z-index: 101;
}
 
#JT_arrow_right {
    -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    -moz-border-right-colors: none;
    -moz-border-top-colors: none;
    border-color: transparent rgba(64, 64, 64, 0.406) transparent rgba(64, 64, 64, 0.406);
    border-image: none;
    border-style: solid none solid solid;
    border-width: 12px 1px 12px 15px;
    display: block;
    height: 0;
    overflow: hidden;
    position: absolute;
    top: -1px;
    white-space: nowrap;
    width: 0;
    margin-left:3px;
    z-index: 101;
}
 
#JT {
    background-color: #fff;
    position: absolute;
    z-index: 3000;
    border: 4px solid rgba(64, 64, 64, 0.506);
    border-radius: 5px 5px 5px 5px;
    box-shadow: 0 15px 20px rgba(0, 0, 0, 0.506);
}
 
#JT_copy {
    color: #333333;
    padding: 10px;
}
 
.JT_loader {
    background-image: url("templates/default/images/loader.gif");
    background-position: center center;
    background-repeat: no-repeat;
    height: 12px;
    width: 100%;
}
 
#JT_close_left {
    background-color: #CCCCCC;
    font-weight: bold;
    padding-bottom: 5px;
    padding-left: 8px;
    padding-top: 2px;
    text-align: left;
}
 
#JT_close_right {
    background-color: #F1F0EF;
    font-weight: bold;
    padding-bottom: 5px;
    padding-left: 8px;
    padding-top: 2px;
    text-align: left;
    border-bottom: 1px solid #D6D6D6;
    border-top: 0 none;
    border-right: 0 none;
    border-left: 0 none;
    font-family: Georgia,"Times New Roman",serif;
    font-size: 14px;
    overflow: hidden;
 
}
 
#JT_copy p {
    margin: 3px 0px;
}
 
#JT_copy img {
    border: 1px solid #CCCCCC;
    padding: 1px;
}
 
.jsTip {
    cursor: help;
}
 

dimka3210

Пользователь
Да нахер CSS. Тебе нужно скрины грузить уменьшеные. Тогда и грузиться будут быстро и нужного размера.
 
Сверху