SimplePortal

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

Previous topic - Next topic

[SiNaN]

Quote from: vinod41 on April 20, 2008, 01:41:47 AM
Hello Sinan,

yes its charset=UTF-8, forum button is not displaying text as well

The attached package is for you. It only contains the needed language edits for utf-8 language. Install this, and it should work.

taogem, I do not know anything about the smf for free but here is the package and the codes. If you can install, install it.
Former SMF Core Developer | My Mods | SimplePortal

Eliana Tamerin

You don't. SMF For Free would need to install the mod manually on your forum, and make it compatible with their standards. I highly doubt that's going to happen.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

vinod41

hi
still no luck....

however i've alreay copied language codes in ModSettings.english-utf8.php   manually...
though restoring it and after adding your mod getting this on top of page.
when i upload SPortal.english-utf8.php file from the mod u attached.


��<�?�p�h�p� � �/�/� �V�e�r�s�i�o�n�:� �1�.�0� �;� �S�P�o�r�t�a�l� � � � �/�/�U�s�e�r� �B�l�o�c�k� � �$�t�x�t�[�'�s�p�-�u�s�e�r�'�]� �=� �'�U�s�e�r�'�;� � �$�t�x�t�[�'�s�p�-�u�s�e�r�p�o�s�t�'�]� �=� �'�P�o�s�t�s�'�;� � �$�t�x�t�[�'�s�p�-�u�s�e�r�k�a�r�m�a�'�]� �=� �'�K�a�r�m�a�'�;� � �$�t�x�t�[�'�s�p�-�u�s�e�r�i�p�'�]� �=�


[SiNaN]

#203
Did you only installed the package I gave?




Sorry. Change the file attached below with ../Themes/default/languages/SPortal.english-utf8.php
Former SMF Core Developer | My Mods | SimplePortal

vinod41

YUP this file worked ... Now things are looking cooool.

Thanks for support

[SiNaN]

Quote from: vinod41 on April 20, 2008, 06:01:45 AM
YUP this file worked ... Now things are looking cooool.

Thanks for support

Not at all. ;)
Former SMF Core Developer | My Mods | SimplePortal

LiamTheDuck

#206
Just waiting patiently for SMF 2 beta 3 release :P

It looks good and [sorry bloc]:
better than TP
I am back, its been like a year... so yeah.... how has it been? :D

[SiNaN]

Quote from: [●ριмρєя12●] on April 20, 2008, 06:22:05 AM
Just waiting patiently for SMF 2 beta 3 release :P

It looks good [and sorry bloc]:
better than TP

Thanks [●ριмρєя12●], the best comment I could hear. :D

Not much left. :)
Former SMF Core Developer | My Mods | SimplePortal

Manu.G

@[SiNaN]
I can wait as long as it is for need. ;)
Btw, don't know if it is an error of my forum, but when I click at the board index
at "Mark as read", I end up in the portal and not in the board index.  :-\
Version SMF 2.0.8
SimplePortal 2.3.5

[SiNaN]

#209
I started upgrading the mod for the SMF 2.0 yesterday and 25 percent of the work is finished.

I finished the modsettings part, I mean the control panel of portal. And built the template file. Now working on the blocks.

Quote from: Manu0372 on April 20, 2008, 09:02:32 AM
@[SiNaN]
I can wait as long as it is for need. ;)
Btw, don't know if it is an error of my forum, but when I click at the board index
at "Mark as read", I end up in the portal and not in the board index.  :-\

No, that is not an error. Just the function returns to the index. Try doing this:

../Sources/Subs-Board.php

Find:

$_SESSION['ID_MSG_LAST_VISIT'] = $modSettings['maxMsgID'];
if (!empty($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'action=unread') !== false)
redirectexit('action=unread');

if (isset($_SESSION['topicseen_cache']))
$_SESSION['topicseen_cache'] = array();

redirectexit();


Replace:


$_SESSION['ID_MSG_LAST_VISIT'] = $modSettings['maxMsgID'];
if (!empty($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'action=unread') !== false)
redirectexit('action=unread');

if (isset($_SESSION['topicseen_cache']))
$_SESSION['topicseen_cache'] = array();

redirectexit(action=forum);
Former SMF Core Developer | My Mods | SimplePortal

Manu.G

I changed the code and checked it.
I clicked at "Mark as read" and got this error message

QuoteParse error:  syntax error, unexpected '=' in
/is/htdocs/.../.../.../.../Sources/Subs-Boards.php on line 230

Line 228 - 230:
redirectexit(action=forum);
}
    elseif (isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'unreadreplies')
Version SMF 2.0.8
SimplePortal 2.3.5

[SiNaN]

Quote from: Manu0372 on April 20, 2008, 12:56:52 PM
I changed the code and checked it.
I clicked at "Mark as read" and got this error message

QuoteParse error:  syntax error, unexpected '=' in
/is/htdocs/.../.../.../.../Sources/Subs-Boards.php on line 230

Line 228 - 230:
redirectexit(action=forum);
}
    elseif (isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'unreadreplies')


Opps. I small mistake. Do this.

../Sources/Subs-Board.php

Find:

$_SESSION['ID_MSG_LAST_VISIT'] = $modSettings['maxMsgID'];
if (!empty($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'action=unread') !== false)
redirectexit('action=unread');

if (isset($_SESSION['topicseen_cache']))
$_SESSION['topicseen_cache'] = array();

redirectexit();


Replace:


$_SESSION['ID_MSG_LAST_VISIT'] = $modSettings['maxMsgID'];
if (!empty($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'action=unread') !== false)
redirectexit('action=unread');

if (isset($_SESSION['topicseen_cache']))
$_SESSION['topicseen_cache'] = array();

redirectexit('action=forum');
Former SMF Core Developer | My Mods | SimplePortal

Manu.G

Works perfect now!!!

Thanks for your help! :D
Version SMF 2.0.8
SimplePortal 2.3.5

Nibogo

#213
[SiNaN] is possible to do something to make the DB changes in manual edit , the problem is of i upload the file for modifications and execute in my site but didnt work , you can do something??

And i think of you can add more blocks to insert php and HTML codes because maybe i and other people can need more of 2 blocks  :)

[SiNaN]

Quote from: NIBOGO on April 20, 2008, 06:22:30 PM
[SiNaN] is possible to do something to make the DB changes in manual edit , the problem is of i upload the file for modifications and execute in my site but didnt work , you can do something??

And i think of you can add more blocks to insert php and HTML codes because maybe i and other people can need more of 2 blocks  :)

I do like this; I add the database codes somewhere in the Stats.php. Then I go to the stats page. The code works automatically. And then I delete it. :D

In the SimplePortal v2.0 you will be able create unlimited numbers of block in which you can write php, html and js codes.

Now I am working on SimplePortal v1.1 for SMF 2.0 Beta 3 Public. :)
Former SMF Core Developer | My Mods | SimplePortal

Manu.G

Hi,

in our forum we have a lot of languages added, to show the portal in the language
a member is using, I would have to translate to much.
I'm sometimes very lazy and why should I translate things they are already translate. ;)
I searched in the index.english.php for the words, which are in use in the portal and
changed some text strings.
In our portal the "Top Poll" is called now "Poll", cause we don't have that much polls in our forum.

@[SiNaN]
Feel free to use it. ;)

I have a little advice. When I was working at the settings I had some problems with "Top Poll | Poll id to show:" I was searching for the ID of the poll I want to show in the portal. I searched in the database  O:) after I have found the ID of the poll I was searching for, I added it to the field it should be. But the poll wasn't show in the portal, I got this "Poll id entered is not a valid id."  :'(
Later I found out I have to add the number of the topic the poll is. Maybe it would be better to change the text, could be I'm not the only one who was a bit confused.

And I want to ask, what is to do, to show the avatar of the others in the "Top Poster"?
I tried a lot, but I'm a dumb with php and got all the time error messages, when I changed the codes.  :'(

Our portal: http://forum.arseniums.com
Version SMF 2.0.8
SimplePortal 2.3.5

cleanfiles

Hello [SiNaN],
I am building a site for a friend and have installed your portal, it looks good and no errors show up but I only have blocks on the left side. I skimmed this thread and didn't see this problem. Also I dont seem to be able to show board news.
Anyways heres some shots of the configuration.









We are in a temp url till its ready.
URLhttp://nqpipes-drums.cp72.org/forum/index.php

Grateful for any help with this.




[SiNaN]

Manu, this is for you:

For Top Poster question;

../Source/SPortal.php

Find:

function sp_topPoster($topNumber = 5)
{
global $db_prefix, $scripturl, $memberContext, $txt, $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 ID_MEMBER, realName, posts
FROM {$db_prefix}members
ORDER BY posts DESC
LIMIT $topNumber", __FILE__, __LINE__);
$top_posters = array();
while ($row = mysql_fetch_assoc($request))
$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']
);
mysql_free_result($request);

$top_poster_id = $top_posters[0]['id'];
loadMemberData($top_poster_id);
loadMemberContext($top_poster_id);

}


Replace:

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();
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' => '\'\''));
}
}

$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);

}


../Themes/default/SPortal.template.php

Find:

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


Replace:

sp_topPoster($modSettings['tppcount']);
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>';



Cleanfiles;

Admin CP >> Features and Settings >> Portal Settings >> Board News | News board:

enter the id of the board that you create.
Former SMF Core Developer | My Mods | SimplePortal

Marcus Forsberg

As all your mods, this is great!

But, sorry, I'll ceep using TP, only becouse of the Downloadsfunction.  :-\

cleanfiles

Thanks for the reply.
I don't know what the board id is or where to find it.
Any ideas on why I only have blocks on the left side?

Advertisement: