News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SimplePortal

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

Previous topic - Next topic

sornok

#1220
hi

I am making a website about World of Warcraft

hxxp:www.fusion-net.eu/ [nonactive]

When I found SMF, I also found simpleportal, and it all came clear that it was a good idea :D

Altho, I have a little problem.

Since the site is abour WoW. I installed a mod called "WoW Itemstats", which is supposed to show items used with a [item][/item] tag with a different color and a tooltip. It works fine with the forum, but it doesn't work with the forum. If you want to check it, visit the above webpage, check at the bottom articles called "Itemstats Test ", you will see the [Stormrage Signet Ring] but no tooltip with it. If you click on the item to see the replies, then it will work fine.

My question is, has anyone tried that? Is there a way to fix it ? Any help would be appreciated. Thank you!

Eliana Tamerin

I believe the articles strip BBC, if I remember correctly. That's why it won't work.
Do NOT PM me for support.

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

sornok

QuoteI believe the articles strip BBC, if I remember correctly. That's why it won't work.

I am afraid this doesn't help me :/

Some more info or a link to help me ?

ccbtimewiz

#1223
Quote from: sornok on August 31, 2008, 07:43:55 AM
QuoteI believe the articles strip BBC, if I remember correctly. That's why it won't work.

I am afraid this doesn't help me :/

Some more info or a link to help me ?

It does parse it.

ousu

Hi,
In the users online block, how can i keep a scroll button , because if there are 50 users online it takes half of the page.

Please help me..
Thank you

Sudhakar Arjunan

Quote from: ousu on August 31, 2008, 08:03:27 AM
Hi,
In the users online block, how can i keep a scroll button , because if there are 50 users online it takes half of the page.

Please help me..
Thank you


For Who's Online problem, this should fix it:

../Sources/SPortal.php

Find:

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

Replace:

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


With this code, it will just get 20 members online.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

[SiNaN]

sornok:

Did you install this mod?

http://custom.simplemachines.org/mods/index.php?mod=247

ousu:

I'm quite busy these days, sorry.

SPortal.php

Find:

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

echo '<table>


Replace:

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

echo '<table width="100%">


Find:

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>';


Replace:

echo '
<tr>
<td colspan="4">
<div style="border: 0pt none; height: 100px; overflow: auto;">
<table>';
foreach ($online['users'] as $user)
echo '<tr>
<td 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>
</div>
</td>
</tr>';


You can change the height with the height attribute in style.

For all:

I think you will get a better support if you ask in www.simpleportal.net.
Former SMF Core Developer | My Mods | SimplePortal

ousu

Quote from: [SiNaN] on August 31, 2008, 01:51:45 PM
sornok:

Did you install this mod?

http://custom.simplemachines.org/mods/index.php?mod=247

ousu:

I'm quite busy these days, sorry.

SPortal.php

Find:

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

echo '<table>


Replace:

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

echo '<table width="100%">


Find:

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>';


Replace:

echo '
<tr>
<td colspan="4">
<div style="border: 0pt none; height: 100px; overflow: auto;">
<table>';
foreach ($online['users'] as $user)
echo '<tr>
<td 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>
</div>
</td>
</tr>';


You can change the height with the height attribute in style.

For all:

I think you will get a better support if you ask in www.simpleportal.net.


Thank you very much

It works now.....

jimvy

#1228
Quote from: [SiNaN] on August 29, 2008, 03:20:07 PM

jimvy:
2) Can you just try this codes:

<!-- Location of javascript. -->
<script language="javascript" type="text/javascript" src="swfobject.js" ></script>
<!-- Div that contains player. -->
<div id="player">
</div>
<!-- Script that embeds player. -->
<script language="javascript" type="text/javascript">
var so = new SWFObject("flashmp3player.swf", "player", "290", "247", "9"); // Location of swf file.
so.addParam("quality", "high");
so.addVariable("content_path","mp3"); // Location of a folder with mp3 files (relative to php script).
so.addVariable("color_path","default.xml"); // Location of xml file with color settings.
so.addVariable("script_path","flashmp3player.php"); // Location of php script.
so.write("player");
</script>
That doesn't show the player, it's just an empty box.

Quote from: [SiNaN] on August 29, 2008, 03:20:07 PM
3) How do they upload it outside the portal?
Right now they go to http://bunny-troopers.tw-family.us/music/upload.php and upload them.

upload.php

<?php
$uploadLocation
= "\tmp";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
   <title>MP3 Uploader</title>
   <link href="style/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="main">
      <div id="caption">MP3 Uploader - Uploads are limited to 10 MB each, MP3 format only!</div>
      <div id="icon">&nbsp;</div>
      <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="fileForm" id="fileForm" enctype="multipart/form-data">
        File to upload:<center>
        <table>
          <tr><td><input name="upfile" type="file" size="36"></td></tr>
          <tr><td align="center"><br/><input class="text" type="submit" name="submitBtn" value="Upload"></td></tr>
        </table></center> 
      </form>
<?php    
   
if (isset($_POST['submitBtn'])){
?>
      <div id="caption">RESULT</div>
      <div id="icon2">&nbsp;</div>
      <div id="result">
        <table width="100%">
<?php
$target_path
= $_SERVER['DOCUMENT_ROOT'] . '/music/mp3/' . basename( $_FILES['upfile']['name']);
//$target_path = $uploadLocation . basename( $_FILES['upfile']['name']);

if(move_uploaded_file($_FILES['upfile']['tmp_name'], $target_path)) {
   echo
"The file: ".  basename( $_FILES['upfile']['name']).
   
" has been uploaded!";
} else{
   echo
"There was an error uploading the file, please try again!";
}
?>
        </table>
     </div>
<?php            
   
}
?>
    <div>
</body>   


I'm thinking that it would maybe need to be the html part to display the upload interface but then call the php script so that the paths stay relative to the player and the player's relative path to the mp3's.

Chadrew

#1229
Hello,
I wanted the Who's Online look more like in the forum (comma-separated names, not one on each line) and since I know next to nothing about PHP, I tried to copy the most things from BoardIndex.php. Basically I added:
$online['userslist'] = array();
$online['userslist'][$row['logTime'] . $row['memberName']] = empty($row['showOnline']) ? '<i>' . $link . '</i>' : $link;
if (!isset($online['online_groups'][$row['ID_GROUP']]))
$online['online_groups'][$row['ID_GROUP']] = array(
'id' => $row['ID_GROUP'],
'name' => $row['groupName'],
'color' => $row['onlineColor']
);

krsort($online['userslist']);
And to output:
</tr><tr><td colspan="4" style="padding-left: 10px;"><span class="smalltext">';
echo implode(', ', $online['userslist']);
echo '</span></td></tr></table>';


Here's the whole thing if you need it:

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['userslist'] = 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']++;

$online['userslist'][$row['logTime'] . $row['memberName']] = empty($row['showOnline']) ? '<i>' . $link . '</i>' : $link;

if (!isset($online['online_groups'][$row['ID_GROUP']]))
$online['online_groups'][$row['ID_GROUP']] = array(
'id' => $row['ID_GROUP'],
'name' => $row['groupName'],
'color' => $row['onlineColor']
);
}
mysql_free_result($result);

if (!empty($online['users']))
{
krsort($online['users']);
krsort($online['userslist']);
$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><tr><td colspan="4" style="padding-left: 10px;"><span class="smalltext">';
echo implode(', ', $online['userslist']);
echo '</span></td></tr></table>';
}


It seems when there's a hidden user, it messes the thing up (shows same name twice). Any way to fix this? If that's too much stuff too look at, it's okay too.

Thanks!

Chadrew

I've got another (unrelated) question. I'd like to put a 468x60 banner on where the middle-bottom block is. But I don't want a table and a title displayed around it. As far as I understand, SimplePortal stores it's template in the MySQL DB, and not in a file. So how would I go about it? Just a general direction is fine.

learjet45

I think i found a small bug.

Under the configuration for a Top Topics Block, it says for Parameter 1 (to base results off of views or replies) that "Enter 1 for replies, 0 for views", but when I enter 1 it bases off of views and 0 for replies.

[SiNaN]

jimvy:

I should check the codes, before giving you an answer. Will turn back you shortly.

Chadrew:

Create a new PHP block and use this codes:

global $boarddir;

require_once($boarddir . '/SSI.php');

ssi_whosOnline();


Chadrew:

We don't have that feature for now. You can edit SPortal.template.php for this purpose. But I suggest you waiting for a new release for that.

learjet45:

We are aware of that bug, thanks anyway for reporting it. ;)
Former SMF Core Developer | My Mods | SimplePortal

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

I think i have a problem... I cannot see the forum if i add the block... i mean the bloack appears but the forum disapears.. I am using custome theme and i know i have to do the edit in the navigation to separate the portal page and the forum page, but i actually wanted the portal to work with some of the blocks like the upper once.. and the lower once as i can add in php adv codes.... or i am having some other issue.. kindly help...

Chadrew

#1234
Thank you so much [SiNaN], what a simple solution there :)

Another question (sorry) :-X

Is it because of SimplePortal that I cannot access my forum via wireless? I get this message:
"Sorry, this section isn't available for wireless users at this time."
More specifically, I can't access mysite.com but I can access mysite.com/forum/ (I have SimplePortal and PrettyURLs installed).

I can access my other forum (which doesn't have SimplePortal installed, but does have PrettyURLs) by using the same phone just fine, so I think that might be the case?


christinedlrp

I really do like this Portal.  Thanks to whoever created it.  My small problem is I can't figure how to make my custom blocks be the same width as the provided ones.  Are there files/settings I need to tweak to get all blocks to be the same width?  Thanks for your help.  :)

ccbtimewiz

Quote from: Chadrew on September 02, 2008, 10:54:39 PM
Thank you so much [SiNaN], what a simple solution there :)

Another question (sorry) :-X

Is it because of SimplePortal that I cannot access my forum via wireless? I get this message:
"Sorry, this section isn't available for wireless users at this time."
More specifically, I can't access mysite.com but I can access mysite.com/forum/ (I have SimplePortal and PrettyURLs installed).

I can access my other forum (which doesn't have SimplePortal installed, but does have PrettyURLs) by using the same phone just fine, so I think that might be the case?



It's been confirmed as a bug: http://simpleportal.devira.info/index.php?topic=192.msg961#msg961

Quote from: christinedlrp on September 03, 2008, 04:37:14 AM
I really do like this Portal.  Thanks to whoever created it.  My small problem is I can't figure how to make my custom blocks be the same width as the provided ones.  Are there files/settings I need to tweak to get all blocks to be the same width?  Thanks for your help.  :)

How exactly are you making your custom blocks?

[SiNaN]

F.L.A.M.E.R:

I couldn't get your problem. But for now, blocks just appear on portal page.
Former SMF Core Developer | My Mods | SimplePortal

Amun

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?
:D :D :D

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

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...

Advertisement: