To use this website completely, it is necessary to store cookies on your computer.
 

* Navigator

Expand - Collapse

* Statistic

  • *Total Posts: 14942
  • *Total Topics: 2271
  • *Online Today: 12
  • *Most Online: 292
(2016 November 12, 09:37:31 am)

How to make a php block?

Started by neverhurry, 2009 August 26, 10:48:27 pm

previous topic - next topic

0 Members and 0 Guests are viewing this topic.

neverhurry

2009 August 26, 10:48:27 pm
Hello there, i found a very good SMF forum mod "Top stats" (http://custom.simplemachines.org/mods/index.php?mod=1687), thinking if it is possible to put in a PortaMX php block. The code for SMF 2.0 is here, i copied it and paste it into a php block but it doesn't work. How should I do? I am a beginner, but i would like very much to learn to grasp the powerful PortaMX, i will appreciate very much any help from you. Thanks.
PS: I like the portamx.com's community, i found it very friendly, all my best wishes to you.

Code Select
// top stats collapse object.
echo '
<script language="JavaScript" type="text/javascript"><!-- // -->';

echo chr(60) . chr(33) . chr(91) . chr(67) . chr(68) . chr(65) . chr(84) . chr(65) . chr(91);
echo '
var current_header_tops = ', empty($options['collapse_header_tops']) ? 'false' : 'true', ';
function shrinkHeaderTOPS(mode)
{';
if ($context['user']['is_guest'])
echo '
xxx = "upshrinkTOPS=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header_tops", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("upshrink_tops").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");
document.getElementById("upshrinkHeaderTOPS").style.display = mode ? "none" : "";
current_header_tops = mode;
}
// ';
echo chr(93) . chr(93) . chr(62);
echo '
</script>';

      //top stats start. by www.gorselsanatlar.org
loadLanguage('Stats');

echo '<br />
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '>
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: center; ">
<a href="#" onclick="shrinkHeaderTOPS(!current_header_tops); return false;"><img id="upshrink_tops" src="', $settings['images_url'], '/', empty($options['collapse_header_tops']) ? 'collapse.gif' : 'expand.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin-right: 2ex;" align="right" /></a>
', $txt['forum_stats'], '
</div>
<div id="upshrinkHeaderTOPS"', empty($options['collapse_header_tops']) ? '' : ' style="display: none;"', '>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">

    <tr>
        <td class="titlebg" width="10%" colspan="2" align="center">', $txt['new'] ,' ', $txt['members_title'], '</td>
        <td class="titlebg" width="24%" colspan="2" align="center">', $txt['top_topics_views'], '</td>
        <td class="titlebg" width="66%" colspan="3" align="center">', $txt['recent_posts'], '</td>
    </tr>
    <tr>
        <td class="windowbg2" width="10%" colspan="2" valign="top"><span class="smalltext"><b>', $txt['user'], '</b></span><br />';
                  foreach ($context['new_members'] as $poster)
        {
         echo '
         <img alt="" src="', $settings['images_url'], '/icons/online.gif', '" width="12" height="12" />
        <span class="smalltext">',$poster['link'], '</span><br />';
        }
        echo '
        </td>
        <td class="windowbg2" width="18%" valign="top"><span class="smalltext"><b>', $txt['board_topics'], '</b></span><br />';
            foreach ($context['top_topics_views'] as $topic)
        echo '
        <img alt="" src="', $settings['images_url'], '/email_sm.gif', '" width="12" />
        <span class="smalltext">', $topic['link'], '</span><br />';   
        echo '</td>
        <td class="windowbg2" width="6%" align="right" valign="top"><span class="smalltext"><b>', $txt['views'] ,'</b></span><br />';
            foreach ($context['top_topics_views'] as $topic)
        echo '
        <img alt="" src="', $settings['images_url'], '/icons/field_valid.gif" height="8" />       
        <span class="smalltext">', $topic['num_views'], '</span><br />';
        echo '</td>
        <td class="windowbg2" width="22%" rowspan="3" valign="top"><span class="smalltext"><b>', $txt['board_topics'], '</b></span><br />';
            if (!empty($context['latest_posts']))
            foreach ($context['latest_posts'] as $post)
        echo '
        <img src="', $settings['images_url'], '/email_sm.gif', '" width="12" alt="" />
        <span class="smalltext"><a href="',$post['href'],'">', $post['short_subject'], '</a></span><br />';
        echo '</td>
        <td class="windowbg2" width="14%" rowspan="3" valign="top"><span class="smalltext"><b>', $txt['author'] ,'</b></span><br />';
            if (!empty($context['latest_posts']))
            foreach ($context['latest_posts'] as $post)
        echo '
        <img alt="" src="', $settings['images_url'], '/icons/online.gif', '" width="12" height="12" />
        <span class="smalltext">', $post['poster']['link'], '</span><br />';
        echo'
        </td>
        <td class="windowbg2" width="20%" rowspan="3" valign="top"><span class="smalltext"><b>', $txt['date'] ,'</b></span><br />';
            if (!empty($context['latest_posts']))
            foreach ($context['latest_posts'] as $post)
            echo '
            <img alt="" src="', $settings['images_url'], '/icons/calendar.gif', '" width="12" />
            <span class="smalltext">', $post['time'], '</span><br />';
        echo '</td>
    </tr>
    <tr>
        <td class="titlebg" width="20%" colspan="2" align="center">', $txt['top_posters'], '</td>
        <td class="titlebg" width="24%" colspan="2" align="center">', $txt['top_starters'], '</td>
    </tr>
    <tr>
        <td class="windowbg2" width="14%" valign="top"><span class="smalltext"><b>', $txt['user'], '</b></span><br />';
            foreach ($context['top_posters'] as $poster)
        echo '
<img alt="" src="', $settings['images_url'], '/icons/online.gif', '" width="12" height="12" />
        <span class="smalltext">', $poster['link'], '</span><br />';
        echo '</td>
        <td class="windowbg2" valign="top" align="right" width="6%"><span class="smalltext"><b>', $txt['posts'], '</b></span><br />';
            foreach ($context['top_posters'] as $poster)   
        echo '
        <img alt="" src="', $settings['images_url'], '/icons/field_valid.gif" height="8" /> 
        <span class="smalltext">', $poster['num_posts'], '</span><br />';
        echo '</td>
        <td class="windowbg2" valign="top" width="18%"><span class="smalltext"><b>', $txt['user'], '</b></span><br />';
            foreach ($context['top_starters'] as $poster)
        echo '
        <img alt="" src="', $settings['images_url'], '/icons/online.gif', '" width="12" height="12" />
        <span class="smalltext">', $poster['link'], '</span><br />';
        echo '</td>
        <td class="windowbg2" valign="top" align="right" width="6%"><span class="smalltext"><b>', $txt['board_topics'], '</b></span><br />';
           foreach ($context['top_starters'] as $poster)
        echo '
        <img alt="" src="', $settings['images_url'], '/icons/field_valid.gif" height="8" />   
        <span class="smalltext">', $poster['num_topics'], '</span><br />';
        echo '</td>
    </tr>
</table>
</div>
</div>';
   
    //top stats finish. by www.gorselsanatlar.org

neverhurry

#1
2009 August 27, 12:37:29 am
Thank you, it is really nice of you to give me such suggestion. I tried it, but it is empty, maybe i should call the Subs-Recent.php once? Who knows?

Norv

#2
2009 August 27, 01:21:18 am
Do you have the mod installed?

Please try as bancherd suggested, to have the global variables declared, but there are more of them:
Code Select

// top stats collapse object.
  global $context, $txt,  $top_starters, $top_posters, $top_topic_views, $new_members, $settings;

at the beginning.

Then, I'm not sure, but I suspect you may need to display it in the place of recent posts on board index, that is, the block should be displayed on action=forum, for it to work. I would say to test it on action=forum, see if it works and whether there may be something missing. Then we can see about other actions.

feline

#3
2009 August 27, 01:33:56 am
All fields are empty .. Ithink, there is a db query missing ?  :-\

Fel
Many are stubborn in relation to the path, a few in relation to the target.

Norv

#4
2009 August 27, 01:39:04 am
The queries are in BoardIndex.php (put there by the mod). So I guess that for this block to work (as it is), the mod must be installed, and the block displaying the values ... would still work only where BoardIndex.php code gets called, and can fill the fields. (please note that the mod would do the displaying of values in BoardIndex.template.php).
Guess a code can be written though, to achieve the result elsewhere.

feline

#5
2009 August 27, 01:53:06 am
The data comming from a mod? If so, can you give me the link?

forget it .. I have found the link ... uahh  :D

Fel
Many are stubborn in relation to the path, a few in relation to the target.

feline

#6
2009 August 27, 04:05:11 am
I have look at this mod .. and it works now  :)
You can see it here, by click on PortaMx Forum Stats in the linkblock (top right).

And now the settings and the code:
1. create a new php block

2. make follow settings:
       Overflow action: none
       Inner padding: 0
       header: titlebg
       frame: tborder
       body: none
       bodytext none

3. copy the follow code in:
Code Select

// top stats start. by www.gorselsanatlar.org
// modify for a PortaMx PHP block by Feline
function TopStats()
{
   global $context, $smcFunc, $txt, $db_prefix, $scripturl, $modSettings;
         // Newest members top 10
   $members_result =  $smcFunc['db_query']('', '
      SELECT id_member, real_name, posts
      FROM {db_prefix}members
      ORDER BY id_member DESC
      LIMIT 10',
      array(
      )
   );
   $context['new_members'] = array();
   while ($row_members = $smcFunc['db_fetch_assoc']($members_result))
   {
      $context['new_members'][] = array(
         'name' => $row_members['real_name'],
         'id' => $row_members['id_member'],
         'href' => $scripturl . '?action=profile;u=' . $row_members['id_member'],
         'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['id_member'] . '">' . $row_members['real_name'] . '</a>'
      );
   }
   $smcFunc['db_free_result']($members_result);
   //// Newest members top 10 Finish
// Poster top 10.
$members_result = $smcFunc['db_query']('', '
SELECT id_member, real_name, posts
FROM {db_prefix}members
WHERE posts > {int:no_posts}
ORDER BY posts DESC
LIMIT 10',
array(
'no_posts' => 0,
)
);
$context['top_posters'] = array();
$max_num_posts = 1;
$context['MemberColor_ID_MEMBER'] = array();
while ($row_members = $smcFunc['db_fetch_assoc']($members_result))
{
$context['top_posters'][] = array(
'name' => $row_members['real_name'],
'id' => $row_members['id_member'],
'num_posts' => $row_members['posts'],
'href' => $scripturl . '?action=profile;u=' . $row_members['id_member'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['id_member'] . '">' . $row_members['real_name'] . '</a>'
);

if ($max_num_posts < $row_members['posts'])
$max_num_posts = $row_members['posts'];
if (!empty($modSettings['MemberColorStats']) && !empty($row_members['id_member']))
$context['MemberColor_ID_MEMBER'][$row_members['id_member']] = $row_members['id_member'];
}
$smcFunc['db_free_result']($members_result);

foreach ($context['top_posters'] as $i => $poster)
{
$context['top_posters'][$i]['post_percent'] = round(($poster['num_posts'] * 100) / $max_num_posts);
$context['top_posters'][$i]['num_posts'] = comma_format($context['top_posters'][$i]['num_posts']);
}

// Board top 10.
$boards_result = $smcFunc['db_query']('', '
SELECT id_board, name, num_posts
FROM {db_prefix}boards AS b
WHERE {query_see_board}' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
AND b.id_board != {int:recycle_board}' : '') . '
AND b.redirect = {string:blank_redirect}
ORDER BY num_posts DESC
LIMIT 10',
array(
'recycle_board' => $modSettings['recycle_board'],
'blank_redirect' => '',
)
);
$context['top_boards'] = array();
$max_num_posts = 1;
while ($row_board = $smcFunc['db_fetch_assoc']($boards_result))
{
$context['top_boards'][] = array(
'id' => $row_board['id_board'],
'name' => $row_board['name'],
'num_posts' => $row_board['num_posts'],
'href' => $scripturl . '?board=' . $row_board['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row_board['id_board'] . '.0">' . $row_board['name'] . '</a>'
);

if ($max_num_posts < $row_board['num_posts'])
$max_num_posts = $row_board['num_posts'];
}
$smcFunc['db_free_result']($boards_result);

foreach ($context['top_boards'] as $i => $board)
{
$context['top_boards'][$i]['post_percent'] = round(($board['num_posts'] * 100) / $max_num_posts);
$context['top_boards'][$i]['num_posts'] = comma_format($context['top_boards'][$i]['num_posts']);
}
// Are you on a larger forum?  If so, let's try to limit the number of topics we search through.
if ($modSettings['totalMessages'] > 100000)
{
$request = $smcFunc['db_query']('', '
SELECT id_topic
FROM {db_prefix}topics
WHERE num_replies != {int:no_replies}' . ($modSettings['postmod_active'] ? '
AND approved = {int:is_approved}' : '') . '
ORDER BY num_replies DESC
LIMIT 100',
array(
'no_replies' => 0,
'is_approved' => 1,
)
);
$topic_ids = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$topic_ids[] = $row['id_topic'];
$smcFunc['db_free_result']($request);
}
else
$topic_ids = array();
// Topic views top 10.
$topic_view_result = $smcFunc['db_query']('', '
SELECT m.subject, t.num_views, t.id_board, t.id_topic, b.name
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
AND b.id_board != {int:recycle_board}' : '') . ')
WHERE {query_see_board}' . (!empty($topic_ids) ? '
AND t.id_topic IN ({array_int:topic_list})' : ($modSettings['postmod_active'] ? '
AND t.approved = {int:is_approved}' : '')) . '
ORDER BY t.num_views DESC
LIMIT 10',
array(
'topic_list' => $topic_ids,
'recycle_board' => $modSettings['recycle_board'],
'is_approved' => 1,
)
);
$context['top_topics_views'] = array();
$max_num_views = 1;
while ($row_topic_views = $smcFunc['db_fetch_assoc']($topic_view_result))
{
censorText($row_topic_views['subject']);
$row_topic_views['subject'] = shorten_subject($row_topic_views['subject'], 18);
$context['top_topics_views'][] = array(
'id' => $row_topic_views['id_topic'],
'board' => array(
'id' => $row_topic_views['id_board'],
'name' => $row_topic_views['name'],
'href' => $scripturl . '?board=' . $row_topic_views['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row_topic_views['id_board'] . '.0">' . $row_topic_views['name'] . '</a>'
),
'subject' => $row_topic_views['subject'],
'num_views' => $row_topic_views['num_views'],
'href' => $scripturl . '?topic=' . $row_topic_views['id_topic'] . '.0',
'link' => '<a href="' . $scripturl . '?topic=' . $row_topic_views['id_topic'] . '.0">' . $row_topic_views['subject'] . '</a>'
);

if ($max_num_views < $row_topic_views['num_views'])
$max_num_views = $row_topic_views['num_views'];
}
$smcFunc['db_free_result']($topic_view_result);

foreach ($context['top_topics_views'] as $i => $topic)
{
$context['top_topics_views'][$i]['post_percent'] = round(($topic['num_views'] * 100) / $max_num_views);
$context['top_topics_views'][$i]['num_views'] = comma_format($context['top_topics_views'][$i]['num_views']);
}

// Try to cache this when possible, because it's a little unavoidably slow.
if (($members = cache_get_data('stats_top_starters', 360)) == null)
{
$request = $smcFunc['db_query']('', '
SELECT id_member_started, COUNT(*) AS hits
FROM {db_prefix}topics' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
WHERE id_board != {int:recycle_board}' : '') . '
GROUP BY id_member_started
ORDER BY hits DESC
LIMIT 10',
array(
'recycle_board' => $modSettings['recycle_board'],
)
);
$members = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$members[$row['id_member_started']] = $row['hits'];
$smcFunc['db_free_result']($request);

cache_put_data('stats_top_starters', $members, 360);
}

if (empty($members))
$members = array(0 => 0);

// Topic poster top 10.
$members_result = $smcFunc['db_query']('', '
SELECT id_member, real_name
FROM {db_prefix}members
WHERE id_member IN ({array_int:member_list})
ORDER BY FIND_IN_SET(id_member, {string:top_topic_posters})
LIMIT 10',
array(
'member_list' => array_keys($members),
'top_topic_posters' => implode(',', array_keys($members)),
)
);
$context['top_starters'] = array();
$max_num_topics = 1;
while ($row_members = $smcFunc['db_fetch_assoc']($members_result))
{
$context['top_starters'][] = array(
'name' => $row_members['real_name'],
'id' => $row_members['id_member'],
'num_topics' => $members[$row_members['id_member']],
'href' => $scripturl . '?action=profile;u=' . $row_members['id_member'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['id_member'] . '">' . $row_members['real_name'] . '</a>'
);

if ($max_num_topics < $members[$row_members['id_member']])
$max_num_topics = $members[$row_members['id_member']];
if (!empty($modSettings['MemberColorStats']))
$context['MemberColor_ID_MEMBER'][$row_members['id_member']] = $row_members['id_member'];
}
$smcFunc['db_free_result']($members_result);

foreach ($context['top_starters'] as $i => $topic)
{
$context['top_starters'][$i]['post_percent'] = round(($topic['num_topics'] * 100) / $max_num_topics);
$context['top_starters'][$i]['num_topics'] = comma_format($context['top_starters'][$i]['num_topics']);
}

//Yeah baby give me some colors =).
if (!empty($modSettings['MemberColorLinkInstalled']) && !empty($context['MemberColor_ID_MEMBER'])) {
$colorDatas = load_onlineColors($context['MemberColor_ID_MEMBER']);
$cmemcolid = null;
if (!empty($modSettings['MemberColorStats'])) {
// First the Top Posters =)
foreach($context['top_posters'] as $key => $value) {
$cmemcolid = $context['top_posters'][$key]['id'];
if(!empty($colorDatas[$cmemcolid]['colored_link']))
$context['top_posters'][$key]['link'] = $colorDatas[$cmemcolid]['colored_link'];
}
// First the Top Starter =)
foreach($context['top_starters'] as $key => $value) {
$cmemcolid = $context['top_starters'][$key]['id'];
if(!empty($colorDatas[$cmemcolid]['colored_link']))
$context['top_starters'][$key]['link'] = $colorDatas[$cmemcolid]['colored_link'];
}
}
if (!empty($modSettings['latestMember']) && !empty($modSettings['MemberColorLatestMember'])) {
if(!empty($colorDatas[$modSettings['latestMember']]['colored_link']))
$context['latest_member']['link'] = $colorDatas[$modSettings['latestMember']]['colored_link'];
}
}
}

// ----------------------------------------
// call topsstats and get last 23 topics
// ----------------------------------------
global  $context, $txt, $settings, $options, $user_info;
TopStats();
$latestPostOptions = array('number_posts' =>23);
$latest_posts = cache_quick_get('boardindex-latest_posts:' . md5($user_info['query_wanna_see_board'] . $user_info['language']), 'Subs-Recent.php', 'cache_getLastPosts', array($latestPostOptions));
loadLanguage('Stats');

// now output all the data...
echo '
<div style="margin:0 -1px ;">
<table border="0" width="101%" cellspacing="1" cellpadding="4">
    <tr>
        <td class="catbg" width="10%" colspan="2" align="center">', $txt['new'] ,' ', $txt['members_title'], '</td>
        <td class="catbg" width="24%" colspan="2" align="center">', $txt['top_topics_views'], '</td>
        <td class="catbg" width="66%" colspan="3" align="center">', $txt['recent_posts'], '</td>
    </tr>
    <tr>
        <td class="windowbg2" width="10%" colspan="2" valign="top"><span class="smalltext"><b>', $txt['user'], '</b></span><br />';
                  foreach ($context['new_members'] as $poster)
        {
         echo '
         <img alt="" src="', $settings['images_url'], '/icons/online.gif', '" width="16" height="12" />
        <span class="smalltext">',$poster['link'], '</span><br />';
        }
        echo '
        </td>
        <td class="windowbg2" width="18%" valign="top"><span class="smalltext"><b>', $txt['board_topics'], '</b></span><br />';
            foreach ($context['top_topics_views'] as $topic)
        echo '
        <img alt="" src="', $settings['images_url'], '/email_sm.gif', '" width="16" height="12"/>
        <span class="smalltext">', $topic['link'], '</span><br />';   
        echo '</td>
        <td class="windowbg2" width="6%" align="right" valign="top"><span class="smalltext"><b>', $txt['views'] ,'</b></span><br />';
            foreach ($context['top_topics_views'] as $topic)
        echo '
        <img alt="" src="', $settings['images_url'], '/icons/field_valid.gif" height="8" />       
        <span class="smalltext">', $topic['num_views'], '</span><br />';
        echo '</td>
        <td class="windowbg2" width="22%" rowspan="3" valign="top"><span class="smalltext"><b>', $txt['board_topics'], '</b></span><br />';
            if (!empty($latest_posts))
            foreach ($latest_posts as $post)
        echo '
        <img src="', $settings['images_url'], '/email_sm.gif', '" width="16" height="12" alt="" />
        <span class="smalltext"><a href="',$post['href'],'">', $post['short_subject'], '</a></span><br />';
        echo '</td>
        <td class="windowbg2" width="14%" rowspan="3" valign="top"><span class="smalltext"><b>', $txt['author'] ,'</b></span><br />';
            if (!empty($latest_posts))
            foreach ($latest_posts as $post)
        echo '
        <img alt="" src="', $settings['images_url'], '/icons/online.gif', '" width="16" height="12" />
        <span class="smalltext">', $post['poster']['link'], '</span><br />';
        echo'
        </td>
        <td class="windowbg2" width="20%" rowspan="3" valign="top"><span class="smalltext"><b>', $txt['date'] ,'</b></span><br />';
            if (!empty($latest_posts))
            foreach ($latest_posts as $post)
            echo '
            <img alt="" src="', $settings['images_url'], '/icons/calendar.gif', '" width="16" height="12" />
            <span class="smalltext">', $post['time'], '</span><br />';
        echo '</td>
    </tr>
    <tr>
        <td class="catbg" width="20%" colspan="2" align="center">', $txt['top_posters'], '</td>
        <td class="catbg" width="24%" colspan="2" align="center">', $txt['top_starters'], '</td>
    </tr>
    <tr>
        <td class="windowbg2" width="14%" valign="top"><span class="smalltext"><b>', $txt['user'], '</b></span><br />';
            foreach ($context['top_posters'] as $poster)
        echo '
<img alt="" src="', $settings['images_url'], '/icons/online.gif', '" width="16" height="12" />
        <span class="smalltext">', $poster['link'], '</span><br />';
        echo '</td>
        <td class="windowbg2" valign="top" align="right" width="6%"><span class="smalltext"><b>', $txt['posts'], '</b></span><br />';
            foreach ($context['top_posters'] as $poster)   
        echo '
        <img alt="" src="', $settings['images_url'], '/icons/field_valid.gif" height="8" /> 
        <span class="smalltext">', $poster['num_posts'], '</span><br />';
        echo '</td>
        <td class="windowbg2" valign="top" width="18%"><span class="smalltext"><b>', $txt['user'], '</b></span><br />';
            foreach ($context['top_starters'] as $poster)
        echo '
        <img alt="" src="', $settings['images_url'], '/icons/online.gif', '" width="16" height="12" />
        <span class="smalltext">', $poster['link'], '</span><br />';
        echo '</td>
        <td class="windowbg2" valign="top" align="right" width="6%"><span class="smalltext"><b>', $txt['board_topics'], '</b></span><br />';
           foreach ($context['top_starters'] as $poster)
        echo '
        <img alt="" src="', $settings['images_url'], '/icons/field_valid.gif" height="8" />   
        <span class="smalltext">', $poster['num_topics'], '</span><br />';
        echo '</td>
    </tr>
</table>
</div>';


Fel
Many are stubborn in relation to the path, a few in relation to the target.

Norv

#7
2009 August 27, 11:33:55 am
Cheers, it works like a charm, of course!
*is considering using it too...*

neverhurry

#8
2009 August 27, 12:32:03 pm
WOW, you are splendid...  O0 O0 O0 :)) THANK YOU!!!

neverhurry

#9
2009 August 29, 12:06:31 pm
Hello, this block is so good and so important, i recommend to every admin....
I would be very grateful if someone can tell me how to add to this great block 10 latest articles short subjects with auther and date from PMXBlog, it seems there is no place to put them inside, maybe i can sacrifice 10 new members, thank you in advance.

I really love PortaMX and PMXBlog.

Cool

#10
2009 August 29, 12:34:11 pm
that will be very easy to extend the queries for the blog. but this should be done when the new blog module comes out.
 |I Use: SMF 2.0.5 | PortaMx 1.51
Q: What do you do when you see a bear in the woods?
A: Play Dead!
H-A-H-L = Happy Admins Have Linux

neverhurry

#11
2009 August 29, 07:44:14 pm
Quote from: neverhurry ,  2009 August 29, 12:06:31 pm
Hello, this block is so good and so important, i recommend to every admin....
I would be very grateful if someone can tell me how to add to this great block 10 latest articles short subjects with auther and date from PMXBlog, it seems there is no place to put them inside, maybe i can sacrifice 10 new members, thank you in advance.

I really love PortaMX and PMXBlog.


I think again, 10 latest articles info should include the short subject, last author (who writes the comment) and the last date. thanks!

feline

#12
2009 August 30, 01:54:35 pm
As i say in a other tread ... PmxBlog comes with a PmxBlog_SSI.
For now wha have a function for "recent" Articles, they show the n latest articles and unread articles/comments in the same format as recent posts ...

Fel
Many are stubborn in relation to the path, a few in relation to the target.

neverhurry

#13
2009 August 30, 01:58:36 pm
Quote from: feline ,  2009 August 30, 01:54:35 pm
As i say in a other tread ... PmxBlog comes with a PmxBlog_SSI.
For now wha have a function for "recent" Articles, they show the n latest articles and unread articles/comments in the same format as recent posts ...

Fel


Thanks, that is great. But I don't know SSI very well, would like to learn to use it.

neverhurry

#14
2009 August 31, 06:55:06 pm
Quote from: feline ,  2009 August 30, 01:54:35 pm
As i say in a other tread ... PmxBlog comes with a PmxBlog_SSI.
For now wha have a function for "recent" Articles, they show the n latest articles and unread articles/comments in the same format as recent posts ...

Fel


Dear Fel,

i can not wait already. Could you please tell me where the PmxBlog_SSI file is? and Could you please give me an example how to use this file? I do have a basic PHP knowledge. Many thanks in advance. Hoping the new release is on the way. My best wishes.

Cool

#15
2009 August 31, 07:08:52 pm
the PmxBlog_SSI comes with the new release it don´t exists in the old release.
 |I Use: SMF 2.0.5 | PortaMx 1.51
Q: What do you do when you see a bear in the woods?
A: Play Dead!
H-A-H-L = Happy Admins Have Linux

feline

#16
2009 August 31, 07:11:45 pm
Quote from: Cool ,  2009 August 31, 07:08:52 pm
the PmxBlog_SSI comes with the new release it don´t exists in the old release.

True ...  ;)
Many are stubborn in relation to the path, a few in relation to the target.

neverhurry

#17
2009 September 04, 09:39:26 pm
 :-\ :'( :'(

mosc63

#18
2009 September 30, 05:38:49 pm
hello.
can add Latest Topics in Forum Statistics?

thanks

feline

#19
2009 September 30, 07:13:18 pm
I don't known what you mean ..

Fel
Many are stubborn in relation to the path, a few in relation to the target.

mosc63

#20
2009 September 30, 07:33:23 pm
excuse me
I want to insert after Forum Stats the "last post"
as in your link https://www.portamx.com/Forumstats_/
possible?

thanks

feline

#21
2009 September 30, 10:33:05 pm
You mean a link to the "big statistics"?

A description for the statistic block you find here:
https://www.portamx.com/english-support/how-to-make-a-php-block/msg5910/#msg5910

In the stats block you have to insert a link to the page.
(File /Sources/PortaMx/Class/statistics.php)

Fel
Many are stubborn in relation to the path, a few in relation to the target.

mosc63

#22
2009 October 01, 01:24:37 am
Please do not understand how you can help me?
My brother can not help you out.
thanks



after MSCT Forum Statistic, attack last 10 posts. you explain thanks  :(


feline

#23
2009 October 01, 10:44:23 am
Quote from: mosc63 ,  2009 October 01, 01:24:37 am
Please do not understand how you can help me?

Sorry .. no.
A sample image or what else would help ..

Fel
Many are stubborn in relation to the path, a few in relation to the target.

mosc63

#24
2009 October 01, 01:59:14 pm
ok PortaMX so good I understand how it works thanks and excuse me for problems....   O0