SimplePortal

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

Previous topic - Next topic

dodos26

#5660
Installing another clean forum without any modifications right after clean installation and simple portal installation 2.3.7. After uninstalling simple portal 2.3.7 without removing the database and installing simple portal 2.3.8 beta, it gets a forum clone in the php block.

<?php
{

    global 
$smcFunc$scripturl$modSettings$user_info$txt$context$color_profile$settings$db_prefix;

    
$list_limit 10;
    
$category_id_array_list = array(2);

    
$request $smcFunc['db_query']('''
        SELECT
            m.poster_time, ms.subject, m.id_topic, m.id_member, m.id_msg, b.id_board, b.id_parent, b.name AS board_name, t.num_replies, t.num_views, c.id_cat,
            ' 
. ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' '
            IFNULL(lt.id_msg, IFNULL(lmr.id_msg, 0)) >= m.id_msg_modified AS is_read,
            IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1 AS new_from'
) . '
        FROM {db_prefix}topics AS t
            INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg)
            INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)
            INNER JOIN {db_prefix}messages AS ms ON (ms.id_msg = t.id_first_msg)
            LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)
            LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)' 
. (!$user_info['is_guest'] ? '
            LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member})
            LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:current_member})' 
'') . '
        WHERE t.id_board != 0 AND c.id_cat = {array_int:category_id_array}' 
. ($modSettings['postmod_active'] ? '
            AND t.approved = {int:approved}
            AND m.approved = {int:approved}' 
'') . '
        ORDER BY t.id_topic DESC
        LIMIT {int:limit}'
,
        array(
            
'approved' => 1,
            
'limit' => $list_limit,
            
'category_id_array' => $category_id_array_list,
            
'current_member' => $user_info['id'],
        )
    );

    
$topics = array();
    while (
$row $smcFunc['db_fetch_assoc']($request))
    {
        
censorText($row['subject']);
        
$topics[] = $row;
    }
    
$smcFunc['db_free_result']($request);

    if (empty(
$topics))
    {
        echo 
$txt['error_sp_no_posts_found'];
        return;
    }
    else
        
$topics[count($topics) - 1]['is_last'] = true;

    
$colorids = array();
    foreach (
$topics as $item)
        
$colorids[] = $item['id_member'];
    
sp_loadColors($colorids);

    echo 
'<table class="sp_fullwidth">';
    
    foreach (
$topics as $item)
    {
        
$allOfParents = array();
        
$allOfParents array_reverse(getBoardParents($item['id_parent']));
        echo 
'
            <tr>
                <td class="sp_recent_icon sp_center">
                    '
sp_embed_image('topic'), '
                </td>
                <td class="sp_recent_subject">
                    <a href="'
$scripturl '?topic=' $item['id_topic'] . '.msg' $item['id_msg'] . ';topicseen#new''">'$item['subject'], '</a> 
                    '
, !empty($item['is_read']) ? '' '<a href="' $scripturl '?topic=' $item['id_topic'] . '.msg' $item['new_from'] . ';topicseen#new"><img src="' $settings['images_url'] . '/' $context['user']['language'] . '/new.gif" alt="' $txt['new'] . '" border="0" /></a>',
                    
'<br />';
                    foreach (
$allOfParents as $Parents_Data)
                    {
                        echo isset(
$Parents_Data['url']) ? '[<a href="' $Parents_Data['url'] . '">' $Parents_Data['name'] . '</a>]' '[' $Parents_Data['name'] . ']';
                        echo 
' » ';
                    }
                    echo 
'[''<a href="' $scripturl '?board=' $item['id_board'] . '.0">' $item['board_name'] . '</a>'']
                </td>
                <td class="sp_recent_info sp_right">
                    '
$color_profile[$item['id_member']]['link'], ' | '$txt['sp-articlesViews'], ': '$item['num_views'], ' | '$txt['sp-articlesComments'], ': '$item['num_replies'], '<br />'timeformat($item['poster_time']), '
                </td>
            </tr>'
;
    }
    echo 
'</table>';

}
?>

Clear install 2.0.19
You cannot view this attachment.


Loook here when patching from 2.0.17 to 2.0.19 work good :)
The problem must be in the clean install itself, there is somewhere a function that is not closed properly.
You cannot view this attachment.


I try also now 2.0.18 clear install and work good.
I try also 2.0.18 and patch to 2.0.19 and work good.

dodos26

Testing further and found that installing smf 2.0.18 and installing a simple portal 2.3.7
The php block will work fine, will also work fine after patching to smf 2.0.19
It will work even after uninstalling and reinstalling simpleportal 2.3.7
But if, when uninstalling simple portal, you select to remove entries in the database, after reinstalling, adding a block will bring up a window in a window.

dodos26

#5662
Yeah i found error before updating smf to 2.0.19 block in the database looks like this:

&lt;?php
{

    global $smcFunc, $scripturl, $modSettings, $user_info, $txt, $context, $color_profile, $settings, $db_prefix;

    $list_limit = 10;
    $category_id_array_list = array(2);

    $request = $smcFunc[&#039;db_query&#039;](&#039;&#039;, &#039;
        SELECT
            m.poster_time, ms.subject, m.id_topic, m.id_member, m.id_msg, b.id_board, b.id_parent, b.name AS board_name, t.num_replies, t.num_views, c.id_cat,
            &#039; . ($user_info[&#039;is_guest&#039;] ? &#039;1 AS is_read, 0 AS new_from&#039; : &#039;
            IFNULL(lt.id_msg, IFNULL(lmr.id_msg, 0)) &gt;= m.id_msg_modified AS is_read,
            IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1 AS new_from&#039;) . &#039;
        FROM {db_prefix}topics AS t
            INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg)
            INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)
            INNER JOIN {db_prefix}messages AS ms ON (ms.id_msg = t.id_first_msg)
            LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)
            LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)&#039; . (!$user_info[&#039;is_guest&#039;] ? &#039;
            LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member})
            LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:current_member})&#039; : &#039;&#039;) . &#039;
        WHERE t.id_board != 0 AND c.id_cat = {array_int:category_id_array}&#039; . ($modSettings[&#039;postmod_active&#039;] ? &#039;
            AND t.approved = {int:approved}
            AND m.approved = {int:approved}&#039; : &#039;&#039;) . &#039;
        ORDER BY t.id_topic DESC
        LIMIT {int:limit}&#039;,
        array(
            &#039;approved&#039; =&gt; 1,
            &#039;limit&#039; =&gt; $list_limit,
            &#039;category_id_array&#039; =&gt; $category_id_array_list,
            &#039;current_member&#039; =&gt; $user_info[&#039;id&#039;],
        )
    );

    $topics = array();
    while ($row = $smcFunc[&#039;db_fetch_assoc&#039;]($request))
    {
        censorText($row[&#039;subject&#039;]);
        $topics[] = $row;
    }
    $smcFunc[&#039;db_free_result&#039;]($request);

    if (empty($topics))
    {
        echo $txt[&#039;error_sp_no_posts_found&#039;];
        return;
    }
    else
        $topics[count($topics) - 1][&#039;is_last&#039;] = true;

    $colorids = array();
    foreach ($topics as $item)
        $colorids[] = $item[&#039;id_member&#039;];
    sp_loadColors($colorids);

    echo &#039;&lt;table class=&quot;sp_fullwidth&quot;&gt;&#039;;
   
    foreach ($topics as $item)
    {
        $allOfParents = array();
        $allOfParents = array_reverse(getBoardParents($item[&#039;id_parent&#039;]));
        echo &#039;
            &lt;tr&gt;
                &lt;td class=&quot;sp_recent_icon sp_center&quot;&gt;
                    &#039;, sp_embed_image(&#039;topic&#039;), &#039;
                &lt;/td&gt;
                &lt;td class=&quot;sp_recent_subject&quot;&gt;
                    &lt;a href=&quot;&#039;, $scripturl . &#039;?topic=&#039; . $item[&#039;id_topic&#039;] . &#039;.msg&#039; . $item[&#039;id_msg&#039;] . &#039;;topicseen#new&#039;, &#039;&quot;&gt;&#039;, $item[&#039;subject&#039;], &#039;&lt;/a&gt;
                    &#039;, !empty($item[&#039;is_read&#039;]) ? &#039;&#039; : &#039;&lt;a href=&quot;&#039; . $scripturl . &#039;?topic=&#039; . $item[&#039;id_topic&#039;] . &#039;.msg&#039; . $item[&#039;new_from&#039;] . &#039;;topicseen#new&quot;&gt;&lt;img src=&quot;&#039; . $settings[&#039;images_url&#039;] . &#039;/&#039; . $context[&#039;user&#039;][&#039;language&#039;] . &#039;/new.gif&quot; alt=&quot;&#039; . $txt[&#039;new&#039;] . &#039;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&#039;,
                    &#039;&lt;br /&gt;&#039;;
                    foreach ($allOfParents as $Parents_Data)
                    {
                        echo isset($Parents_Data[&#039;url&#039;]) ? &#039;[&lt;a href=&quot;&#039; . $Parents_Data[&#039;url&#039;] . &#039;&quot;&gt;&#039; . $Parents_Data[&#039;name&#039;] . &#039;&lt;/a&gt;]&#039; : &#039;[&#039; . $Parents_Data[&#039;name&#039;] . &#039;]&#039;;
                        echo &#039; » &#039;;
                    }
                    echo &#039;[&#039;, &#039;&lt;a href=&quot;&#039; . $scripturl . &#039;?board=&#039; . $item[&#039;id_board&#039;] . &#039;.0&quot;&gt;&#039; . $item[&#039;board_name&#039;] . &#039;&lt;/a&gt;&#039;, &#039;]
                &lt;/td&gt;
                &lt;td class=&quot;sp_recent_info sp_right&quot;&gt;
                    &#039;, $color_profile[$item[&#039;id_member&#039;]][&#039;link&#039;], &#039; | &#039;, $txt[&#039;sp-articlesViews&#039;], &#039;: &#039;, $item[&#039;num_views&#039;], &#039; | &#039;, $txt[&#039;sp-articlesComments&#039;], &#039;: &#039;, $item[&#039;num_replies&#039;], &#039;&lt;br /&gt;&#039;, timeformat($item[&#039;poster_time&#039;]), &#039;
                &lt;/td&gt;
            &lt;/tr&gt;&#039;;
    }
    echo &#039;&lt;/table&gt;&#039;;

}
?&gt;

After update to 2.0.19 block in database look like this:
&lt;?php
{

    global $smcFunc, $scripturl, $modSettings, $user_info, $txt, $context, $color_profile, $settings, $db_prefix;

    $list_limit = 10;
    $category_id_array_list = array(2);

    $request = $smcFunc[&#39;db_query&#39;](&#39;&#39;, &#39;
        SELECT
            m.poster_time, ms.subject, m.id_topic, m.id_member, m.id_msg, b.id_board, b.id_parent, b.name AS board_name, t.num_replies, t.num_views, c.id_cat,
            &#39; . ($user_info[&#39;is_guest&#39;] ? &#39;1 AS is_read, 0 AS new_from&#39; : &#39;
            IFNULL(lt.id_msg, IFNULL(lmr.id_msg, 0)) &gt;= m.id_msg_modified AS is_read,
            IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1 AS new_from&#39;) . &#39;
        FROM {db_prefix}topics AS t
            INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg)
            INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)
            INNER JOIN {db_prefix}messages AS ms ON (ms.id_msg = t.id_first_msg)
            LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)
            LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)&#39; . (!$user_info[&#39;is_guest&#39;] ? &#39;
            LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member})
            LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:current_member})&#39; : &#39;&#39;) . &#39;
        WHERE t.id_board != 0 AND c.id_cat = {array_int:category_id_array}&#39; . ($modSettings[&#39;postmod_active&#39;] ? &#39;
            AND t.approved = {int:approved}
            AND m.approved = {int:approved}&#39; : &#39;&#39;) . &#39;
        ORDER BY t.id_topic DESC
        LIMIT {int:limit}&#39;,
        array(
            &#39;approved&#39; =&gt; 1,
            &#39;limit&#39; =&gt; $list_limit,
            &#39;category_id_array&#39; =&gt; $category_id_array_list,
            &#39;current_member&#39; =&gt; $user_info[&#39;id&#39;],
        )
    );

    $topics = array();
    while ($row = $smcFunc[&#39;db_fetch_assoc&#39;]($request))
    {
        censorText($row[&#39;subject&#39;]);
        $topics[] = $row;
    }
    $smcFunc[&#39;db_free_result&#39;]($request);

    if (empty($topics))
    {
        echo $txt[&#39;error_sp_no_posts_found&#39;];
        return;
    }
    else
        $topics[count($topics) - 1][&#39;is_last&#39;] = true;

    $colorids = array();
    foreach ($topics as $item)
        $colorids[] = $item[&#39;id_member&#39;];
    sp_loadColors($colorids);

    echo &#39;&lt;table class=&quot;sp_fullwidth&quot;&gt;&#39;;
   
    foreach ($topics as $item)
    {
        $allOfParents = array();
        $allOfParents = array_reverse(getBoardParents($item[&#39;id_parent&#39;]));
        echo &#39;
            &lt;tr&gt;
                &lt;td class=&quot;sp_recent_icon sp_center&quot;&gt;
                    &#39;, sp_embed_image(&#39;topic&#39;), &#39;
                &lt;/td&gt;
                &lt;td class=&quot;sp_recent_subject&quot;&gt;
                    &lt;a href=&quot;&#39;, $scripturl . &#39;?topic=&#39; . $item[&#39;id_topic&#39;] . &#39;.msg&#39; . $item[&#39;id_msg&#39;] . &#39;;topicseen#new&#39;, &#39;&quot;&gt;&#39;, $item[&#39;subject&#39;], &#39;&lt;/a&gt;
                    &#39;, !empty($item[&#39;is_read&#39;]) ? &#39;&#39; : &#39;&lt;a href=&quot;&#39; . $scripturl . &#39;?topic=&#39; . $item[&#39;id_topic&#39;] . &#39;.msg&#39; . $item[&#39;new_from&#39;] . &#39;;topicseen#new&quot;&gt;&lt;img src=&quot;&#39; . $settings[&#39;images_url&#39;] . &#39;/&#39; . $context[&#39;user&#39;][&#39;language&#39;] . &#39;/new.gif&quot; alt=&quot;&#39; . $txt[&#39;new&#39;] . &#39;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&#39;,
                    &#39;&lt;br /&gt;&#39;;
                    foreach ($allOfParents as $Parents_Data)
                    {
                        echo isset($Parents_Data[&#39;url&#39;]) ? &#39;[&lt;a href=&quot;&#39; . $Parents_Data[&#39;url&#39;] . &#39;&quot;&gt;&#39; . $Parents_Data[&#39;name&#39;] . &#39;&lt;/a&gt;]&#39; : &#39;[&#39; . $Parents_Data[&#39;name&#39;] . &#39;]&#39;;
                        echo &#39; » &#39;;
                    }
                    echo &#39;[&#39;, &#39;&lt;a href=&quot;&#39; . $scripturl . &#39;?board=&#39; . $item[&#39;id_board&#39;] . &#39;.0&quot;&gt;&#39; . $item[&#39;board_name&#39;] . &#39;&lt;/a&gt;&#39;, &#39;]
                &lt;/td&gt;
                &lt;td class=&quot;sp_recent_info sp_right&quot;&gt;
                    &#39;, $color_profile[$item[&#39;id_member&#39;]][&#39;link&#39;], &#39; | &#39;, $txt[&#39;sp-articlesViews&#39;], &#39;: &#39;, $item[&#39;num_views&#39;], &#39; | &#39;, $txt[&#39;sp-articlesComments&#39;], &#39;: &#39;, $item[&#39;num_replies&#39;], &#39;&lt;br /&gt;&#39;, timeformat($item[&#39;poster_time&#39;]), &#39;
                &lt;/td&gt;
            &lt;/tr&gt;&#39;;
    }
    echo &#39;&lt;/table&gt;&#39;;

}
?&gt;

The difference is that old is all &#039; after update is &#39;
You cannot view this attachment.


After changing the code to the old one in the database, it works fine.
Now how fix it where fix it in code.
Or you can insert regular code without replacing " ' " to " &#039 ".

Code ("/Soucres/PortalAdminBlocks.php (608)") Select
        if (!isset($_POST['block_name']) || $smcFunc['htmltrim']($smcFunc['htmlspecialchars']($_POST['block_name']), ENT_QUOTES) === '')
Code ("/Soucres/PortalBlocks.php (3587)") Select
    $content = trim(un_htmlspecialchars($content));

<!--  2.0.19 updates for Load.php  -->
<file name="$sourcedir/Load.php">
<operation>
<search position="replace">
<![CDATA[ return $fix_utf8mb4($ent_check(htmlspecialchars($string, $quote_style, $utf8 ? 'UTF-8' : $charset))); ]]>
</search>
<add>
<![CDATA[ return $fix_utf8mb4($ent_check(htmlspecialchars($string, $quote_style, $utf8 ? 'UTF-8' : $charset), true)); ]]>
</add>
</operation>
</file>

dodos26

Fix the problem with custom blocks:
Found:
Code ("/Soucres/PortalBlocks.php (3587)") Select
$content = trim(un_htmlspecialchars($content));Replace:
$content = trim(htmlspecialchars_decode($content, ENT_QUOTES));

Oldiesmann

What exactly is a "huge flop" about 2.1? It has numerous improvements over 2.0.
Michael Eshom
Christian Metal Fans

Steve

Don't you just love it when people who don't know what they're talking about make generalized criticisms like that?  ::)
Please do not PM me for support.

Plus


greddy

Hello,

can anyone tell me if SimplePortal 2.3.7 works with PHP 8.1 ?

Greets, Peter

Doug Heffernan

Quote from: greddy on September 10, 2022, 02:03:42 PMHello,

can anyone tell me if SimplePortal 2.3.7 works with PHP 8.1 ?

Greets, Peter

Hello Peter,

The mod is free. You can also download it and test it for yourself :)

greddy


Hello,

long time i use it with php7 and when i try php8 nothing is working.
This is the reason i ask but now i remove it and the result is the same,
the problem is not the Simple-Portal ... :)

i must search again which mod the problem is.

Thanks for answer

Greets, Peter

-Rock Lee-

SMF 2.0.x does not work correctly with PHP 8.x, any mod that works correctly with the PHP 7.x branch usually works or generates an error log telling you what the problem is (in most it is due to writing or function).


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Dave J

This portal has now been superceded by EHPortal which works with SMF2.1, the latest version can be found here
Quotehttps://web-develop.ca/index.php?action=downloads;area=stable_eh_portal
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

dodos26

Quote from: Dave J on September 11, 2022, 03:04:13 AMThis portal has now been superceded by EHPortal which works with SMF2.1, the latest version can be found here
Quotehttps://web-develop.ca/index.php?action=downloads;area=stable_eh_portal


Nobody wants to use 2.1 so much since for every problem only the developers always inform about going to 2.1?  :O  ;D  ;D

assemblytube

Quote from: dodos26 on April 03, 2022, 07:43:44 AMFix the problem with custom blocks:
Found:
Code ("/Soucres/PortalBlocks.php (3587)") Select
$content = trim(un_htmlspecialchars($content));Replace:
$content = trim(htmlspecialchars_decode($content, ENT_QUOTES));

I too have been having problems with custom blocks and syntax errors which seem to have started when I upgraded to SMF 2.0.19
.
When I look at the code line referred to above
Code ("/Sources/PortalBlocks.php (3587)") Select
$content = trim(un_htmlspecialchars($content));
I see in my setup
Code ("/Sources/PortalBlocks.php (3592)") Select
$content = sp_decode(trim(un_htmlspecialchars($content)));
I have tried editing this piece of code to get rid of the syntax errors but have so far not managed to get rid of the syntax errors. I don't know why my code is different to author=dodos26 code above and don't know if altering it would remove the syntax errors I am getting. I feel dodos26 is on the right lines. Can anyone suggest how I can fix the syntax errors I am getting by altering PortalBlocks.php.
Thank you.

dodos26

U use Simpleportal 2.3.7 or Beta Simple Portal 2.3.8?
sp_decode I find in beta 2.3.8.

Install 2.3.7 and make the changes I wrote about.

assemblytube

Quote from: dodos26 on November 14, 2022, 03:07:45 PMU use Simpleportal 2.3.7 or Beta Simple Portal 2.3.8?
sp_decode I find in beta 2.3.8.

Install 2.3.7 and make the changes I wrote about.
Thank you dodos26. You are correct that I am using Beta Simple Portal 2.3.8.
I installed this because the creator of that version says it fixes the following problems in SMF 2.0.18

+ Added option to disable PHP eval() function in favor of temporary PHP file creation.
+ Added option to enable an escape/backslash filter for PHP/HTML block code output.
+ Added option to purge PHP block temp folder
! Fixed decoding of character entities for HTML & PHP blocks.
+ Dynamically add $context['html_headers'] content from PHP blocks/pages.
! Fixed parsing error in installation due to recent changes in SMF.
! Fixed escaped Unicode characters for shoutbox input.
! Fixed MySQL reserved column name of "row" changed to "rowx".
! Copyright injection updated due to more recent changes in SMF.
! Changed: moved some block options to block settings
- Removed SMF 1.1.X branch support.
- Removed obsolete extra utf8 language files (all language files are UTF8)

So I am reluctant to go to Simpleportal 2.3.7 in case I then have to solve problems fixed by Beta 2.3.8.
Seems like there are problems with both simpleportal 2.3.7 and 2.3.8 from what I can understand. I am hoping there is a way to have Simpleportal with zero problems. Best wishes.

dodos26

#5676
Theoretically, this shouldn't be a problem either in 2.3.8
This change:
$content = sp_decode(trim(un_htmlspecialchars($content)));to
$content = trim(htmlspecialchars_decode($content, ENT_QUOTES));
I haven't tested it but you can test it, don't forget to back up this file.

Edit:
I tested clean 2.3.8 beta now and I have no errors there. It seems you just have to copy all the php code from the block then remove it and create a new php block.
Because the php code in the database is written incorrectly and contains set characters " ' ' ' ' ". Due to a bad save before the update.


Edit #2:
Still, I encourage you to use the native php functions I wrote above instead of running the additional functions written in 2.3.8

assemblytube

Hi Dodos26.

I made the change you suggested in simpleportal 2.3.8 portalblocks.php and custom php blocks now work.

For anyone else doing this, there are 2 lines in simpleportal 2.3.8 portalblocks.php that need to be changed.
(I believe simpleportal 2.3.8 adds extra lines of code to simpleportal 2.3.7.)
In my setup they were lines 3592, and 3635 that I changed exactly as Dodos26 says above.

Thank you so much for your help on this Dodos26. Very much appreciated. Best wishes.

dodos26

Hey, all!
I fix problem with User_Info / Login_Menu block. This block went beyond its area and did not have any responsiveness.
You can use it also as a custom php block load style using html <style>selector and remove function name in php code "function sp_userInfo($parameters, $id, $return_parameters = false)"

#1 Open Themes/default/css and open file portal.css and insert:
.sp_user_info_name
{
    display: flex;
    flex-direction: column;
    margin-bottom: 3%;
}
.sp_user_info_padding
{
    padding-bottom: 1%;
}
.sp_user_info_password
{
    display: flex;
    flex-direction: column;
    margin-bottom: 8%;
}
.sp_user_info_submit
{
    display: flex;
    justify-content: space-evenly;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    margin-bottom: 4%;
    scale: 98%;
}
#2 Faster open Sources/PortalBlocks.php find function function sp_userInfo($parameters, $id, $return_parameters = false) and replace to:
function sp_userInfo($parameters, $id, $return_parameters = false)
{
    global $context, $txt, $scripturl, $memberContext, $modSettings, $user_info, $color_profile, $settings;

    $block_parameters = array();

    if ($return_parameters)
        return $block_parameters;

    echo '
                                <div class="sp_center sp_fullwidth">';

    if ($context['user']['is_guest'])
    {
        echo '
                                    <script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/sha1.js"></script>
                                    <form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', ' >
                                        <div>
                                            <div class="sp_user_info_name">
                                                <label for="sp_user" class="sp_user_info_padding">', $txt['username'], ':</label>
                                                <input type="text" id="sp_user" name="user" size="9" value="', !empty($user_info['username']) ? $user_info['username'] : '', '" />
                                            </div><div class="sp_user_info_password">
                                                <label for="sp_passwrd" class="sp_user_info_padding">', $txt['password'], ':</label>
                                                <input type="password" name="passwrd" id="sp_passwrd" size="9" />
                                            </div><div class="sp_user_info_submit">
                                                <select name="cookielength">
                                                    <option value="60">', $txt['one_hour'], '</option>
                                                    <option value="1440">', $txt['one_day'], '</option>
                                                    <option value="10080">', $txt['one_week'], '</option>
                                                    <option value="43200">', $txt['one_month'], '</option>
                                                    <option value="-1" selected="selected">', $txt['forever'], '</option>
                                                </select>
                                                <input type="submit" value="', $txt['login'], '" class="button_submit" />
                                            </div>
                                        </div>
                                        <input type="hidden" name="hash_passwrd" value="" />
                                        <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
                                    </form>', sprintf($txt['welcome_guest'], $txt['guest_title']);
    }
    else
    {
        loadMemberData($user_info['id']);
        loadMemberContext($user_info['id'], true);

        $member_info = $memberContext[$user_info['id']];

        if (sp_loadColors($member_info['id']) !== false)
            $member_info['colored_name'] = $color_profile[$member_info['id']]['colored_name'];

        $member_info['karma']['total'] = $member_info['karma']['good'] - $member_info['karma']['bad'];

        echo '
                                    ', strtolower($member_info['name']) === 'okarin' ? 'Okae-Rin, ' : $txt['hello_member'], ' <strong>', !empty($member_info['colored_name']) ? $member_info['colored_name'] : $member_info['name'], '</strong>
                                    <br /><br />';

        if (!empty($member_info['avatar']['image']))
            echo '
                                    <a href="', $scripturl, '?action=profile;u=', $member_info['id'], '">', $member_info['avatar']['image'], '</a><br /><br />';

        if (!empty($member_info['group']))
            echo '
                                    ', $member_info['group'], '<br />';
        else
            echo '
                                    ', $member_info['post_group'], '<br />';

        echo '
                                    ', $member_info['group_stars'], '<br />';

        echo '
                                    <br />
                                    <ul class="sp_list">';

        echo '
                                        <li>', sp_embed_image('dot'), ' <strong>', $txt['posts'], ':</strong> ', $member_info['posts'], '</li>';

        if (!empty($modSettings['karmaMode']))
        {
            echo '
                                        <li>', sp_embed_image('dot'), ' <strong>', $modSettings['karmaLabel'], '</strong> ';

            if ($modSettings['karmaMode'] == 1)
                echo $member_info['karma']['total'];
            elseif ($modSettings['karmaMode'] == 2)
                echo '+', $member_info['karma']['good'], '/-', $member_info['karma']['bad'];

            echo '</li>';
        }

        if (allowedTo('pm_read'))
        {
            echo '
                                        <li>', sp_embed_image('dot'), ' <strong>', $txt['sp-usertmessage'], ':</strong> <a href="', $scripturl, '?action=pm">', $context['user']['messages'], '</a></li>
                                        <li>', sp_embed_image('dot'), ' <strong>', $txt['sp-usernmessage'], ':</strong> ', $context['user']['unread_messages'], '</li>';
        }

        echo '
                                        <li>', sp_embed_image('dot'), ' <a href="', $scripturl, '?action=unread">', $txt['unread_topics_visit'], '</a></li>
                                        <li>', sp_embed_image('dot'), ' <a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></li>';

        echo '
                                    </ul>
                                    <br />';

        echo '
                                    ', sp_embed_image('arrow'), ' <a href="', $scripturl, '?action=profile">', $txt['profile'], '</a> ', sp_embed_image('arrow'), ' <a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', $txt['logout'], '</a>';
    }

    echo '
                                </div>';
}

Effects:
You cannot view this attachment.

I also have a fixed calendar and style selection when the preview image is too large. But nobody asks :D

Advertisement: