Skip to main content
[ADDON] SimplePortal Started by Spuds · · Read 323747 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

Re: [ADDON] SimplePortal

Reply #600

I'll take a look at these this weekend and see what I can do  :cool:

Re: [ADDON] SimplePortal

Reply #601

Quote from: Ruth – 1.
This block "Theme Selection" displays each theme, which was installed once on forum. Members see them all. It would be a lot better and less confusing, if they could only see this 2 or 3 themes, they are allowed to select at the moment. Can this be changed?
Looks like a bug ... the selection list in the block was not honoring the selectable themes.   The attached ThemeSelect.block.php should fix this.  It goes in sources/subs/spblocks
Quote from: Ruth – 2.
For some reason (maybe caused by my changings in portal css) my "articles" in portal look all the same, they have the same styling. In the preview I see other backgrounds, I could select. But after saving the articles, they all will have the same background.

Another thing are the two "reply buttons" there. One tells "reply", the other one tells "write a comment". Both do the same, there will be a new comment then. Why are there two buttons?
I'm not seeing this in the article areas that have checked, so I need some more information.  I checked both portal articles and article blocks.
Quote from: Ruth – 3.
Using various backgrounds and roundframes in portal blocks is working fine. But I was not able yet to create another header for portal blocks. My tries had very funny results so far. Lol. I think, I did this wrong or I inserted the class for another header in a wrong way. How does this work? I also don't understand, what I need to insert in "Custom Title Style".
a custom style needs to be the complete set of CSS rules for that title.  As a silly example, using the following in a style profile
Code: [Select]
background: green;font-size: 2em;padding: 10px 10px 2px 10px;line-height: 1em;border: 1px solid;border-radius: 10px 10px 0 0;color: #fff;overflow: hidden;text-shadow: 4px 4px #111111;
should give you a starting point of what to do.
Quote from: Ruth – 4.
I fear, there is something wrong with the smileys on elk11, Spuds. I created a new shoutbox now, but the smileys are not displayed there in the shouts. Only the code of them is to see in shoutbox.
Oh goodie, another bug:bug:The attached PortalShoutbox.subs.php should fix that one:pleading_face:  It goes in sources/subs

Re: [ADDON] SimplePortal

Reply #602

Thank you very much, Spuds.  :smiley:  I will try them...

To articles:

This 3 buttons are to see, if I look at a categorie for articles. The buttons say "read more", "reply" and "write a comment".

3 buttons.jpg

"Reply" and "write a comment" can both be used, and both do the same: There will be another comment then in this article. So I don't understand, why there are two buttons for the same result. Should the reply-button do something different?



Edit:

The smileys in shoutbox are displayed now and theme selection is also working perfect.  :smiley:  Thank you very much, Spuds!
Last Edit: May 29, 2023, 01:42:00 am by Ruth

Re: [ADDON] SimplePortal

Reply #603

Glad we have a couple of the issues fixed.

I'm still not seeing the 3 buttons in any article views (there should only be 2, view more and comment).  What version of SP are you running?

Re: [ADDON] SimplePortal

Reply #604

Thats elk11, so the newest version of portal: 1.0.2

I only have 3 buttons, if i look at a category of articles in ACP.
In the "normal view" of articles there are just 2 buttons.

Re: [ADDON] SimplePortal

Reply #605

I think may be happening is that you are viewing an article that has comments?.   In that case you would see (3) buttons

"Read More" <- takes you to the full article $txt['sp_read_more']
"Comments" <- takes you to the top of the comment listing $txt['sp-articlesComments']
"Write Comment" <- positions the new comment textbox in  view $txt['sp_write_comment']

The write comment button does not focus/select the textarea, so if you only have one or two comments the buttons look to do the same thing.  I'll make an update that will position the cursor inside the textbox when you select "write comment", it should have done this anyway.

Re: [ADDON] SimplePortal

Reply #606

Yes...I changed the language now on forum.

articles.jpg

I was confused, because the button in the middle does not say "show comments" in german, it says "reply"....and there is a field for typing, if I click on the button in the middle. Thats still the old german language file there, i made years ago. Articles were not really working those days, so translating was a lot of guessing. :wink:

I will change the text of this button in the middle in the german language file.

Re: [ADDON] SimplePortal

Reply #607

@Spuds

Is there a way to have all attachments visible in the "Board News" block?

Also, I'd like to have the avatar show in the recent topics block, instead of the that's next to each post.

FYI, in the admin panel, the icon for the Blocks menu is not showing.


Re: [ADDON] SimplePortal

Reply #608

I'll take a look and see what I can do ....

The missing icon is usually due to an install in a custom theme and the the themes/YOUR THEME/images/sp directory not getting written ... so just copy that over from the default theme

Re: [ADDON] SimplePortal

Reply #609

Here is a quick enhanced recent topic block for testing.

To use simply add the attached file to your sites /sources/subs/spblocks directory, it will then magically:magic_wand:be available as a block type in the admin panel.  Then add and tweak it like any other built in block.  The block name is Recent Extended

ETA: updated to support 7.4+

Re: [ADDON] SimplePortal

Reply #610

@Spuds

Tried to use the new block, and when try to add block, I get this:

Code: [Select]
An Error Has Occurred
syntax error, unexpected ':', expecting ')'

When look at the file, I find an error somewhere in here:

Code: [Select]
		// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = $this->_db->query('substring', db_string: '
SELECT
mf.subject,
ml.id_msg, ml.id_topic, ml.id_member, ml.poster_time,
b.id_board, b.name AS bName,
t.num_replies, t.num_views, t.id_first_msg, t.id_last_msg,
COALESCE(mem.real_name, ml.poster_name) AS poster_name, ' . ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' : '
COALESCE(lt.id_msg, lmr.id_msg, 0) >= ml.id_msg_modified AS is_read,
COALESCE(lt.id_msg, lmr.id_msg, -1) + 1 AS new_from') . ', mf.smileys_enabled, mf.icon, mg.online_color' .
$preview_bodies . '
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)
INNER JOIN {db_prefix}messages AS ml ON (ml.id_msg = t.id_last_msg)
LEFT JOIN {db_prefix}boards AS b ON (b.id_board = mf.id_board)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = ml.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})' : '') . '
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = mem.id_group)
WHERE t.id_last_msg >= {int:likely_max_msg}
AND b.id_board = t.id_board' . ($boards === null ? '' : '
AND b.id_board IN ({array_int:include_boards})') . '
AND {query_wanna_see_board}' . ($modSettings['postmod_active'] ? '
AND t.approved = {int:is_approved}
AND ml.approved = {int:is_approved}' : '') . '
ORDER BY t.id_last_msg DESC
LIMIT {int:limit}',
db_values: [
'current_member' => $user_info['id'],
'include_boards' => $boards,
'limit' => $limit,
'is_approved' => 1,
'likely_max_msg' => $modSettings['maxMsgID'] - 25 * min($limit, 5),
'preview_char' => $preview_char,
]
);

Re: [ADDON] SimplePortal

Reply #611

Strange .... did it log the error in admin panel to give us the line?  What options did you choose, I probably messed up some conditional logic.

Re: [ADDON] SimplePortal

Reply #612

Quote from: Spuds – Strange .... did it log the error in admin panel to give us the line?  What options did you choose, I probably messed up some conditional logic.

I didn't get to make any options. As soon as I clicked the Add Block button, I got the error. Never even got to the block selection page.

Code: [Select]
Type of error: General
Exception: syntax error, unexpected ':', expecting ')'
index.php?action=admin;area=portalblocks;sa=add;col=1
File: /sources/subs/spblocks/RecentEx.block.php
Line: 139

Re: [ADDON] SimplePortal

Reply #613

I re-posted the file, give that one a try.  I think the issue is simply I've been using PHP 8.1 and I'm guessing you are on 7.4, the update should address that.

Re: [ADDON] SimplePortal

Reply #614

Quote from: Spuds – I re-posted the file, give that one a try.  I think the issue is simply I've been using PHP 8.1 and I'm guessing you are on 7.4, the update should address that.

Will try it later, when back at the PC.
Yes, I have to use 7.4 due to Levertine, as it sticks at processing images when uploading when using PHP 8.x.