Проблем с код изкарване на bbcodes

Проблеми, въпроси, модове и темплейти.
Post Reply
3AKOHA
Нов
Нов
Posts: 21
Joined: Sat Sep 15, 2012 9:28 am

Проблем с код изкарване на bbcodes

Post by 3AKOHA » Sat May 25, 2013 4:37 pm

Здравейте,
някой може ли да ми помогне с този код нещо не е наред при него в смисъл не ми изкарва усмивките, както трябва а все едно липсва изображение иначе title описанието го има и второто което е за bbcode не ми излизат нещата които сложа в bbcode, било то [url] [img] .
Ще съм много благодарен, ако ми помогнете.

Code: Select all

<?php 
mysql_connect&#40;"localhost","user","pass"&#41;;    
mysql_selectdb&#40;"db"&#41;;

define&#40;'IN_PHPBB', true&#41;;
$phpbb_root_path = &#40;defined&#40;'PHPBB_ROOT_PATH'&#41;&#41; ? PHPBB_ROOT_PATH &#58; './forum/';
$phpEx = substr&#40;strrchr&#40;__FILE__, '.'&#41;, 1&#41;;
include&#40;$phpbb_root_path . 'includes/bbcode.' . $phpEx&#41;;
include 'pagination.php';
$bbcode = new bbcode&#40;&#41;;

$allow_bbcode = &#40;$config&#91;'allow_bbcode'&#93; == 1&#41; ? true &#58; false;
$allow_smilies = &#40;$config&#91;'allow_smilies'&#93; == 1&#41; ? true &#58; false;
$allow_urls = &#40;$config&#91;'allow_post_links'&#93; == 1&#41; ? true &#58; false;

$band_id      = request_var&#40;'id', 0&#41;;

$bbcode_options = &#40;&#40;$allow_bbcode&#41; ? OPTION_FLAG_BBCODE &#58; 0&#41; + &#40;&#40;$allow_smilies&#41; ? OPTION_FLAG_SMILIES &#58; 0&#41; + &#40;&#40;$allow_urls&#41; ? OPTION_FLAG_LINKS &#58; 0&#41;;
$results = mysql_result&#40;mysql_query&#40;"SELECT COUNT&#40;`topic_id`&#41; FROM `phpbb_topics` WHERE forum_id = '31'"&#41;, 0&#41;;
if &#40;$results > 0&#41; &#123;
    $pagination = pagination&#40;$results, array&#40;
    'per_page'  => 5,
    'get_vars'  => array&#40;'p' => &#40;int&#41;@$_GET&#91;'p'&#93;&#41;
&#41;&#41;; 
$sql=mysql_query&#40;"    
    SELECT p.post_text, t.topic_title, t.topic_first_poster_name, t.topic_time FROM phpbb_posts p, phpbb_topics t  
    WHERE p.post_id = t.topic_first_post_id AND p.forum_id = 31 AND t.topic_id = p.topic_id  
    ORDER BY t.topic_time DESC LIMIT &#123;$pagination&#91;'limit'&#93;&#91;'first'&#93;&#125;, &#123;$pagination&#91;'limit'&#93;&#91;'second'&#93;&#125;"&#41; or die&#40;mysql_error&#40;&#41;&#41;;    

while&#40;$row = mysql_fetch_array&#40;$sql&#41;&#41; &#123;    
    $zaglavie = $row&#91;'topic_title'&#93;;    
    $sudurjanie = $row&#91;'post_text'&#93;;  
    $avtor = $row&#91;'topic_first_poster_name'&#93;;  
    $data = date&#40;"d.m.Y - H&#58;i&#58;s", $row&#91;'topic_time'&#93;&#41;;  
        
    echo "<b>$zaglavie</b><hr /> Автор&#58; <b>$avtor</b> / Дата&#58; $data <br><br>$sudurjanie<br /><br /><br />";    
&#125;    
  echo $pagination&#91;'output'&#93;;
&#125; else &#123;
    echo 'Няма добавени новини';
&#125; 
?>

3AKOHA
Нов
Нов
Posts: 21
Joined: Sat Sep 15, 2012 9:28 am

Post by 3AKOHA » Thu May 30, 2013 4:54 pm

Някой може ли да ми помогне.

Post Reply