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

NanoSector

Try Admin > Simple Portal > Blocks > Top blocks > Welcome
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

FrizzleFried

When I attempt to install in my highly modified default themed forum I get an error:

When it searches for:

if (empty($parse_tags) || in_array($code['tag'], $parse_tags))
$bbc_codes[substr($code['tag'], 0, 1)][] = $code;
}
$codes = null;
}


In subs.php ... it can't find it to replace it.   When i do a manual search I find a (likely modified):

foreach ($codes as $c)
$bbc_codes[substr($c['tag'], 0, 1)][] = $c;
$codes = null;


I am not sure which mod changed the original code... nor am I 100% certain this is the right place in subs.php ... but it's the closest I could find.

Any suggestion... I didn't want to replace the modified code with the new code Simple Portal is attempting to install as it would (likely) screw up some other mod.

Thanks!

Angelina Belle

I would recommend to
1) do the install, ignoring that one line
2)Save a copy of the problem file
3) Make that change by hand
4) test.

If you don't like the result after you test, put back the saved copy instead of the one you changed by hand, and uninstall SimplePortal.
Then come ask more questions.

Probably, though, steps 1-4 will give you something OK.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

supersix

I just installed 2.3.5 on a 2nd forum I run, and we are currently only using the Shoutbox.

Everything is fine - but in FireFox only - the text when someone reads a thread is much larger than the standard font size. It doesn't do this on the main page, or the board listing pages, just inside individual messages.

I have it running on my other SMF board, I don't have the issue. I assume it's a conflict with another mod?

Angelina Belle

I don't know what the problem is.  It could be related to a post/topic that shows on the front page.

First -- please submit the page to xHTML verification, to find out if some broken HTML is causing the problem.
This is common with truncated posts in boardnews and articles blocks.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

supersix

Quote from: AngelinaBelle on April 09, 2012, 05:42:36 PM
I don't know what the problem is.  It could be related to a post/topic that shows on the front page.

First -- please submit the page to xHTML verification, to find out if some broken HTML is causing the problem.
This is common with truncated posts in boardnews and articles blocks.

Yep - it's odd.

ONLY does it on  hxxp:xxx.xxx/index.php?topic= [nonactive] read pages. No where else.

Not in PMs, not hxxp:xxx.xxx/index.php?action=unread [nonactive], hxxp:ffdt.info/index.php [nonactive] - nowhere else. :(

And GOD, what do i have to do to get rid of the verification every time I post? :x

Angelina Belle

I don't see the shoutbox, or anything to do with the portal, at ffdt.info

After you post a few times, the verification will go away.  It's to discourage bots and spammers.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

LoKe

Sorry, we had it disabled until we could figure out the issue.  I've re-enabled it now.

Angelina Belle

shoutbox is only available to members?
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

LoKe


Angelina Belle

I fear that I cannot properly investigate the problem.

I think a good first step would be to identify and correct XHTML errors, using http://validator.w3.org/check?uri=http%3A%2F%2Fffdt.info%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

And also http://validator.w3.org/check?uri=http%3A%2F%2Fffdt.info%2Findex.php%3Ftopic%3D6071.0&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.3

Once you fix these errors, it will be easier to identify any shoutbox-related errors.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

davidhs

I made a package for Spanish translation of SimplePortal 2.3.5 (based of translation 2.3.4 = 2.3.3 + new strings)

I attach this in SimplePortal website http://simpleportal.net/index.php?topic=11053.0

Angelina Belle

Thank you!  I'll make sure our Language team knows about it.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

FrizzleFried

I need to set a block to a fixed height.  Can someone please explain how this is done?   I've asked at simpleportal.net but after 3 days I still have no answer.... this can't be that difficult of a thing to do,  right?

Angelina Belle

Have you tried adding the height to the custom style field for the block?
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

FrizzleFried

Quote from: AngelinaBelle on April 25, 2012, 10:45:09 AM
Have you tried adding the height to the custom style field for the block?
Unfortunately I'm a newb at this.  I have a current block (PHP BLOCK) that adjusts size depending on the avatar sizes of each user showing... I'd like to set that block as a fixed height OR set each avatar height at a fixed height which would thereby eliminate the block from adjusting height.   

Is there a semi-simple bit of code that can be added to that block?  If so... what would it be?

Thanks!

Angelina Belle

If it is a php block, you can do this directly in the code.
Whether it is an image, a div, or a <td> you want to fix the height of, you'll add the style attribute to set the height.
To learn more, please read about using the style attribute for inline styling (sometimes called "inline CSS"). http://www.w3schools.com/tags/att_standard_style.asp

And also about the height property: http://www.w3schools.com/cssref/pr_dim_height.asp
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

FrizzleFried

Well.  I tried adding "height=300px;" and it errored out... I then tried {height=300px;} and it also errored out.  I tried putting the line in multiple locations... no go.   >sigh<  It really stinks now knowing what you're doing.


Angelina Belle

Please give a more specific example.  I am not sure what you tried to put where.

And w3schools.com is a great place to learn what you are doing -- have you tried the online interactive examples, where you can edit some HTML and see what happens?
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

FrizzleFried

This is a NEWEST USERS block... it includes avatars.  If the avatars aren't at the max size vertically,  it makes the size of the overall block smaller vertically.  I need the vertical size to remain the same all the time.   So I need to either (A) make all avatars the same size vertically (35px?) or (B) Make the block itself a fixed size ... which would leave a little white space at the bottom of a user or two uses a small avatar than the max.

global $smcFunc, $context, $scripturl, $modSettings, $txt, $color_profile;

$limit = 5;

$request = $smcFunc['db_query']('','
SELECT
m.id_member, m.real_name, m.date_registered, m.avatar,
a.id_attach, a.attachment_type, a.filename
FROM {db_prefix}members AS m
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = m.id_member)
ORDER BY id_member DESC
LIMIT {int:limit}',
array(
'limit' => $limit,
)
);
$members = array();
$colorids = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
if (!empty($row['id_member']))
$colorids[$row['id_member']] = $row['id_member'];

if ($modSettings['avatar_action_too_large'] == 'option_html_resize' || $modSettings['avatar_action_too_large'] == 'option_js_resize')
{
$avatar_width = !empty($modSettings['avatar_max_width_external']) ? ' width="' . $modSettings['avatar_max_width_external'] . '"' : '';
$avatar_height = !empty($modSettings['avatar_max_height_external']) ? ' height="' . $modSettings['avatar_max_height_external'] . '"' : '';
}
else
{
$avatar_width = '';
$avatar_height = '';
}

$members[] = array(
'id' => $row['id_member'],
'name' => $row['real_name'],
'href' => $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>',
'date' => timeformat($row['date_registered'], '%d %B'),
'avatar' => array(
'name' => $row['avatar'],
'image' => $row['avatar'] == '' ? ($row['id_attach'] > 0 ? '<img src="' . (empty($row['attachment_type']) ? $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'] . '"' . $avatar_width . $avatar_height . ' 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['attachment_type']) ? $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'])
),
);
}
$smcFunc['db_free_result']($request);

if (empty($members))
{
echo '
', $txt['error_sp_no_members_found'];
return;
}

if (!empty($colorids) && sp_loadColors($colorids) !== false)
{
foreach ($members as $k => $p)
{
if (!empty($color_profile[$p['id']]['link']))
$members[$k]['link'] = $color_profile[$p['id']]['link'];
}
}

echo '
<table class="sp_fullwidth">';

foreach ($members as $member)
echo '
<tr>
<td class="sp_top_poster sp_center">', !empty($member['avatar']['href']) ? '
<img src="' . $member['avatar']['href'] . '" alt="' . $member['name'] . '" width="40" />' : '', '
</td>
<td>
', $member['link'], '<br />
', $member['date'], '
</td>
</tr>';

echo '
</table>';

Advertisement: