News:

Wondering if this will always be free?  See why free is better.

Main Menu

SimplePortal

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

Previous topic - Next topic

ShanesTA

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

vbgamer45

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

davidhs

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
[ ] 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
[ ] 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
~board|1.0,~board|2.0,~board|3.0,~board|4.0
But I have many boards.

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

Sir Osis of Liver

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 -



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


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

davidhs

Quote from: davidhs 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. [...]
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.

Deaks

Quote from: davidhs on May 30, 2020, 07:44:05 AM
Quote from: davidhs 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. [...]
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.
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Deaks

Quote from: davidhs on May 29, 2020, 01:05:12 PM
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
~board|1.0,~board|2.0,~board|3.0,~board|4.0
But I have many boards.

Is there any form for indicate subboards? Now or in next update of Simple Portal. (For example:
~subboard|1.0,~subboard|2.0
can 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.
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

davidhs

About...

Quote from: davidhs on May 29, 2020, 01:05:12 PM
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 />';




Quote from: Deaks on May 30, 2020, 09:12:07 AM
Quote from: davidhs on May 29, 2020, 01:05:12 PM
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.




Quote from: Deaks on May 30, 2020, 08:31:11 AM
Quote from: davidhs on May 30, 2020, 07:44:05 AM
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'])

Chen Zhen

    @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

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Sir Osis of Liver

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.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Chen Zhen


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

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Sir Osis of Liver

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
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Xpresskonami

Hello, please is there any method or code to crawl the first image from topic post to simple portal block boardnews ???

Xpresskonami

Quote from: Xpresskonami 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 ???

Check this image for preview

1

Chen Zhen


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

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

0ver12

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!

Chen Zhen


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:

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:

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

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

0ver12

Quote from: Chen Zhen 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:

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:

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!

Xpresskonami

Quote from: Chen Zhen 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?

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

0ver12

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?


Advertisement: