Advertisement:

Author Topic: SimplePortal  (Read 1503309 times)

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: SimplePortal
« Reply #200 on: April 20, 2008, 03:06:39 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

Offline Eliana Tamerin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,611
  • Gender: Female
Re: SimplePortal
« Reply #201 on: April 20, 2008, 03:22:11 AM »
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!

Offline vinod41

  • Semi-Newbie
  • *
  • Posts: 14
Re: SimplePortal
« Reply #202 on: April 20, 2008, 05:39:19 AM »
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.

Code: [Select]
��<�?�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�'�]� �=�


Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: SimplePortal
« Reply #203 on: April 20, 2008, 05:43:10 AM »
Did you only installed the package I gave?



Sorry. Change the file attached below with ../Themes/default/languages/SPortal.english-utf8.php
« Last Edit: April 20, 2008, 05:46:52 AM by [SiNaN] »
Former SMF Core Developer | My Mods | SimplePortal

Offline vinod41

  • Semi-Newbie
  • *
  • Posts: 14
Re: SimplePortal
« Reply #204 on: April 20, 2008, 06:01:45 AM »
YUP this file worked ... Now things are looking cooool.

Thanks for support

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: SimplePortal
« Reply #205 on: April 20, 2008, 06:02:13 AM »
YUP this file worked ... Now things are looking cooool.

Thanks for support

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

Offline LiamTheDuck

  • Full Member
  • ***
  • Posts: 534
  • Gender: Male
  • OMG H4X0RZ
    • Unknownscape Forums
Re: SimplePortal
« Reply #206 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
« Last Edit: April 20, 2008, 12:02:51 PM by [●ριмρєя12●] »
I am back, its been like a year... so yeah.... how has it been? :D

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: SimplePortal
« Reply #207 on: April 20, 2008, 08:21:41 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

Offline Manu.G

  • Full Member
  • ***
  • Posts: 448
  • Gender: Female
  • Angel by Day, Devil by Night
    • http://facebook.com/manuela.guth on Facebook
    • Fan Community
Re: SimplePortal
« Reply #208 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.  :-\
Version SMF 2.0.8
SimplePortal 2.3.5

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: SimplePortal
« Reply #209 on: April 20, 2008, 11:56:46 AM »
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.

@[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:

Code: [Select]
$_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:


Code: [Select]
$_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);
« Last Edit: April 20, 2008, 11:58:54 AM by [SiNaN] »
Former SMF Core Developer | My Mods | SimplePortal

Offline Manu.G

  • Full Member
  • ***
  • Posts: 448
  • Gender: Female
  • Angel by Day, Devil by Night
    • http://facebook.com/manuela.guth on Facebook
    • Fan Community
Re: SimplePortal
« Reply #210 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

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

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

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: SimplePortal
« Reply #211 on: April 20, 2008, 01:50:49 PM »
I changed the code and checked it.
I clicked at "Mark as read" and got this error message

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

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

Opps. I small mistake. Do this.

../Sources/Subs-Board.php

Find:

Code: [Select]
$_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:


Code: [Select]
$_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

Offline Manu.G

  • Full Member
  • ***
  • Posts: 448
  • Gender: Female
  • Angel by Day, Devil by Night
    • http://facebook.com/manuela.guth on Facebook
    • Fan Community
Re: SimplePortal
« Reply #212 on: April 20, 2008, 03:21:41 PM »
Works perfect now!!!

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

Offline Nibogo

  • SMF Hero
  • ******
  • Posts: 6,663
  • Gender: Male
    • smfpacks on Facebook
    • @smfpacks on Twitter
    • SMFPacks
Re: SimplePortal
« Reply #213 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  :)

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: SimplePortal
« Reply #214 on: April 21, 2008, 02:45:14 AM »
[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

Offline Manu.G

  • Full Member
  • ***
  • Posts: 448
  • Gender: Female
  • Angel by Day, Devil by Night
    • http://facebook.com/manuela.guth on Facebook
    • Fan Community
Re: SimplePortal
« Reply #215 on: April 21, 2008, 04:12:59 AM »
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

Offline cleanfiles

  • Semi-Newbie
  • *
  • Posts: 94
Re: SimplePortal
« Reply #216 on: April 21, 2008, 10:04:29 AM »
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.
URL
Code: [Select]
http://nqpipes-drums.cp72.org/forum/index.php
Grateful for any help with this.



 

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: SimplePortal
« Reply #217 on: April 21, 2008, 10:40:44 AM »
Manu, this is for you:

For Top Poster question;

../Source/SPortal.php

Find:

Code: [Select]
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:

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();
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:

Code: [Select]
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:

Code: [Select]
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

Offline Marcus Forsberg

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,608
  • Gender: Male
    • marcus.t.forsberg on Facebook
    • marcusforsberg on LinkedIn
    • @marcusforsberg on Twitter
    • marcusforsberg.net
Re: SimplePortal
« Reply #218 on: April 21, 2008, 10:54:40 AM »
As all your mods, this is great!

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

Offline cleanfiles

  • Semi-Newbie
  • *
  • Posts: 94
Re: SimplePortal
« Reply #219 on: April 21, 2008, 10:58:10 AM »
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?