Advertisement:

Author Topic: SimplePortal  (Read 1503143 times)

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: SimplePortal
« Reply #480 on: May 24, 2008, 07:12:59 AM »
did now check out Modsettings is working ,

But arcade is again a error.

Now check out http://forum.itacumens.com and let me know i will uncheck the arcade block

Your arcade version is completely different from the SMF Arcade. If you can find the block codes for your arcade mod, I can adapt it to the SimplePortal.

And delete the SPortal.template.php from dilbermc theme or change it with the one in v1.2.
Former SMF Core Developer | My Mods | SimplePortal

Offline Sudhakar Arjunan

  • Sophist Member
  • *****
  • Posts: 1,227
  • Gender: Male
  • SMF is the best forum tool
    • IT Acumens - Webdesigning & Webhositing services in Chennai
Re: SimplePortal
« Reply #481 on: May 24, 2008, 07:14:11 AM »
Arcade Error Message,

Database Error
Unknown column 'game.gameName' in 'field list'
File: /home/itacumen/public_html/forum/Sources/SPortal.php
Line: 861

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.5, while your database is at version 1.1.1. The above error might possibly go away if you execute the latest version of upgrade.php.

Others were okie, But no avatar in top posters list.
Hope i have to enable some options will check it out and Thanks for the excellent Portal SiNaN and your excellent support too.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Offline Sudhakar Arjunan

  • Sophist Member
  • *****
  • Posts: 1,227
  • Gender: Male
  • SMF is the best forum tool
    • IT Acumens - Webdesigning & Webhositing services in Chennai
Re: SimplePortal
« Reply #482 on: May 24, 2008, 07:21:24 AM »

And delete the SPortal.template.php from dilbermc theme or change it with the one in v1.2.

I did and now i could see the avatar near Posters name.
Really cool, And i have a doubt if you could help me.
Could i uninstall this "Arcade " and install smf common arcade. then all games and scores will be there or deleted.

Then we will cont doing it.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: SimplePortal
« Reply #483 on: May 24, 2008, 09:33:38 AM »
Will give answer to the questions tomorrow. Now I should go.
Former SMF Core Developer | My Mods | SimplePortal

Offline markvon

  • Semi-Newbie
  • *
  • Posts: 47
Re: SimplePortal
« Reply #484 on: May 24, 2008, 12:05:14 PM »
I have a question... am i able to customise SP blocks? For example, instead of Top Poll, can i change it to be Downloads, and add a download link to it?

Offline TW1ST3D

  • Jr. Member
  • **
  • Posts: 178
    • The Georgia LX Club
Re: SimplePortal
« Reply #485 on: May 24, 2008, 04:49:15 PM »
[SiNaN],

Thanks Again for this Great Mod !! It should be in everyones top 10 must have mods !!

I have another Question . How would I change the size of the input boxes on the Portal Settings Page?
I need them much bigger.

these are the ones I'm needing bigger.....

Running 2.0 Gold.......SMF Rocks!!

Offline TW1ST3D

  • Jr. Member
  • **
  • Posts: 178
    • The Georgia LX Club
Re: SimplePortal
« Reply #486 on: May 24, 2008, 04:52:44 PM »
Oh and here are a few screenshots of how my portal is being used.................

Running 2.0 Gold.......SMF Rocks!!

Offline cleanfiles

  • Semi-Newbie
  • *
  • Posts: 94
Re: SimplePortal
« Reply #487 on: May 24, 2008, 08:49:12 PM »
Hello again,
One little problem I have try as I might I just cant seem to work it out, when members are viewing the portal only, they don't show up as online in the forum. They are online in the portal but until they go to the forum they don't even show as guests.
This is also the case for my custom pages, ie. if a member is in the portal or on a custom page and don't have any forum pages open they don't show up as online at the bottom of the forum. I hope I have made myself clear enough lol.

Offline samurai-lupin

  • Full Member
  • ***
  • Posts: 522
Re: SimplePortal
« Reply #488 on: May 25, 2008, 03:46:14 AM »
Hello,

I think your Portal has some great add ons. As I am using Joomla I unfortunately can't use it on my forum. However I wondered what I would need to change in my ssi.php in order to have

ssi_topposters display Avatar Thumbs like on your portal

Also, is it possible to implement your sp_shop function into my ssi.php so I can display the most recnet purchases?

Thank you!

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: SimplePortal
« Reply #489 on: May 25, 2008, 04:01:15 AM »
I have a question... am i able to customise SP blocks? For example, instead of Top Poll, can i change it to be Downloads, and add a download link to it?

You can modify only from the files SPortal.php and SPortal.template.php. For now, it is not automated.

[SiNaN],

Thanks Again for this Great Mod !! It should be in everyones top 10 must have mods !!

I have another Question . How would I change the size of the input boxes on the Portal Settings Page?
I need them much bigger.

these are the ones I'm needing bigger.....

../Sources/ModSettings.php

Find:

Code: [Select]
array('text', 'aannouncetext'),
Replace:

Code: [Select]
array('large_text', 'aannouncetext'),
Note: Do not forget this change as it will give error during uninstall.

Hello again,
One little problem I have try as I might I just cant seem to work it out, when members are viewing the portal only, they don't show up as online in the forum. They are online in the portal but until they go to the forum they don't even show as guests.
This is also the case for my custom pages, ie. if a member is in the portal or on a custom page and don't have any forum pages open they don't show up as online at the bottom of the forum. I hope I have made myself clear enough lol.

I think we should use writeLog(). I'll look at it and give an answer. Please remind it later.


And delete the SPortal.template.php from dilbermc theme or change it with the one in v1.2.

I did and now i could see the avatar near Posters name.
Really cool, And i have a doubt if you could help me.
Could i uninstall this "Arcade " and install smf common arcade. then all games and scores will be there or deleted.

Then we will cont doing it.

If the link you gave before is the one you use in your site, I'll try to code the block for it.

Hello,

I think your Portal has some great add ons. As I am using Joomla I unfortunately can't use it on my forum. However I wondered what I would need to change in my ssi.php in order to have

ssi_topposters display Avatar Thumbs like on your portal

Also, is it possible to implement your sp_shop function into my ssi.php so I can display the most recnet purchases?

Thank you!

This is the code for the Top Poster function:

Code: [Select]
function sp_topPoster($topNumber = 5)
{
global $db_prefix, $scripturl, $memberContext, $txt, $settings, $modSettings, $top_posters, $top_poster_id, $list_no;

if ($topNumber === null)
$topNumber = isset($_GET['limit']) ? (int) $_GET['limit'] : 5;

$list_no=1;

// Find the latest poster.
$request = db_query("
SELECT m.ID_MEMBER, m.realName, m.posts, m.avatar, a.ID_ATTACH, a.attachmentType, a.filename
FROM ({$db_prefix}members as m)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = m.ID_MEMBER)
ORDER BY posts DESC
LIMIT $topNumber", __FILE__, __LINE__);
$top_posters = array();
$colorids = array();
while ($row = mysql_fetch_assoc($request)) {
if (stristr($row['avatar'], 'http://') && !empty($modSettings['avatar_check_size']))
{
$sizes = url_image_size($row['avatar']);

// Does your avatar still fit the maximum size?
if ($modSettings['avatar_action_too_large'] == 'option_refuse' && is_array($sizes) && (($sizes[0] > $modSettings['avatar_max_width_external'] && !empty($modSettings['avatar_max_width_external'])) || ($sizes[1] > $modSettings['avatar_max_height_external'] && !empty($modSettings['avatar_max_height_external']))))
{
// Fix it permanently!
$row['avatar'] = '';
updateMemberData($row['ID_MEMBER'], array('avatar' => '\'\''));
}
}

//Collect the ids
$colorids[$row['ID_MEMBER']] = $row['ID_MEMBER'];

$top_posters[] = array(
'list' => $list_no++,
'id' => $row['ID_MEMBER'],
'name' => $row['realName'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>',
'posts' => $row['posts'],
'avatar' => array(
'name' => $row['avatar'],
'image' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '" alt="" class="avatar" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar" border="0" />'),
'href' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
)
);
}
mysql_free_result($request);

//Add Colors to the link :)
if(!empty($colorids)) {
global $color_profile;
sp_loadColors($colorids);
foreach($top_posters as $k => $p) {
$profile = $color_profile[$p['id']];
if(!empty($profile)) {
$top_posters[$k]['link'] = $profile['link'];
}
}
}

echo '<table>';
foreach ($top_posters as $member)
{
if (!empty($member['avatar']['href']))
echo ' <tr>
<td>' . $member['list'] . '-</td>
<td><img src="' . $member['avatar']['href'] . '" alt="" width="35" /></td><td>&nbsp;</td>
<td>' . $member['link'] . '<br />' . $member['posts'] . $txt['sp-tposterpost'] . '</td>
</tr>';
else
echo ' <tr>
<td>' . $member['list'] . '-</td>
<td>&nbsp;</td><td>&nbsp;</td>
<td>' . $member['link'] . '<br />' . $member['posts'] . $txt['sp-tposterpost'] . '</td>
</tr>';
}
echo '</table>';

}

And this is the Recent Purchase code:

Code: [Select]
function sp_shop()
{
global $db_prefix, $context;

// Grab the purchase history
// Start with empty list
$context['shop_purchHis'] = array();
// Get the details of purchases
$request = db_query("
SELECT ownerid, itemid, amtpaid, it.desc, it.image, it.id
FROM {$db_prefix}shop_purchHis, {$db_prefix}shop_items AS it
WHERE itemid = it.id
ORDER BY ownerid DESC
LIMIT 20", __FILE__, __LINE__);
// Loop through all results
while ($row = mysql_fetch_array($request, MYSQL_ASSOC))
// And add them to the list
$context['shop_purchHis'][] = array(
'ownerid' => $row['ownerid'],
'itemid' => $row['itemid'],
'amtpaid' => $row['amtpaid'],
'desc' => $row['desc'],
'image' => $row['image']
);

mysql_free_result($request);

if (!empty($context['shop_purchHis'])) {
echo '
<td class="smalltext" height="100%" valign="top" align="center" style="line-height: 1.3;">
';
foreach ($context['shop_purchHis'] as $row)
echo "<img src='{$boardurl}/Sources/shop/item_images/{$row['image']}'title='{$row['desc']}'>&nbsp;&nbsp;";
}
else
echo '<td>Nothing is purchased.';
}

For the recent purchase, you should have been installed the Shop Stats Mod before  to use it.

http://www.daniel15.com/forum/index.php/topic,1219.0.html
Former SMF Core Developer | My Mods | SimplePortal

Offline samurai-lupin

  • Full Member
  • ***
  • Posts: 522
Re: SimplePortal
« Reply #490 on: May 25, 2008, 06:40:05 AM »
Hello SiNaN,

thank you very much for your advice. It works great on my forum! Looks fantastic.

May I please ask you for one more piece of advice?

I'm using a ssi_recenttopics function call on my frontpage. I would like to display the poster avtars next to the poster name.

Unfortunately I oculd not figure out how to do this. Could you maybe please let me know what code I would need to add for displaying the avatars?

Thank you!

Code: [Select]
// Recent topic list:   [board] Subject by Poster Date
function ssi_recentTopicsMain($num_recent = 10, $exclude_boards = null, $output_method = 'echo', $include_boards = null, $limit_days = null, $member_id = null)
{
global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER;
global $user_info, $modSettings, $func;

if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
$exclude_boards = array($modSettings['recycle_board']);
else
$exclude_boards = empty($exclude_boards) ? array() : $exclude_boards;

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$extravalues = '';
if ($output_method == 'extended') {
// get all the extra information about topics, so we can send them to Recent.template.php later
$extravalues = "ms.subject AS firstSubject, ms.posterTime AS firstPosterTime, ms.ID_TOPIC, t.ID_BOARD, b.name AS bname,
t.numReplies, t.numViews, ms.ID_MEMBER AS ID_FIRST_MEMBER, m.ID_MEMBER AS ID_LAST_MEMBER,
m.posterTime AS lastPosterTime, memfp.realName AS firstPosterName,
mem.realName AS lastPosterName, m.subject AS lastSubject,
m.icon AS lastIcon, ms.icon AS firstIcon, t.ID_POLL, t.isSticky, t.locked, m.modifiedTime AS lastModifiedTime,
" . (!$user_info['is_guest'] ? "
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from," : '') . " LEFT(m.body, 384) AS lastBody, LEFT(ms.body, 384) AS firstBody,
m.smileysEnabled AS lastSmileys, ms.smileysEnabled AS firstSmileys, t.ID_FIRST_MSG, t.ID_LAST_MSG, ";
}
$request = db_query("
SELECT {$extravalues}
m.posterTime, ms.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, b.ID_BOARD, b.name AS bName,
IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 AS new_from' : '
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) >= m.ID_MSG_MODIFIED AS isRead,
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ", LEFT(m.body, 384) AS body, m.smileysEnabled, m.icon
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ms)
LEFT JOIN {$db_prefix}members AS memfp ON (memfp.ID_MEMBER = ms.ID_MEMBER)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? "
LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = b.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . "
WHERE t.ID_LAST_MSG >= " . (isset($limit_days) ? '0' : ($modSettings['maxMsgID'] - 35 * min($num_recent, 5))) . "
AND t.ID_LAST_MSG = m.ID_MSG
AND b.ID_BOARD = t.ID_BOARD" . (empty($exclude_boards) ? '' : "
AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . (!empty($include_boards) ? "
AND b.ID_BOARD IN (" . implode(', ', $include_boards) . ")"  : '') . (isset($limit_days) ? "
AND m.posterTime > " . (time() - ($limit_days*24*60*60)) : '') . (!empty($member_id) ? "
AND m.ID_MEMBER = {$member_id}" : '') . "
AND $user_info[query_see_board]
AND ms.ID_MSG = t.ID_FIRST_MSG
ORDER BY " . ($output_method == 'extended' && isset($_REQUEST['sort']) ? (
$_REQUEST['sort'] . ($context['ascending'] ? '' : ' DESC')) : ("t.ID_LAST_MSG DESC")) . "
LIMIT " . (($output_method == 'extended' && isset($_REQUEST['start']) && isset($_REQUEST['action']) && $_REQUEST['action'] == 'recenttopics' && is_numeric($_REQUEST['start'])) ? ($_REQUEST['start'].', ') : ('')) . $num_recent, __FILE__, __LINE__);
$posts = array();
while ($row = mysql_fetch_assoc($request))
{
// this puts the extended topic information into $context['topics']. it's copied from Recent.php and can be used by template_unread() in Recent.template.php
if ($output_method == 'extended') {
//set these variables so there will be no undefined indexes
$context['querystring_board_limits'] = '';
$context['sort_by'] = '';

if ($row['ID_POLL'] > 0 && $modSettings['pollMode'] == '0')
continue;

$topic_ids[] = $row['ID_TOPIC'];

// Clip the strings first because censoring is slow :/. (for some reason?)
$row['firstBody'] = strip_tags(strtr(parse_bbc($row['firstBody'], $row['firstSmileys'], $row['ID_FIRST_MSG']), array('<br />' => '&#10;')));
if ($func['strlen']($row['firstBody']) > 128)
$row['firstBody'] = $func['substr']($row['firstBody'], 0, 128) . '...';
$row['lastBody'] = strip_tags(strtr(parse_bbc($row['lastBody'], $row['lastSmileys'], $row['ID_LAST_MSG']), array('<br />' => '&#10;')));
if ($func['strlen']($row['lastBody']) > 128)
$row['lastBody'] = $func['substr']($row['lastBody'], 0, 128) . '...';

// Do a bit of censoring...
censorText($row['firstSubject']);
censorText($row['firstBody']);

// But don't do it twice, it can be a slow ordeal!
if ($row['ID_FIRST_MSG'] == $row['ID_LAST_MSG'])
{
$row['lastSubject'] = $row['firstSubject'];
$row['lastBody'] = $row['firstBody'];
}
else
{
censorText($row['lastSubject']);
censorText($row['lastBody']);
}

// Decide how many pages the topic should have.
$topic_length = $row['numReplies'] + 1;
if ($topic_length > $modSettings['defaultMaxMessages'])
{
$tmppages = array();
$tmpa = 1;
for ($tmpb = 0; $tmpb < $topic_length; $tmpb += $modSettings['defaultMaxMessages'])
{
$tmppages[] = '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.' . $tmpb . ';topicseen">' . $tmpa . '</a>';
$tmpa++;
}
// Show links to all the pages?
if (count($tmppages) <= 5)
$pages = '&#171; ' . implode(' ', $tmppages);
// Or skip a few?
else
$pages = '&#171; ' . $tmppages[0] . ' ' . $tmppages[1] . ' ... ' . $tmppages[count($tmppages) - 2] . ' ' . $tmppages[count($tmppages) - 1];

if (!empty($modSettings['enableAllMessages']) && $topic_length < $modSettings['enableAllMessages'])
$pages .= ' &nbsp;<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0;all">' . $txt[190] . '</a>';
$pages .= ' &#187;';
}
else
$pages = '';

// We need to check the topic icons exist... you can never be too sure!
if (empty($modSettings['messageIconChecks_disable']))
{
// First icon first... as you'd expect.
if (!isset($context['icon_sources'][$row['firstIcon']]))
$context['icon_sources'][$row['firstIcon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['firstIcon'] . '.gif') ? 'images_url' : 'default_images_url';
// Last icon... last... duh.
if (!isset($context['icon_sources'][$row['lastIcon']]))
$context['icon_sources'][$row['lastIcon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['lastIcon'] . '.gif') ? 'images_url' : 'default_images_url';
}

// And build the array.
$context['topics'][$row['ID_TOPIC']] = array(
'id' => $row['ID_TOPIC'],
'first_post' => array(
'id' => $row['ID_FIRST_MSG'],
'member' => array(
'name' => $row['firstPosterName'],
'id' => $row['ID_FIRST_MEMBER'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'],
'link' => !empty($row['ID_FIRST_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['firstPosterName'] . '">' . $row['firstPosterName'] . '</a>' : $row['firstPosterName']
),
'time' => timeformat($row['firstPosterTime']),
'timestamp' => forum_time(true, $row['firstPosterTime']),
'subject' => $row['firstSubject'],
'preview' => $row['firstBody'],
'icon' => $row['firstIcon'],
'icon_url' => $settings[$context['icon_sources'][$row['firstIcon']]] . '/post/' . $row['firstIcon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0;topicseen',
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0;topicseen">' . $row['firstSubject'] . '</a>'
),
'last_post' => array(
'id' => $row['ID_LAST_MSG'],
'member' => array(
'name' => $row['lastPosterName'],
'id' => $row['ID_LAST_MEMBER'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_LAST_MEMBER'],
'link' => !empty($row['ID_LAST_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_LAST_MEMBER'] . '">' . $row['lastPosterName'] . '</a>' : $row['lastPosterName']
),
'time' => timeformat($row['lastPosterTime']),
'timestamp' => forum_time(true, $row['lastPosterTime']),
'subject' => $row['lastSubject'],
'preview' => $row['lastBody'],
'icon' => $row['lastIcon'],
'icon_url' => $settings[$context['icon_sources'][$row['lastIcon']]] . '/post/' . $row['lastIcon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['ID_LAST_MSG']) . ';topicseen#msg' . $row['ID_LAST_MSG'],
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['ID_LAST_MSG']) . ';topicseen#msg' . $row['ID_LAST_MSG'] . '">' . $row['lastSubject'] . '</a>'
),
'new_from' => $row['new_from'],
'new_href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['new_from'] . ';topicseen#new',
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['new_from']) . ';topicseen' . ($row['numReplies'] == 0 ? '' : 'new'),
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['new_from']) . ';topicseen#msg' . $row['new_from'] . '">' . $row['firstSubject'] . '</a>',
'is_read' => $row['isRead'],
'is_sticky' => !empty($modSettings['enableStickyTopics']) && !empty($row['isSticky']),
'is_locked' => !empty($row['locked']),
'is_poll' => $modSettings['pollMode'] == '1' && $row['ID_POLL'] > 0,
'is_hot' => $row['numReplies'] >= $modSettings['hotTopicPosts'],
'is_very_hot' => $row['numReplies'] >= $modSettings['hotTopicVeryPosts'],
'is_posted_in' => false,
'icon' => $row['firstIcon'],
'icon_url' => $settings[$context['icon_sources'][$row['firstIcon']]] . '/post/' . $row['firstIcon'] . '.gif',
'subject' => $row['firstSubject'],
'pages' => $pages,
'replies' => $row['numReplies'],
'views' => $row['numViews'],
'board' => array(
'id' => $row['ID_BOARD'],
'name' => $row['bname'],
'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bname'] . '</a>'
)
);

determineTopicClass($context['topics'][$row['ID_TOPIC']]);
}
else {
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileysEnabled'], $row['ID_MSG']), array('<br />' => '&#10;')));
if ($func['strlen']($row['body']) > 128)
$row['body'] = $func['substr']($row['body'], 0, 128) . '...';

// Censor the subject.
censorText($row['subject']);
censorText($row['body']);

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

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['ID_BOARD'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['ID_TOPIC'],
'poster' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['posterName'],
'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'avatar' => $row['avatar'],
'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => shorten_subject($row['subject'], 25),
'preview' => $row['body'],
'time' => timeformat($row['posterTime']),
'timestamp' => forum_time(true, $row['posterTime']),
'raw_timestamp' => $row['posterTime'],
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['isRead']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
);
}
}
mysql_free_result($request);

// Just return it.
if ($output_method != 'echo' || empty($posts))
return $posts;

echo '
<table border="0" cellpadding=0 cellspacing=0><tr><td colspan=5><table width=100% cellpadding=2 cellspacing=0><tr><td height=21 valign=middle background="http://www.detektorforum.de/templates/rhuk_solarflare_ii/images/subhead_bg.png"><font face=verdana,arial style="color: #666666; font-size: 10px;"><b> NEUESTE FORUM THEMEN</b></td></tr></table></td></tr>';
foreach ($posts as $post)
echo '
<tr>
<td valign=top>', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" hspace=2 vspace=2 /></a>', ' </td>
<td align="right" valign="top">
<i>', $post['board']['link'], ' </i>
</td>
<td width=3></td>
<td valign="top">
<a href="', $post['href'], '">', $post['subject'], '</a></b><br>
', $txt[525], ' <i>', $post['poster']['link'], '</i>

</td>
<td valign=top>



</td>
</tr><tr><td colspan=5 height=2></td></tr>';
echo '
</table>';
}

Offline Sudhakar Arjunan

  • Sophist Member
  • *****
  • Posts: 1,227
  • Gender: Male
  • SMF is the best forum tool
    • IT Acumens - Webdesigning & Webhositing services in Chennai
Re: SimplePortal
« Reply #491 on: May 25, 2008, 11:55:42 AM »
Quote
Quote
And delete the SPortal.template.php from dilbermc theme or change it with the one in v1.2.
    I did and now i could see the avatar near Posters name.
    Really cool, And i have a doubt if you could help me.
    Could i uninstall this "Arcade " and install smf common arcade. then all games and scores will be there or deleted.

    Then we will cont doing it.

If the link you gave before is the one you use in your site, I'll try to code the block for it.

Yes your are right SiNaN, could you help me Out if possible.
http://www.simplemachines.org/community/index.php?topic=227599.msg1542972#msg1542972
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Offline cleanfiles

  • Semi-Newbie
  • *
  • Posts: 94
Re: SimplePortal
« Reply #492 on: May 25, 2008, 09:06:20 PM »
Ok I looked up "writeLog()" and this sounds like something that might help me, but I don't know where to add it.
I will do some more research on this, but if you could point me in the right direction that would be good too lol. 

Offline erisa

  • Semi-Newbie
  • *
  • Posts: 56
    • bingbingboom
Re: SimplePortal
« Reply #493 on: May 26, 2008, 07:57:21 AM »
Hi

I'm using SMF 1.1.5 with Tinyportal.

1. Execute Modification ./index.php Test failed
2. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Test successful
3. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
4. Execute Modification ./Themes/default/languages/Who.english-utf-8.php Skipping file
5. Execute Modification ./Themes/default/languages/Who.english.php Test successful
6. Execute Modification ./Sources/Load.php Test failed
7. Execute Modification ./Sources/ModSettings.php Test successful
8. Execute Modification ./Themes/default/index.template.php Test successful
9. Extract File ./Sources/SPortal.php 
10. Extract File ./Themes/default/SPortal.template.php 
11. Extract File ./Themes/default/languages/SPortal.english.php 
12. Extract File ./Themes/default/languages/SPortal.english-utf8.php 
13. Extract File ./Themes/default/images/arrow.gif 
14. Extract File ./Themes/default/images/dot.gif 
15. Execute Code database.php


I fear to apply the mod due to the above red markings. Can someone help?

Offline tfalbb

  • Semi-Newbie
  • *
  • Posts: 37
Re: SimplePortal
« Reply #494 on: May 26, 2008, 08:13:52 AM »
Mod seemed to install fine on SMF 1.14, but I don't get the Portal Settings button in the admin panel. Any ideas?

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: SimplePortal
« Reply #495 on: May 26, 2008, 08:25:53 AM »
If the link you gave before is the one you use in your site, I'll try to code the block for it.

Yes your are right SiNaN, could you help me Out if possible.
http://www.simplemachines.org/community/index.php?topic=227599.msg1542972#msg1542972

Will look at it, but do not hurry that much.

Ok I looked up "writeLog()" and this sounds like something that might help me, but I don't know where to add it.
I will do some more research on this, but if you could point me in the right direction that would be good too lol. 

In your custom pages just include the Subs.php and add writeLog() somewhere. But I didn't see such a problem in the portal. Are you sure that it is same for portal?

Hi

I'm using SMF 1.1.5 with Tinyportal.

1. Execute Modification ./index.php Test failed
2. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Test successful
3. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
4. Execute Modification ./Themes/default/languages/Who.english-utf-8.php Skipping file
5. Execute Modification ./Themes/default/languages/Who.english.php Test successful
6. Execute Modification ./Sources/Load.php Test failed
7. Execute Modification ./Sources/ModSettings.php Test successful
8. Execute Modification ./Themes/default/index.template.php Test successful
9. Extract File ./Sources/SPortal.php 
10. Extract File ./Themes/default/SPortal.template.php 
11. Extract File ./Themes/default/languages/SPortal.english.php 
12. Extract File ./Themes/default/languages/SPortal.english-utf8.php 
13. Extract File ./Themes/default/images/arrow.gif 
14. Extract File ./Themes/default/images/dot.gif 
15. Execute Code database.php


I fear to apply the mod due to the above red markings. Can someone help?

You can not use it with TinyPortal as they do the same thing but TinyPortal is the elder brother of SimplePortal.

Mod seemed to install fine on SMF 1.14, but I don't get the Portal Settings button in the admin panel. Any ideas?

What is your forums language?
Former SMF Core Developer | My Mods | SimplePortal

Offline erisa

  • Semi-Newbie
  • *
  • Posts: 56
    • bingbingboom
Re: SimplePortal
« Reply #496 on: May 26, 2008, 08:34:15 AM »
I see.. got it. thanks!

Offline tfalbb

  • Semi-Newbie
  • *
  • Posts: 37
Re: SimplePortal
« Reply #497 on: May 26, 2008, 08:36:44 AM »
Mod seemed to install fine on SMF 1.14, but I don't get the Portal Settings button in the admin panel. Any ideas?

What is your forums language?

English

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: SimplePortal
« Reply #498 on: May 26, 2008, 08:38:26 AM »
Former SMF Core Developer | My Mods | SimplePortal

Offline tfalbb

  • Semi-Newbie
  • *
  • Posts: 37
Re: SimplePortal
« Reply #499 on: May 26, 2008, 09:01:02 AM »
English

Wow, interesting. Does this link work for you?

http://yoursiteadress/index.php?action=featuresettings;sa=sportal;

Yes it gets me to the settings page, but as you can see from the screenshot the Simple Portal tab is blank when I use that link. It doesn't show at all when I use the normal method of accessing the admin panel.