Advertisement:

Author Topic: SimplePortal  (Read 1547919 times)

Offline ShanesTA

  • Semi-Newbie
  • *
  • Posts: 19
Re: SimplePortal
« Reply #5520 on: April 20, 2020, 01:58:25 AM »
Hey Michael,

Your plugin has been working very well for many years now so thank you for that. Unfortunately as you said its time to be retired.

My gallery at this point is for archival purposes as the gallery images are inserted into SMF forum posts so it’s important to keep the gallery operational (readable).

I have now successfully upgraded to Gallery3 which seems to be working with php7.4? I am also planning on upgrading to 3.1.2 via the revival project (https://galleryrevival.com/ [nofollow])

Thanks
Shane

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,985
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SimplePortal
« Reply #5521 on: April 20, 2020, 01:01:50 PM »
Heads up SMF 2.0.x is still iffy on PHP 7.4 there are a few things that need to be updated.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,108
  • Gender: Male
Re: SimplePortal
« Reply #5522 on: May 29, 2020, 01:05:12 PM »
I search here and in old web https://simpleportal.net/ and I did not find solution for my question.

I need show one block only in some boards on my forum (they are around six boards and all their subboards, around 15-20 for each).

I use Advanced Options under Display Options in the block editor.



1. Show boards like a tree

I can select boards where show my block, but list of boards is order by alphabetic descending. I need show this list with board and subbords.

For example, I expect this
Code: [Select]
[ ] e Board 1
    [ ] i Board 1.1
    [ ] a Board 1.2
    [ ] f Board 1.3
[ ] b Board 2
[ ] g Board 3
    [ ] h Board 3.1
    [ ] d Board 3.2
[ ] c Board 4

but I see this
Code: [Select]
[ ] i Board 1.1
[ ] h Board 3.1
[ ] g Board 3
[ ] f Board 1.3
[ ] e Board 1
[ ] d Board 3.2
[ ] c Board 4
[ ] b Board 2
[ ] a Board 1.2

If I want select boards "e", "b" and subboards ("i", "a", "f"), it is very difficult because of I have not four boards with three subboards, I have many boards and subboards.

Is there any form for ordering like a tree? Now or in next update of Simple Portal.

About this question I found this:
https://simpleportal.net/index.php?topic=14036.msg69689#msg69689
but I think it is not solved.



2. Indicate subboards in "Custom Display Options"

By other hand I have many subboards and I can not select all subboards of one or two board. I can but it is many work, of course!

I saw field Custom Display Options https://simpleportal.net/index.php?action=docs;area=custom_blocks_display

With this I can indicate some boards with sintax
Code: [Select]
~board|1.0,~board|2.0,~board|3.0,~board|4.0But I have many boards.

Is there any form for indicate subboards? Now or in next update of Simple Portal. (For example:
Code: [Select]
~subboard|1.0,~subboard|2.0can indicate boards 1.0, 2.0 and all subboards).

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,443
  • We were all equal in the end.
Re: SimplePortal
« Reply #5523 on: May 29, 2020, 09:35:49 PM »
One of my guys is running SimplePortal 2.3.7 in 2.0.17.  Hasn't changed anything but left blocks are now displaying as top blocks.  Host may have changed something (they've done it before).

Forum version: SMF 2.0.17 (more detailed)
Current SMF version: SMF 2.0.17
GD version: bundled (2.1.0 compatible)
Database Server: MySQL
MySQL version: 5.7.30-log
Memcached: ???
PHP: 7.1.33
Server version: Apache


Errors -

Code: [Select]

http://playersprogramu.com/index.php?http://playersprogramu.com/
2: mysqli_free_result() expects parameter 1 to be mysqli_result, null given
File: /home/playersp/public_html/Sources/PortalBlocks.php
Line: 534

http://playersprogramu.com/index.php?http://playersprogramu.com/
2: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given
File: /home/playersp/public_html/Sources/PortalBlocks.php
Line: 504

http://playersprogramu.com/index.php?http://playersprogramu.com/
Database Error: Expression #5 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'playersp_smf58.a.id_attach' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
File: /home/playersp/public_html/Sources/PortalBlocks.php
Line: 483

http://playersprogramu.com/index.php?http://playersprogramu.com/
2: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given
File: /home/playersp/public_html/Sources/DonationBlock.php
Line: 173

http://playersprogramu.com/index.php?http://playersprogramu.com/
Database Error: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'playersp_smf58.smfn7_treas_donations.user_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
File: /home/playersp/public_html/Sources/DonationBlock.php
Line: 171

“There is nothing more frightful than ignorance in action.”  Goethe

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,108
  • Gender: Male
Re: SimplePortal
« Reply #5524 on: May 30, 2020, 07:44:05 AM »
I search here and in old web https://simpleportal.net/ and I did not find solution for my question. [...]
1. Show boards like a tree [...]
2. Indicate subboards in "Custom Display Options" [...]
Another question...

3. Set different width of columns at left/right in portal and forum/board

There are fields for set width of columns at left/right. These are used in blocks of portal and blocks of forum/board.

Can you add fields for set width of columns only in forum/board? I want use one width in portal and other width in board.

Offline Deaks

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,520
  • Gender: Male
    • trekkiesforyes on Facebook
    • pouvik on GitHub
    • @@deakinbryan on Twitter
    • YES
Re: SimplePortal
« Reply #5525 on: May 30, 2020, 08:31:11 AM »
I search here and in old web https://simpleportal.net/ and I did not find solution for my question. [...]
1. Show boards like a tree [...]
2. Indicate subboards in "Custom Display Options" [...]
Another question...

3. Set different width of columns at left/right in portal and forum/board

There are fields for set width of columns at left/right. These are used in blocks of portal and blocks of forum/board.

Can you add fields for set width of columns only in forum/board? I want use one width in portal and other width in board.

This is not possible by default and would require sizeable changes made to the source code for it to be done correctly.

Offline Deaks

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,520
  • Gender: Male
    • trekkiesforyes on Facebook
    • pouvik on GitHub
    • @@deakinbryan on Twitter
    • YES
Re: SimplePortal
« Reply #5526 on: May 30, 2020, 09:12:07 AM »
2. Indicate subboards in "Custom Display Options"

By other hand I have many subboards and I can not select all subboards of one or two board. I can but it is many work, of course!

I saw field Custom Display Options https://simpleportal.net/index.php?action=docs;area=custom_blocks_display

With this I can indicate some boards with sintax
Code: [Select]
~board|1.0,~board|2.0,~board|3.0,~board|4.0But I have many boards.

Is there any form for indicate subboards? Now or in next update of Simple Portal. (For example:
Code: [Select]
~subboard|1.0,~subboard|2.0can indicate boards 1.0, 2.0 and all subboards).

Their is no quick way to do it, child board are still classes as a  board just inside another one.  As for next update I would suggest holding your breathe, the project is in essence dead.

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,108
  • Gender: Male
Re: SimplePortal
« Reply #5527 on: May 30, 2020, 05:30:46 PM »
About...

1. Show boards like a tree
I did. Really it is not complex. 8) I write changes here, can be useful for anybody. I use SimplePortal 2.3.7.

Quote from: PortalAdminBlocks.php
Code: (Search) [Select]
$request = $smcFunc['db_query']('','
SELECT id_board, name
FROM {db_prefix}boards
ORDER BY name DESC'
);
$context['display_boards'] = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$context['display_boards']['b' . $row['id_board']] = $row['name'];
$smcFunc['db_free_result']($request);
Code: (Replace by) [Select]
$request = $smcFunc['db_query']('','
SELECT id_board, child_level, name
FROM {db_prefix}boards
ORDER BY board_order ASC'
);
$context['display_boards'] = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$context['display_boards']['b' . $row['id_board']] = array($row['child_level'], $row['name']);
$smcFunc['db_free_result']($request);

Quote from: PortalAdminBlocks.template.php
Code: (Search) [Select]
foreach ($context['display_' . $type] as $index => $action)
{
echo '
<li><input type="checkbox" name="display_', $type, '[]" id="', $type, $index, '" value="', $index, '"', in_array($index, $context['SPortal']['block']['display']) ? ' checked="checked"' : '', ' class="input_check" /> <label for="', $type, $index, '">', $action, '</label></li>';
}

echo '
<li><input type="checkbox" onclick="invertAll(this, this.form, \'display_', $type, '[]\');" class="input_check" /> <em>', $txt['check_all'], '</em></li>
</ul>
<br />';
Code: (Replace by) [Select]
foreach ($context['display_' . $type] as $index => $action)
{
if ('boards' == $type)
echo '
<li style="width: 100%; padding-left: ', $action[0], 'em;"><input type="checkbox" name="display_', $type, '[]" id="', $type, $index, '" value="', $index, '"', in_array($index, $context['SPortal']['block']['display']) ? ' checked="checked"' : '', ' class="input_check" /> <label for="', $type, $index, '">', $action[1], '</label></li>';
else
echo '
<li><input type="checkbox" name="display_', $type, '[]" id="', $type, $index, '" value="', $index, '"', in_array($index, $context['SPortal']['block']['display']) ? ' checked="checked"' : '', ' class="input_check" /> <label for="', $type, $index, '">', $action, '</label></li>';
}

echo '
<li', 'boards' == $type ? ' style="width: 100%;"' : '', '><input type="checkbox" onclick="invertAll(this, this.form, \'display_', $type, '[]\');" class="input_check" /> <em>', $txt['check_all'], '</em></li>
</ul>
<br />';



2. Indicate subboards in "Custom Display Options"
Their is no quick way to do it, child board are still classes as a  board just inside another one.
Yes, I saw. :( I tried add variable "subboard" in field Custom Display Option, but it is not possible.
In order to do this is necesary add a row "add_child" in database, and it is complex.



3. Set different width of columns at left/right in portal and forum/board
This is not possible by default and would require sizeable changes made to the source code for it to be done correctly.
Yes. :(

I add a code in order to do this (it is a quickly way, but it is not correct, I know!)
Quote from: Portal.template.php
Code: (Search) [Select]
echo '
<td id="sp_right"', !empty($modSettings['rightwidth']) ? ' width="' . $modSettings['rightwidth'] . '"' : '', $context['SPortal']['sides'][4]['collapsed'] && empty($modSettings['sp_disable_side_collapse']) ? ' style="display: none;"' : '', '>';
Code: (Replace by) [Select]
echo '
<td id="sp_right"', !empty($modSettings['rightwidth']) ? ' width="' . (!empty($context['current_board']) ? 110 : $modSettings['rightwidth']) . '"' : '', $context['SPortal']['sides'][4]['collapsed'] && empty($modSettings['sp_disable_side_collapse']) ? ' style="display: none;"' : '', '>';
(if we are in board, width=110, else width=$modSettings['rightwidth'])

Offline Chen Zhen

  • Sophist Member
  • *****
  • Posts: 1,285
  • Gender: Male
  • If you're going through hell, keep going!
    • Underdog-01 on GitHub
    • WebDev.ca
Re: SimplePortal
« Reply #5528 on: May 30, 2020, 11:05:02 PM »
    @Sir Osis of Liver:

    Some things to look for:
    • PHP block with an improper MySQL query ~ disable custom blocks 1 at a time and check the home page and/or forum afterward to figure out the problem block
    • Block(s) with improper HTML causing the table structure to appear out of whack
    • Disable ONLY_FULL_GROUP_BY mode in MySQL or adjust DB queries in blocks to adhere to the setting

ref. for point #3:  https://stackoverflow.com/questions/23921117/disable-only-full-group-by


My SMF Mods & Plug-Ins

WebDev

Request politely & demand nothing.

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,443
  • We were all equal in the end.
Re: SimplePortal
« Reply #5529 on: May 31, 2020, 10:50:54 PM »
Thanks, Chen.  It was ONLY_FULL_GROUP_BY, I had found that on stackoverflow but did not have permission to change sql mode (shared server).  Told my guy to ask host support to remove it, they did, but for reasons unknown they denied that it was anything on their end.  Looks like they upgraded server to mysql 5.7 and borked the config.  Errors have stopped and blocks are displaying correctly.  Not the first time they broke his forum, and not the first time they bs'ed him.  Seems like some of these hosts are run by children.
“There is nothing more frightful than ignorance in action.”  Goethe

Offline Chen Zhen

  • Sophist Member
  • *****
  • Posts: 1,285
  • Gender: Male
  • If you're going through hell, keep going!
    • Underdog-01 on GitHub
    • WebDev.ca
Re: SimplePortal
« Reply #5530 on: June 01, 2020, 02:32:21 PM »

It's not that the host changed those settings but likely that the default settings for that MySQL version enables it.
I manage my own VPS, have to update these things and have had that setting automatically applied by default.

Here is a reference to MySQL 5.7 default values for sql_mode:
https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_sql_mode
 

My SMF Mods & Plug-Ins

WebDev

Request politely & demand nothing.

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,443
  • We were all equal in the end.
Re: SimplePortal
« Reply #5531 on: June 01, 2020, 09:45:36 PM »
Trying to get him to move.  Another table crashed last night, we're still getting 403s from mod_evasive, even though they told him they fixed it.  Busy forum on a crappy host. :P
“There is nothing more frightful than ignorance in action.”  Goethe

Offline Xpresskonami

  • Jr. Member
  • **
  • Posts: 318
  • Gender: Male
Re: SimplePortal
« Reply #5532 on: June 11, 2020, 03:56:46 AM »
Hello, please is there any method or code to crawl the first image from topic post to simple portal block boardnews ???

Offline Xpresskonami

  • Jr. Member
  • **
  • Posts: 318
  • Gender: Male
Re: SimplePortal
« Reply #5533 on: June 11, 2020, 04:34:58 AM »
Hello, please is there any method or code to crawl the first image from topic post to simple portal block boardnews ???

Check this image for preview

1

Offline Chen Zhen

  • Sophist Member
  • *****
  • Posts: 1,285
  • Gender: Male
  • If you're going through hell, keep going!
    • Underdog-01 on GitHub
    • WebDev.ca
Re: SimplePortal
« Reply #5534 on: June 15, 2020, 11:25:51 AM »

What does that image represent?
Are you able to have images from other posts show but just the initial post's image does not?

My SMF Mods & Plug-Ins

WebDev

Request politely & demand nothing.

Offline 0ver12

  • Semi-Newbie
  • *
  • Posts: 26
Re: SimplePortal
« Reply #5535 on: June 17, 2020, 09:17:55 PM »
Hi. I'm having a issue with the right block (the only one I currently use).

The block is very close to the boards and  I don't know how can I set a margin to fix this.

I would like to set a 10 or 15px of distance from the block to the boards.

The image below show the issue.

Thanks!

Offline Chen Zhen

  • Sophist Member
  • *****
  • Posts: 1,285
  • Gender: Male
  • If you're going through hell, keep going!
    • Underdog-01 on GitHub
    • WebDev.ca
Re: SimplePortal
« Reply #5536 on: June 17, 2020, 10:38:32 PM »

It looks like the columns are right against each other.
Perhaps it's due to a narrow theme container (tag) or you adjusted the block widths?

There is an actual style input at the bottom right of editing the block but that will only effect what is inside the block.
That option will only work if you opt no title & no body from the block settings.

If you want the default body & title then you can do one of 3 things to adjust the block settings.
  • adjust the block width settings in: Admin ~ Simple Portal ~ Configuration ~ Block Settings ... Adjust width settings for left & right blocks (this is in px)
  • edit file: ../Themes/default/css/portal.css and add css to the .sp_right class (this requires clearing browser history to see changes)
  • manually edit file: ../Themes/default/Portal.template.php

Example of manually editing the template file:

find:
Code: [Select]
echo '
<td id="sp_right"', !empty($modSettings['rightwidth']) ? ' width="' . $modSettings['rightwidth'] . '"' : '', $context['SPortal']['sides'][4]['collapsed'] && empty($modSettings['sp_disable_side_collapse']) ? ' style="display: none;"' : '', '>';

replace with something like this:
Code: [Select]
echo '
<td id="sp_right"', !empty($modSettings['rightwidth']) ? ' width="' . $modSettings['rightwidth'] . '"' : '', $context['SPortal']['sides'][4]['collapsed'] && empty($modSettings['sp_disable_side_collapse']) ? ' style="display: none;"' : 'style="right: -2em;
position: relative;"', '>';


My SMF Mods & Plug-Ins

WebDev

Request politely & demand nothing.

Offline 0ver12

  • Semi-Newbie
  • *
  • Posts: 26
Re: SimplePortal
« Reply #5537 on: June 18, 2020, 06:44:18 AM »

It looks like the columns are right against each other.
Perhaps it's due to a narrow theme container (tag) or you adjusted the block widths?

There is an actual style input at the bottom right of editing the block but that will only effect what is inside the block.
That option will only work if you opt no title & no body from the block settings.

If you want the default body & title then you can do one of 3 things to adjust the block settings.
  • adjust the block width settings in: Admin ~ Simple Portal ~ Configuration ~ Block Settings ... Adjust width settings for left & right blocks (this is in px)
  • edit file: ../Themes/default/css/portal.css and add css to the .sp_right class (this requires clearing browser history to see changes)
  • manually edit file: ../Themes/default/Portal.template.php

Example of manually editing the template file:

find:
Code: [Select]
echo '
<td id="sp_right"', !empty($modSettings['rightwidth']) ? ' width="' . $modSettings['rightwidth'] . '"' : '', $context['SPortal']['sides'][4]['collapsed'] && empty($modSettings['sp_disable_side_collapse']) ? ' style="display: none;"' : '', '>';

replace with something like this:
Code: [Select]
echo '
<td id="sp_right"', !empty($modSettings['rightwidth']) ? ' width="' . $modSettings['rightwidth'] . '"' : '', $context['SPortal']['sides'][4]['collapsed'] && empty($modSettings['sp_disable_side_collapse']) ? ' style="display: none;"' : 'style="right: -2em;
position: relative;"', '>';

Thank you very much, my friend!

I tried the first two tips and it doesn't work, but the 3rd tip works perfectly!

Thanks again, see ya!

Offline Xpresskonami

  • Jr. Member
  • **
  • Posts: 318
  • Gender: Male
Re: SimplePortal
« Reply #5538 on: June 19, 2020, 06:24:51 AM »

What does that image represent?
Are you able to have images from other posts show but just the initial post's image does not?

No am trying to grid the simple portal boardnews to be like this image post

Offline 0ver12

  • Semi-Newbie
  • *
  • Posts: 26
Re: SimplePortal
« Reply #5539 on: June 19, 2020, 02:55:52 PM »
I'm having another issue with the blocks...

I'm trying to use a Custom Body Class, so I added my CSS code to index.css and then filled the Custom Body Class with the name of the class, but the block don't change... How can I solve it?