News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SimplePortal

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

Previous topic - Next topic

ccbtimewiz

Quote from: evilicy on September 03, 2008, 03:54:20 PM
I don't want to sound critical of this mod because on the contrary it looks like you did a wonderful job on it. I'm just curious what was the motivation of making this? When there is already a great well known portal system for smf. Or maybe a better question would be, is there an advantage of using this one over the other?

It's really up to the individual person to make a decision in which portal system they want to use. The Simple Portal Team in its entirety strive to make a portal that is simplistic-- that is easy to mod, to add additions to, and to easily operate in terms of website administration.

While we are fully aware that another portal system exists, that doesn't compensate the destruction or inability to create our own, and one to our liking.

christinedlrp

Quote
How exactly are you making your custom blocks?


I go to the Portal Administration, then click "Add Block" and choose HTML Block.

BigMike82

Hi Everyone,

I posted this on the Portal Support page too:
http://simpleportal.devira.info/index.php?topic=206.0

Simply, I wanted to know where I can change the content in each block. Which page do I need to modify?

Also, Just wanted to know how to create a block that would show top topics from a specific board, ordered by most replies to that topic.
http://simpleportal.devira.info/index.php?topic=216.0


Thanks,
Mike

ash1

hi, i've installed simple portal mod and i think its cool :)

but, i've little problem with some tipe of error at the upper side, look at this:

hxxp:www.evertech.info/forum2/ [nonactive]

:(

[SiNaN]

Can you attach your Modifications.english.php file?
Former SMF Core Developer | My Mods | SimplePortal

Adish - (F.L.A.M.E.R)

Quote from: F.L.A.M.E.R on September 03, 2008, 05:01:43 PM
Quote from: [SiNaN] on September 03, 2008, 01:42:58 PM
F.L.A.M.E.R:

I couldn't get your problem. But for now, blocks just appear on portal page.

Oh okay.. can i make my forum appear on the portal page just under the blocks I have added ? Coz i am a bit lost in these settings. 1stly i activated my portal. That causes no changes. Then I added a top block. It remove the whole forum from that page and left just the top block. So i now want it like the top block to appear up along with the forum. Kind of non explainable but i think you might get my point...

ash1

Quote from: [SiNaN] on September 06, 2008, 04:55:31 PM
Can you attach your Modifications.english.php file?

sorry but where i can find it? :)

Nathaniel

@ash1,
You will find it in at '/themes/default/languages/Modifications.english.php'.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

ash1


Nathaniel

SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

ash1

thanks!!!
its run all well now, what do you fix?
i want to learn more about smf code :D

Nathaniel

I found the closing php tag ?> and then moved it to the end of the file. That causes an error, because the language strings/variables for SimplePortal were there as html, meaning that when SMF opened that file, it displayed that php code as html instead of running it as php.
?>
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

dwd2000

Sorry, but I didn't read all 63 pages of this topic, but I did search the topic and didn't find what I was looking for. If the answer was here, I'm sorry.

I would like to edit what the "Who's Online Block" says.



  • Online Guests - Change to "Guests"

  • Online Users - Change to "Users" or "Members"

  • Hidden Users - Remove completely, because I don't allow members to be hidden.
    I also have the "Googlebot & Spiders Mod" installed, and wouldn't mind having that info shown here, instead of "Hidden".

  • Total Users - Change to "Total".

  • Online Users - Change to "Users Online"

I've searched the files that came with Simple Portal, but wasn't sure what to edit.  O:)

By the way, of the pages I DID read, I read that one person wasn't happy about your copyright. SMF, and the authors of the mods offer what they do for free, as well as EXCELLENT support. I have no problem showing my support to SMF and the mod teams. It's more than a fair trade.



30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

Nathaniel

#1253
Do a search for 'sp_whosOnline()' in the '/sources/SPortal.php' file. That is the function which you want to edit. The html is near the end of that function. You will have to change the '$txt['var']' parts of the code to the strings that you want, although I can show you how to do it differently if you want to retain multiple language support. ;)

By the way. I would like to remind everyone that you can also receive support for Simple Portal, on our very own website - SimplePortal.net. :D
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

dwd2000

#1254
Quote from: LHVWB on September 06, 2008, 07:29:49 PM
Do a search for 'sp_whosOnline()' in the '/sources/SPortal.php' file. That is the function which you want to edit. The html is near the end of that function. You will have to change the '$txt['var']' parts of the code to the strings that you want, although I can show you how to do it differently if you want to retain multiple language support. ;)

By the way. I would like to remind everyone that you can also receive support for Simple Portal, on our very own website - SimplePortal.net. :D

Usually, I have no problem altering stuff, but in this case, I'm going to have to ask you to actually give me the codes I need and where to put them.

I have 3 websites using SMF and use quite a few mods. I find it a little easier to use the main SMF site for support. If I have anything else after this issue, I promise to use your site.  O:)
P.S. - I just registered there.  ;)
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

[SiNaN]

Quote from: F.L.A.M.E.R on September 06, 2008, 05:13:05 PM
Quote from: F.L.A.M.E.R on September 03, 2008, 05:01:43 PM
Quote from: [SiNaN] on September 03, 2008, 01:42:58 PM
F.L.A.M.E.R:

I couldn't get your problem. But for now, blocks just appear on portal page.

Oh okay.. can i make my forum appear on the portal page just under the blocks I have added ? Coz i am a bit lost in these settings. 1stly i activated my portal. That causes no changes. Then I added a top block. It remove the whole forum from that page and left just the top block. So i now want it like the top block to appear up along with the forum. Kind of non explainable but i think you might get my point...

As I said, blocks just appear on portal page for now. We are testing the functionality we want now on simpleportal.net.

Quote from: dwd2000 on September 06, 2008, 08:03:16 PM
Quote from: LHVWB on September 06, 2008, 07:29:49 PM
Do a search for 'sp_whosOnline()' in the '/sources/SPortal.php' file. That is the function which you want to edit. The html is near the end of that function. You will have to change the '$txt['var']' parts of the code to the strings that you want, although I can show you how to do it differently if you want to retain multiple language support. ;)

By the way. I would like to remind everyone that you can also receive support for Simple Portal, on our very own website - SimplePortal.net. :D

Usually, I have no problem altering stuff, but in this case, I'm going to have to ask you to actually give me the codes I need and where to put them.

I have 3 websites using SMF and use quite a few mods. I find it a little easier to use the main SMF site for support. If I have anything else after this issue, I promise to use your site.  O:)
P.S. - I just registered there.  ;)

Just look for the words in the ../Themes/default/languages/SPortal.english.php and change them as you wish.

Former SMF Core Developer | My Mods | SimplePortal

dwd2000

Quote
Quote from: dwd2000 on September 06, 2008, 08:03:16 PM
Quote from: LHVWB on September 06, 2008, 07:29:49 PM
Do a search for 'sp_whosOnline()' in the '/sources/SPortal.php' file. That is the function which you want to edit. The html is near the end of that function. You will have to change the '$txt['var']' parts of the code to the strings that you want, although I can show you how to do it differently if you want to retain multiple language support. ;)

By the way. I would like to remind everyone that you can also receive support for Simple Portal, on our very own website - SimplePortal.net. :D

Usually, I have no problem altering stuff, but in this case, I'm going to have to ask you to actually give me the codes I need and where to put them.

I have 3 websites using SMF and use quite a few mods. I find it a little easier to use the main SMF site for support. If I have anything else after this issue, I promise to use your site.  O:)
P.S. - I just registered there.  ;)

Just look for the words in the ../Themes/default/languages/SPortal.english.php and change them as you wish.

Sorry, but I'm still confused.

I think this is the part of the code in SPortal.php you are talking about:

function sp_whosOnline()

{

global $scripturl, $db_prefix, $user_info, $txt, $settings, $online;



$result = db_query("

SELECT

lo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,

mg.onlineColor, mg.ID_GROUP

FROM {$db_prefix}log_online AS lo

LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER)

LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))", __FILE__, __LINE__);



$online['users'] = array();

$online['guests'] = 0;

$online['hidden'] = 0;

$online['buddies'] = 0;

$show_buddies = !empty($user_info['buddies']);



while ($row = mysql_fetch_assoc($result))

{

if (!isset($row['realName']))

$online['guests']++;

elseif (!empty($row['showOnline']) || allowedTo('moderate_forum'))

{

// Some basic color coding...

if (!empty($row['onlineColor']))

$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color: ' . $row['onlineColor'] . ';">' . $row['realName'] . '</a>';

else

$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>';



// Bold any buddies.

if ($show_buddies && in_array($row['ID_MEMBER'], $user_info['buddies']))

{

$online['buddies']++;

$link = '<b>' . $link . '</b>';

}



$online['users'][$row['logTime'] . $row['memberName']] = array(

'id' => $row['ID_MEMBER'],

'username' => $row['memberName'],

'name' => $row['realName'],

'group' => $row['ID_GROUP'],

'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],

'link' => $link,

'hidden' => empty($row['showOnline']),

'is_last' => false,

);

}

else

$online['hidden']++;

}

mysql_free_result($result);



if (!empty($online['users']))

{

krsort($online['users']);

$userlist = array_keys($online['users']);

$online['users'][$userlist[count($userlist) - 1]]['is_last'] = true;

}

$online['num_users'] = count($online['users']) + $online['hidden'];

$online['total_users'] = $online['num_users'] + $online['guests'];



echo '<table>

<tr>

<td><img src="' . $settings['images_url'] . '/dot.gif" alt="Dot" /></td>

<td>', $txt['sp-onlineguest'], '</td>

<td>:</td>

<td>', $online['guests'],'</td>

</tr>

<tr>

<td><img src="' . $settings['images_url'] . '/dot.gif" alt="Dot" /></td>

<td>', $txt['sp-onlineuser'], '</td>

<td>:</td>

<td>', $online['num_users'],'</td>

</tr>

<tr>

<td><img src="' . $settings['images_url'] . '/dot.gif" alt="Dot" /></td>

<td>', $txt['sp-onlinehuser'], '</td>

<td>:</td>

<td>', $online['hidden'],'</td>

</tr>

<tr>

<td><img src="' . $settings['images_url'] . '/dot.gif" alt="Dot" /></td>

<td>', $txt['sp-onlinetuser'], '</td>

<td>:</td>

<td>', $online['total_users'],'</td>

</tr>';

if(!empty($online['users']))

echo ' <tr>

<td><img src="' . $settings['images_url'] . '/dot.gif" alt="Dot" />

</td><td>', $txt['sp-onlineouser'], '</td>

<td>:</td>

<td>&nbsp;</td>

</tr>';



foreach ($online['users'] as $user)

echo '<tr>

<td colspan="4" style="padding-left: 15px;"><img src="' . $settings['images_url'] . '/useron.gif" alt="user" /> ',$user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'],'</td>

</tr>';

echo '</table>';

}


I have also attached SPortal.english.php. I can't find the '$txt['var']' that refers to the wording. I can see the '$txt['var']' in SPortal.php, but can't find the corresponding place to make the edits.
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

dwd2000

Quote from: dwd2000 on September 07, 2008, 10:43:09 AM
Quote
Quote from: dwd2000 on September 06, 2008, 08:03:16 PM
Quote from: LHVWB on September 06, 2008, 07:29:49 PM
Do a search for 'sp_whosOnline()' in the '/sources/SPortal.php' file. That is the function which you want to edit. The html is near the end of that function. You will have to change the '$txt['var']' parts of the code to the strings that you want, although I can show you how to do it differently if you want to retain multiple language support. ;)

By the way. I would like to remind everyone that you can also receive support for Simple Portal, on our very own website - SimplePortal.net. :D

Usually, I have no problem altering stuff, but in this case, I'm going to have to ask you to actually give me the codes I need and where to put them.

I have 3 websites using SMF and use quite a few mods. I find it a little easier to use the main SMF site for support. If I have anything else after this issue, I promise to use your site.  O:)
P.S. - I just registered there.  ;)

Just look for the words in the ../Themes/default/languages/SPortal.english.php and change them as you wish.

Sorry, but I'm still confused.

I think this is the part of the code in SPortal.php you are talking about:

function sp_whosOnline()

{

global $scripturl, $db_prefix, $user_info, $txt, $settings, $online;



$result = db_query("

SELECT

lo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,

mg.onlineColor, mg.ID_GROUP

FROM {$db_prefix}log_online AS lo

LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER)

LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))", __FILE__, __LINE__);



$online['users'] = array();

$online['guests'] = 0;

$online['hidden'] = 0;

$online['buddies'] = 0;

$show_buddies = !empty($user_info['buddies']);



while ($row = mysql_fetch_assoc($result))

{

if (!isset($row['realName']))

$online['guests']++;

elseif (!empty($row['showOnline']) || allowedTo('moderate_forum'))

{

// Some basic color coding...

if (!empty($row['onlineColor']))

$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color: ' . $row['onlineColor'] . ';">' . $row['realName'] . '</a>';

else

$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>';



// Bold any buddies.

if ($show_buddies && in_array($row['ID_MEMBER'], $user_info['buddies']))

{

$online['buddies']++;

$link = '<b>' . $link . '</b>';

}



$online['users'][$row['logTime'] . $row['memberName']] = array(

'id' => $row['ID_MEMBER'],

'username' => $row['memberName'],

'name' => $row['realName'],

'group' => $row['ID_GROUP'],

'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],

'link' => $link,

'hidden' => empty($row['showOnline']),

'is_last' => false,

);

}

else

$online['hidden']++;

}

mysql_free_result($result);



if (!empty($online['users']))

{

krsort($online['users']);

$userlist = array_keys($online['users']);

$online['users'][$userlist[count($userlist) - 1]]['is_last'] = true;

}

$online['num_users'] = count($online['users']) + $online['hidden'];

$online['total_users'] = $online['num_users'] + $online['guests'];



echo '<table>

<tr>

<td><img src="' . $settings['images_url'] . '/dot.gif" alt="Dot" /></td>

<td>', $txt['sp-onlineguest'], '</td>

<td>:</td>

<td>', $online['guests'],'</td>

</tr>

<tr>

<td><img src="' . $settings['images_url'] . '/dot.gif" alt="Dot" /></td>

<td>', $txt['sp-onlineuser'], '</td>

<td>:</td>

<td>', $online['num_users'],'</td>

</tr>

<tr>

<td><img src="' . $settings['images_url'] . '/dot.gif" alt="Dot" /></td>

<td>', $txt['sp-onlinehuser'], '</td>

<td>:</td>

<td>', $online['hidden'],'</td>

</tr>

<tr>

<td><img src="' . $settings['images_url'] . '/dot.gif" alt="Dot" /></td>

<td>', $txt['sp-onlinetuser'], '</td>

<td>:</td>

<td>', $online['total_users'],'</td>

</tr>';

if(!empty($online['users']))

echo ' <tr>

<td><img src="' . $settings['images_url'] . '/dot.gif" alt="Dot" />

</td><td>', $txt['sp-onlineouser'], '</td>

<td>:</td>

<td>&nbsp;</td>

</tr>';



foreach ($online['users'] as $user)

echo '<tr>

<td colspan="4" style="padding-left: 15px;"><img src="' . $settings['images_url'] . '/useron.gif" alt="user" /> ',$user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'],'</td>

</tr>';

echo '</table>';

}


I have also attached SPortal.english.php. I can't find the '$txt['var']' that refers to the wording. I can see the '$txt['var']' in SPortal.php, but can't find the corresponding place to make the edits.

I found the problem.
I was still using 2.0.2
I upgraded to 2.0.4 and found the place to make the edits.  :o
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

[SiNaN]

Former SMF Core Developer | My Mods | SimplePortal

dwd2000

Quote from: [SiNaN] on September 07, 2008, 11:24:45 AM
So did you solve your problem? :)

Yes.  ;D

Now, I'm just trying to figure out how to put the number of spiders in the place of "Hidden Users". I've changed the text from "Hidden Users" to "Spiders", but just have to put the right code in place.

Thanks.
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

Advertisement: