News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SimplePortal

Started by SimplePortal Team, March 10, 2008, 11:16:07 PM

Previous topic - Next topic

Angelina Belle

Ouch! I'm sorry! Was that me?

I would recommend one of the SMF coding boards instead of this mod support topic.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

mulwa

pls how do i make the "articles" and "recent posts" to be centered in the blocks? Pls i need help

Angelina Belle

Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

mulwa

thanks for that @Angelina. But i don't know where to start editing it, pls help me if possible.

Angelina Belle

All you need to do is put text-align: center in the custom body style.  Then see if it helps center the text in the block.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

mulwa

@Angelina Belle God bless you!
That one worked perfectly for me!
Pls i have one problem, i removed the icon that it used to display before the articles; and when it was removed it displayed "Topic" which is not clickable before the Article link. If possible i would like to remove "Topic" before the clickable text (the "topic" is not clickable). And how do i make the articles that appear in the block to be more than five?
Pls don't be weard of my questions; am just a newbie. Thank  you

Angelina Belle

I think that there is a setting for the number of articles to display in the block -- use the block editor and check this.

You did some changes in portalblocks.php to remove the icon?  Then you already know how to make some changes to the HTML.
You can just remove the part that says "topic" -- only it will be $txt['      <-- and something between quotation marks.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

mulwa

thanks a lot for your concern, but unfortunately, i couldn't trace it out. I removed that icon by deleting it from the theme files inside "sp folder"cause i couldn't get the link in the portalblocks,. I tried removing the "topic" in "portalblocks.php"  but it wasn't working.  and there is no number of articles to be displayed in the article block settings. Thank  you for your time.

Angelina Belle

I am sorry I misunderstood. If you are comfortable working in the CSS files, you may be able to make "topic" display: none; in CSS.  Come on over to simpleportal.net for more help in customizing your blocks!
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Padre gremista

How Modify for have 1000 topics in "recent posts bloc"?
www.gremioemfoco.info - A comunidade gremista na internet.

Angelina Belle

Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Padre gremista

Quote from: Angelina Belle on July 01, 2014, 11:45:24 AM
Simply use the http://simpleportal.net/index.php?action=docs;area=block_editor to change the number of posts/topics to show.

Yes, but I set to show 1000 topics and show only around 30. How I make manually edit for show more topics that the permitted?
www.gremioemfoco.info - A comunidade gremista na internet.

Angelina Belle

Ahh yes.  You will have to look in SSI.php.  There, in two places, it limits how far back to look in your recent posts.

you will see 35 * min(  ... something, 5) -- which severly limits things.  Increase the 35 to something large enough.
In the other place, there might be a 50 instead of a 35.  Increase this as well.

To get to 1000, of course, you need 200 * 5.  Do you really want to see 1000 recent posts in a block?

This will slow down your forum because of the fact that, every time that block is loaded, it is checking more messages in you database.

You can test this out and see if you can tell the difference.

Enjoy!
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Padre gremista

Possible is add the avatar miniature of the last user that posted beside the text marked in image annexed?
www.gremioemfoco.info - A comunidade gremista na internet.

Angelina Belle

That is certainly possible, and would require some php code writing.  You might bring the idea to one of the customization boards at simpleportal.net to see if anyone is interested in working with you on this.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Padre gremista

#4935
I try register in simpleportal.net but the captcha is always error. I can not register.

Can you post my mod request there?
www.gremioemfoco.info - A comunidade gremista na internet.

Dhayzon

Quote from: Padre gremista on July 02, 2014, 01:29:05 PM
I try register in simpleportal.net but the captcha is always error. I can not register.

Can you post my mod request there?

<?php

/*
Block: Recent posts with post preview
Author: Blue @ Simple Portal.net
Version: 1.6
*/

/* [SETUP WHAT YOU WANT HERE] */

$topics_posts 1; // TOPICS - 1 | MESSAGES - 2
$limit 6; // How many recent posts do you want to output?
$number 30; // How many characters do you want to output?
$exclude_boards null; // IF null guests can see all boards | IF you want to hide some boards use: array( ID1, ID2, ID3) where ID is the board's ID
$htmlspecialcharacters false// Do you need to show html special characters like Greek characters?


// Do you want to translate it to your own language? :P
$text['sportal_false'] = 'Simple Portal not found';
$text['board'] = 'in';
$text['who'] = 'by';

/* [STOP!] - THIS IS THE END OF SETUP */

//Only code from now on ;)
global $smcFunc$scripturl$sourcedir$modSettings$user_info$settings$context$txt;

// Lets see if you are using Simple Portal. If not...well...go get them :D
if (!file_exists($sourcedir '/PortalBlocks.php'))
{
echo $text['sportal_false'];
return;
}

// Let's grab some database results
if ($topics_posts == 1) {

if (is_array($exclude_boards) || (int) $exclude_boards === $exclude_boards)
{
$exclude_boards is_array($exclude_boards) ? $exclude_boards : array($exclude_boards);
}
elseif ($exclude_boards != null)
{
$output_method $exclude_boards;
$exclude_boards = array();
}

$posts_result $smcFunc['db_query']('''
   SELECT m.poster_name,m.icon, m.poster_time, m.id_msg,t.num_views, t.num_replies, t.id_member_updated, m.subject, m.body, m.id_topic, b.name, t.id_last_msg, u.avatar, g.online_color,' 
. ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' '
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1 AS new_from'
) . '
   FROM {db_prefix}topics AS t
   LEFT JOIN {db_prefix}boards AS b ON (t.id_board = b.id_board)
   LEFT JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_last_msg)
   LEFT JOIN {db_prefix}members AS u ON (t.id_member_updated = u.id_member)
   LEFT JOIN {db_prefix}membergroups AS g ON (g.id_group = CASE WHEN u.id_group = 0 THEN u.id_post_group ELSE u.id_group END)
   ' 
. (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = m.id_topic AND lt.id_member = ' 
$user_info['id'] . ')
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = ' 
$user_info['id'] . ')' '') . '
   WHERE m.approved=1'   
. (empty($exclude_boards) ? '' '
AND b.id_board NOT IN ({array_int:exclude_boards})'
) . ' AND {query_see_board}
   ORDER BY t.id_last_msg DESC
   LIMIT ' 
$limit,
array(
'exclude_boards' => empty($exclude_boards) ? '' $exclude_boards,
)
   );
$posts = array();
while (
$row_posts $smcFunc['db_fetch_assoc']($posts_result))
{

      global 
$memberContext;
      
loadMemberData($row_posts['id_member_updated']);
      
loadMemberContext($row_posts['id_member_updated']);

      if (empty(
$modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row_posts['icon']]))
$icon_sources[$row_posts['icon']] = file_exists($settings['theme_dir'] . '/images/post/' $row_posts['icon'] . '.gif') ? 'images_url' 'default_images_url';

   
$posts[] = array(
  'id' => $row_posts['id_member_updated'],
  'views' => $row_posts['num_views'],
  'replies' => $row_posts['num_replies'],
  'icon' => '<img src="' $settings[$icon_sources[$row_posts['icon']]] . '/post/' $row_posts['icon'] . '.gif" align="middle" alt="' $row_posts['icon'] . '" border="0" />',
      
'username' => '<a style="color: ' $row_posts['online_color'] . ';" href="' $scripturl '?action=profile;u=' $row_posts['id_member_updated'] . '">' $row_posts['poster_name'] . '</a>',
      
'subject' => '<a style="font-weight: bold;" title="' $text['board'] . '&nbsp;' $row_posts['name'] .'" href="' $scripturl '?topic=' $row_posts['id_topic'] . '.msg' $row_posts['id_last_msg'] . ';topicseen#new">' $row_posts['subject'] . '</a>',
      
'body' => $row_posts['body'],
  'avatar' => $row_posts['avatar'] == '' $memberContext[$row_posts['id_member_updated']]['avatar']['href'] : (stristr($row_posts['avatar'], 'http://') ? $row_posts['avatar'] : $modSettings['avatar_url'] . '/' $row_posts['avatar']),
  'board' => $row_posts['name'],
  'time' => timeformat($row_posts['poster_time']),
  'poster' => array(
'id' => $row_posts['id_member'],
'name' => $row_posts['poster_name'],
'href' => !empty($row_posts['id_member']) ? $scripturl '?action=profile;u=' $row_posts['id_member'] : '',
'link' => !empty($row_posts['id_member']) ? '<a href="' $scripturl '?action=profile;u=' $row_posts['id_member'] . '">' $row_posts['poster_name'] . '</a>' $row_posts['poster_name']
),

  'new' => !empty($row_posts['is_read'])
   );
}
$smcFunc['db_free_result']($posts_result);

} else {

if (is_array($exclude_boards) || (int) $exclude_boards === $exclude_boards)
{
$exclude_boards is_array($exclude_boards) ? $exclude_boards : array($exclude_boards);
}
elseif ($exclude_boards != null)
{
$output_method $exclude_boards;
$exclude_boards = array();
}



$posts_result $smcFunc['db_query']('''
   SELECT  u.real_name,m.icon,m.poster_time, m.id_msg, m.id_member, m.subject, m.body, m.id_topic, b.name, b.id_board, u.avatar, g.online_color,' 
. ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' '
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1 AS new_from'
) . '
   FROM {db_prefix}messages AS m
   LEFT JOIN {db_prefix}boards AS b ON (m.id_board = b.id_board)
   LEFT JOIN {db_prefix}members AS u ON (m.id_member = u.id_member)
   LEFT JOIN {db_prefix}membergroups AS g ON (g.id_group = CASE WHEN u.id_group = 0 THEN u.id_post_group ELSE u.id_group END)
   ' 
. (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = m.id_topic AND lt.id_member = ' 
$user_info['id'] . ')
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = ' 
$user_info['id'] . ')' '') . '
   WHERE m.approved=1'   
. (empty($exclude_boards) ? '' '
AND b.id_board NOT IN ({array_int:exclude_boards})'
) . ' AND {query_see_board}
   ORDER BY m.id_msg DESC
   LIMIT ' 
$limit,
array(
'exclude_boards' => empty($exclude_boards) ? '' $exclude_boards,
)
   );
$posts = array();

      while (
$row_posts $smcFunc['db_fetch_assoc']($posts_result))
      {
      
if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row_posts['icon']]))
$icon_sources[$row_posts['icon']] = file_exists($settings['theme_dir'] . '/images/post/' $row_posts['icon'] . '.gif') ? 'images_url' 'default_images_url';

      global 
$memberContext;
      
loadMemberData($row_posts['id_member']);
      
loadMemberContext($row_posts['id_member']);
$posts[] = array(
  'id' => $row_posts['id_member'],
  'icon' => '<img src="' $settings[$icon_sources[$row_posts['icon']]] . '/post/' $row_posts['icon'] . '.gif" align="middle" alt="' $row_posts['icon'] . '" border="0" />',
  'username' => '<a style="color: ' $row_posts['online_color'] . ';" href="' $scripturl '?action=profile;u=' $row_posts['id_member'] . '">'.$row_posts['real_name'] . '</a>',
  'subject' => '<a title="'.$row_posts['subject'].'" href="' $scripturl '?topic=' $row_posts['id_topic'] . '.msg' $row_posts['id_msg'] . ';topicseen#new">' .$row_posts['subject']. '</a>',
  'body' => $row_posts['body'],
  'avatar' => $row_posts['avatar'] == '' $memberContext[$row_posts['id_member']]['avatar']['href'] : (stristr($row_posts['avatar'], 'http://') ? $row_posts['avatar'] : $modSettings['avatar_url'] . '/' $row_posts['avatar']),
  'board' => $row_posts['name'],
  'time' => timeformat($row_posts['poster_time']),
  'new' => !empty($row_posts['is_read'])
);
      }

$smcFunc['db_free_result']($posts_result);

}
echo
'<div class="container-fluid nuevos_temas_indice">
'
;
foreach (
$posts as $post) {

// Lets fix the BBCode bug and Strip the Text
//' . $text['who'] . '&nbsp;

$content1 str_replace("[""<"$post['body']);
$content2 str_replace("]"">"$content1);
$content3 strip_tags($content2);
$preview substr ($content3,0,$number);
$preview2 preg_replace('/\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i'''$preview);
echo
' <div class="row nuevas_respuestas_indice">
 <div class="col-xs-6 col-md-1">
 '
.$post['icon'].'
 </div>
  <div class="col-xs-12 col-md-6">'
;

 echo
'<h4 class="media-heading">' $post['subject']; if (!$post['new'] && $context['user']['is_logged'])
echo '&nbsp &nbsp<span class="label label-success">Nuevo</span>';
 echo
'</h4>
 '
;

    if (
$htmlspecialcharacters) {
echo htmlspecialchars($previewENT_NOQUOTES"UTF-8") . '...';
} else {
echo' <small>'.$preview2.' en  →',$post['board'],'</small>';
}
   echo
'</div>

<div class="col-xs-6 col-md-2">
<span><img src="/Themes/bootz/images/views.gif" title="Views" alt=" Views">&nbsp &nbsp<span class="label label-warning">'
.$post['views'].'</span></span>
<Span class="pull-right"><img src="/Themes/bootz/images/coments.gif" title="Replies" alt="Replies">&nbsp &nbsp<span class="label label-info"> '
$post['replies'], '</span></Span>
</div>

<div class="col-xs-6 col-md-3">
  <a class="pull-left" href="#" style=" margin-right: 10px; ">'
;
   if (empty(
$post['avatar']))
    {
 echo '<img class="media-object avatar" src="/avatars/noavatar.gif"  alt="no tengo avatar xD" width="34px" height="34px" />';
     }
else{

       echo 
'<img class="media-object avatar" src="' $post['avatar'] .'" alt="" width="34px" height="34px" />';
}
    echo
'

  </a>


  <div class="media-body">
   <span style="padding: 0 5px;display: inline-block;margin-bottom: 5px;"> ' 
$post['username'] . '</span><br><div><small>' $post['time'] .'</small></div>';



echo 
'
   </div>

  </div>
  </div>
'
;





}

echo'
</div>'
;


?>


http://simpleportal.net/index.php?topic=9138.0


preview


Angelina Belle

Please try to listen to the CAPTCHA, if there is a problem with CAPTCHA display.  That could work.
How many letters do you see when you look at the CAPTCHA, by the way?  How many do you hear when you listen to the captcha?


Thanks.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Padre gremista

Quote from: {dhayzon} on July 02, 2014, 03:34:12 PM
Quote from: Padre gremista on July 02, 2014, 01:29:05 PM
I try register in simpleportal.net but the captcha is always error. I can not register.

Can you post my mod request there?

<?php

/*
Block: Recent posts with post preview
Author: Blue @ Simple Portal.net
Version: 1.6
*/

/* [SETUP WHAT YOU WANT HERE] */

$topics_posts 1; // TOPICS - 1 | MESSAGES - 2
$limit 6; // How many recent posts do you want to output?
$number 30; // How many characters do you want to output?
$exclude_boards null; // IF null guests can see all boards | IF you want to hide some boards use: array( ID1, ID2, ID3) where ID is the board's ID
$htmlspecialcharacters false// Do you need to show html special characters like Greek characters?


// Do you want to translate it to your own language? :P
$text['sportal_false'] = 'Simple Portal not found';
$text['board'] = 'in';
$text['who'] = 'by';

/* [STOP!] - THIS IS THE END OF SETUP */

//Only code from now on ;)
global $smcFunc$scripturl$sourcedir$modSettings$user_info$settings$context$txt;

// Lets see if you are using Simple Portal. If not...well...go get them :D
if (!file_exists($sourcedir '/PortalBlocks.php'))
{
echo $text['sportal_false'];
return;
}

// Let's grab some database results
if ($topics_posts == 1) {

if (is_array($exclude_boards) || (int) $exclude_boards === $exclude_boards)
{
$exclude_boards is_array($exclude_boards) ? $exclude_boards : array($exclude_boards);
}
elseif ($exclude_boards != null)
{
$output_method $exclude_boards;
$exclude_boards = array();
}

$posts_result $smcFunc['db_query']('''
   SELECT m.poster_name,m.icon, m.poster_time, m.id_msg,t.num_views, t.num_replies, t.id_member_updated, m.subject, m.body, m.id_topic, b.name, t.id_last_msg, u.avatar, g.online_color,' 
. ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' '
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1 AS new_from'
) . '
   FROM {db_prefix}topics AS t
   LEFT JOIN {db_prefix}boards AS b ON (t.id_board = b.id_board)
   LEFT JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_last_msg)
   LEFT JOIN {db_prefix}members AS u ON (t.id_member_updated = u.id_member)
   LEFT JOIN {db_prefix}membergroups AS g ON (g.id_group = CASE WHEN u.id_group = 0 THEN u.id_post_group ELSE u.id_group END)
   ' 
. (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = m.id_topic AND lt.id_member = ' 
$user_info['id'] . ')
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = ' 
$user_info['id'] . ')' '') . '
   WHERE m.approved=1'   
. (empty($exclude_boards) ? '' '
AND b.id_board NOT IN ({array_int:exclude_boards})'
) . ' AND {query_see_board}
   ORDER BY t.id_last_msg DESC
   LIMIT ' 
$limit,
array(
'exclude_boards' => empty($exclude_boards) ? '' $exclude_boards,
)
   );
$posts = array();
while (
$row_posts $smcFunc['db_fetch_assoc']($posts_result))
{

      global 
$memberContext;
      
loadMemberData($row_posts['id_member_updated']);
      
loadMemberContext($row_posts['id_member_updated']);

      if (empty(
$modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row_posts['icon']]))
$icon_sources[$row_posts['icon']] = file_exists($settings['theme_dir'] . '/images/post/' $row_posts['icon'] . '.gif') ? 'images_url' 'default_images_url';

   
$posts[] = array(
  'id' => $row_posts['id_member_updated'],
  'views' => $row_posts['num_views'],
  'replies' => $row_posts['num_replies'],
  'icon' => '<img src="' $settings[$icon_sources[$row_posts['icon']]] . '/post/' $row_posts['icon'] . '.gif" align="middle" alt="' $row_posts['icon'] . '" border="0" />',
      
'username' => '<a style="color: ' $row_posts['online_color'] . ';" href="' $scripturl '?action=profile;u=' $row_posts['id_member_updated'] . '">' $row_posts['poster_name'] . '</a>',
      
'subject' => '<a style="font-weight: bold;" title="' $text['board'] . '&nbsp;' $row_posts['name'] .'" href="' $scripturl '?topic=' $row_posts['id_topic'] . '.msg' $row_posts['id_last_msg'] . ';topicseen#new">' $row_posts['subject'] . '</a>',
      
'body' => $row_posts['body'],
  'avatar' => $row_posts['avatar'] == '' $memberContext[$row_posts['id_member_updated']]['avatar']['href'] : (stristr($row_posts['avatar'], 'http://') ? $row_posts['avatar'] : $modSettings['avatar_url'] . '/' $row_posts['avatar']),
  'board' => $row_posts['name'],
  'time' => timeformat($row_posts['poster_time']),
  'poster' => array(
'id' => $row_posts['id_member'],
'name' => $row_posts['poster_name'],
'href' => !empty($row_posts['id_member']) ? $scripturl '?action=profile;u=' $row_posts['id_member'] : '',
'link' => !empty($row_posts['id_member']) ? '<a href="' $scripturl '?action=profile;u=' $row_posts['id_member'] . '">' $row_posts['poster_name'] . '</a>' $row_posts['poster_name']
),

  'new' => !empty($row_posts['is_read'])
   );
}
$smcFunc['db_free_result']($posts_result);

} else {

if (is_array($exclude_boards) || (int) $exclude_boards === $exclude_boards)
{
$exclude_boards is_array($exclude_boards) ? $exclude_boards : array($exclude_boards);
}
elseif ($exclude_boards != null)
{
$output_method $exclude_boards;
$exclude_boards = array();
}



$posts_result $smcFunc['db_query']('''
   SELECT  u.real_name,m.icon,m.poster_time, m.id_msg, m.id_member, m.subject, m.body, m.id_topic, b.name, b.id_board, u.avatar, g.online_color,' 
. ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' '
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1 AS new_from'
) . '
   FROM {db_prefix}messages AS m
   LEFT JOIN {db_prefix}boards AS b ON (m.id_board = b.id_board)
   LEFT JOIN {db_prefix}members AS u ON (m.id_member = u.id_member)
   LEFT JOIN {db_prefix}membergroups AS g ON (g.id_group = CASE WHEN u.id_group = 0 THEN u.id_post_group ELSE u.id_group END)
   ' 
. (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = m.id_topic AND lt.id_member = ' 
$user_info['id'] . ')
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = ' 
$user_info['id'] . ')' '') . '
   WHERE m.approved=1'   
. (empty($exclude_boards) ? '' '
AND b.id_board NOT IN ({array_int:exclude_boards})'
) . ' AND {query_see_board}
   ORDER BY m.id_msg DESC
   LIMIT ' 
$limit,
array(
'exclude_boards' => empty($exclude_boards) ? '' $exclude_boards,
)
   );
$posts = array();

      while (
$row_posts $smcFunc['db_fetch_assoc']($posts_result))
      {
      
if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row_posts['icon']]))
$icon_sources[$row_posts['icon']] = file_exists($settings['theme_dir'] . '/images/post/' $row_posts['icon'] . '.gif') ? 'images_url' 'default_images_url';

      global 
$memberContext;
      
loadMemberData($row_posts['id_member']);
      
loadMemberContext($row_posts['id_member']);
$posts[] = array(
  'id' => $row_posts['id_member'],
  'icon' => '<img src="' $settings[$icon_sources[$row_posts['icon']]] . '/post/' $row_posts['icon'] . '.gif" align="middle" alt="' $row_posts['icon'] . '" border="0" />',
  'username' => '<a style="color: ' $row_posts['online_color'] . ';" href="' $scripturl '?action=profile;u=' $row_posts['id_member'] . '">'.$row_posts['real_name'] . '</a>',
  'subject' => '<a title="'.$row_posts['subject'].'" href="' $scripturl '?topic=' $row_posts['id_topic'] . '.msg' $row_posts['id_msg'] . ';topicseen#new">' .$row_posts['subject']. '</a>',
  'body' => $row_posts['body'],
  'avatar' => $row_posts['avatar'] == '' $memberContext[$row_posts['id_member']]['avatar']['href'] : (stristr($row_posts['avatar'], 'http://') ? $row_posts['avatar'] : $modSettings['avatar_url'] . '/' $row_posts['avatar']),
  'board' => $row_posts['name'],
  'time' => timeformat($row_posts['poster_time']),
  'new' => !empty($row_posts['is_read'])
);
      }

$smcFunc['db_free_result']($posts_result);

}
echo
'<div class="container-fluid nuevos_temas_indice">
'
;
foreach (
$posts as $post) {

// Lets fix the BBCode bug and Strip the Text
//' . $text['who'] . '&nbsp;

$content1 str_replace("[""<"$post['body']);
$content2 str_replace("]"">"$content1);
$content3 strip_tags($content2);
$preview substr ($content3,0,$number);
$preview2 preg_replace('/\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i'''$preview);
echo
' <div class="row nuevas_respuestas_indice">
 <div class="col-xs-6 col-md-1">
 '
.$post['icon'].'
 </div>
  <div class="col-xs-12 col-md-6">'
;

 echo
'<h4 class="media-heading">' $post['subject']; if (!$post['new'] && $context['user']['is_logged'])
echo '&nbsp &nbsp<span class="label label-success">Nuevo</span>';
 echo
'</h4>
 '
;

    if (
$htmlspecialcharacters) {
echo htmlspecialchars($previewENT_NOQUOTES"UTF-8") . '...';
} else {
echo' <small>'.$preview2.' en  →',$post['board'],'</small>';
}
   echo
'</div>

<div class="col-xs-6 col-md-2">
<span><img src="/Themes/bootz/images/views.gif" title="Views" alt=" Views">&nbsp &nbsp<span class="label label-warning">'
.$post['views'].'</span></span>
<Span class="pull-right"><img src="/Themes/bootz/images/coments.gif" title="Replies" alt="Replies">&nbsp &nbsp<span class="label label-info"> '
$post['replies'], '</span></Span>
</div>

<div class="col-xs-6 col-md-3">
  <a class="pull-left" href="#" style=" margin-right: 10px; ">'
;
   if (empty(
$post['avatar']))
    {
 echo '<img class="media-object avatar" src="/avatars/noavatar.gif"  alt="no tengo avatar xD" width="34px" height="34px" />';
     }
else{

       echo 
'<img class="media-object avatar" src="' $post['avatar'] .'" alt="" width="34px" height="34px" />';
}
    echo
'

  </a>


  <div class="media-body">
   <span style="padding: 0 5px;display: inline-block;margin-bottom: 5px;"> ' 
$post['username'] . '</span><br><div><small>' $post['time'] .'</small></div>';



echo 
'
   </div>

  </div>
  </div>
'
;





}

echo'
</div>'
;


?>


http://simpleportal.net/index.php?topic=9138.0


preview



Where I must put this code?
www.gremioemfoco.info - A comunidade gremista na internet.

Dhayzon


Advertisement: