News:

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

Main Menu

TinyPortal

Started by lurkalot, February 12, 2005, 04:43:00 AM

Previous topic - Next topic

BCK

can the shout be moved and or set to middle top instead of on lower left side? if so how?

@rjen

We have a pretty complete documentation page.

I suggest you go there first...
https://www.tinyportal.net/docs/index.php?page=Sorting-blocks
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

BCK

Perfect, Thank You,,Sorry to be a pain, I will look through the link and hopefully figure it all out..

lurkalot

Quote from: BCK on February 21, 2024, 02:13:13 PMPerfect, Thank You,,Sorry to be a pain, I will look through the link and hopefully figure it all out..

Do please look at the docs, but meanwhile, here's something to get you started.

To move it, go to TinyPortal Admin > Blocks
Click the little arrow to move it to a center (upper) panel

Visit that blocks page again,
Find the shoutbox block and click edit.

Set the shoutbox to layout 3 or 4 They are designed for going across page.

And some recommended settings as a start point.

Height of shoutbox in pixels 200

Click save.

You can tweak it from there.

There is also some more shoutbox settings in TinyPortal Admin > TPshout

BCK

Quote from: lurkalot on February 21, 2024, 02:21:57 PM
Quote from: BCK on February 21, 2024, 02:13:13 PMPerfect, Thank You,,Sorry to be a pain, I will look through the link and hopefully figure it all out..

Do please look at the docs, but meanwhile, here's something to get you started.

To move it, go to TinyPortal Admin > Blocks
Click the little arrow to move it to a center (upper) panel

Visit that blocks page again,
Find the shoutbox block and click edit.

Set the shoutbox to layout 3 or 4 They are designed for going across page.

And some recommended settings as a start point.

Height of shoutbox in pixels 200

Click save.

You can tweak it from there.

There is also some more shoutbox settings in TinyPortal Admin > TPshout
You are Awesome,, This is what makes a Mod above and beyond its functions.. Great people and support above whats needed..I can't Thank You's enough..

jsx

Recently I noticed the following errors in the log:



















I have TinyPortal 3.0 installed

tinoest

Whatever is in the content section you've redacted is likely causing the error.

jsx

#3647
Quote from: tinoest on February 21, 2024, 05:23:02 PMWhatever is in the content section you've redacted is likely causing the error.

It was normal message :)

This error is generated again and the message content is normal:


Arantor

I love how all the images are just too small to properly read any of the text because it's too much effort to just copy/paste the text.

Arantor

This is a TinyPortal bug.

The content ends in double backslash, which is considered invalid if given directly to $smcFunc['db_query'] (because the values will ordinarily be sanitised correctly by db_insert by way of db_quote but this isn't the path TP takes) - the backtrace shows it's not going via the usual methods and being sent direct.

Assuming you are 100% sure that TP's insertSQL function is sanitising correctly, and you have to be sure about it, you can *temporarily* set $modSettings['disableQueryCheck'] to true before calling (and resetting it after)

tinoest

Quote from: Arantor on February 24, 2024, 04:11:58 AMThis is a TinyPortal bug.

The content ends in double backslash, which is considered invalid if given directly to $smcFunc['db_query'] (because the values will ordinarily be sanitised correctly by db_insert by way of db_quote but this isn't the path TP takes) - the backtrace shows it's not going via the usual methods and being sent direct.

Assuming you are 100% sure that TP's insertSQL function is sanitising correctly, and you have to be sure about it, you can *temporarily* set $modSettings['disableQueryCheck'] to true before calling (and resetting it after)


It should be running through this line in db_insert.

https://github.com/SimpleMachines/SMF/blob/83db36f7db7095fa01713ba4a9ea5342323a6a29/Sources/Subs-Db-mysql.php#L783

I'll debug and work out what's wrong now I have the actual error and content.

Arantor

That's what I thought, but the screenshots suggest otherwise.

But it's definitely the backslashes tripping the security filter.

jsx

Quote from: Arantor on February 23, 2024, 07:37:49 PMI love how all the images are just too small to properly read any of the text because it's too much effort to just copy/paste the text.

I don't think this image is too small.

https://i.imgur.com/GActDRI.png

I added a screenshot to show the original error, I didn't think to copy the text.

QuoteNo direct access...

INSERT INTO smf_tp_shoutbox(`content`, `time`, `member_link`, `type`, `member_ip`, `member_id`, `edit`, `shoutbox_id`)
VALUES
('nie chcesz włożyć LB do maszyny :D\\', '1708719552', '<a href=\"https://www..pl/index.php?action=profile;u=325\">black731</a>', 'shoutbox', '83.10.12', 325, '0', 1)
Function: insertSQL

Arantor

The images as embedded onto the forum were too small for me to read on an iPad, especially as they didn't expand when I tapped on them. The text was all blurry at that size.

tinoest

Quote from: jsx on February 24, 2024, 04:30:18 AM
Quote from: Arantor on February 23, 2024, 07:37:49 PMI love how all the images are just too small to properly read any of the text because it's too much effort to just copy/paste the text.

I don't think this image is too small.

https://i.imgur.com/GActDRI.png

I added a screenshot to show the original error, I didn't think to copy the text.

QuoteNo direct access...

INSERT INTO smf_tp_shoutbox(`content`, `time`, `member_link`, `type`, `member_ip`, `member_id`, `edit`, `shoutbox_id`)
VALUES
('nie chcesz włożyć LB do maszyny :D\\', '1708719552', '<a href=\"https://www..pl/index.php?action=profile;u=325\">black731</a>', 'shoutbox', '83.10.12', 325, '0', 1)
Function: insertSQL

Can you confirm which of the following is being entered.

1.
Quotenie chcesz włożyć LB do maszyny :D\\

2.
Quotenie chcesz włożyć LB do maszyny :D\


When I try
Quotenie chcesz włożyć LB do maszyny :D\
we try and insert
QuoteINSERT INTO smf_tp_shoutbox(`content`, `time`, `member_link`, `type`, `member_ip`, `member_id`, `edit`, `shoutbox_id`)
VALUES
('nie chcesz włożyć LB do maszyny :D\\', '1708768946', '<a href=\"http://127.0.0.1/index.php?action=profile;u=1\" style=\"color: #FF0000\">admin</a>', 'shoutbox', '172.18.0.1', 1, '0', 1)

When I try
Quotenie chcesz włożyć LB do maszyny :D\\
we try and insert
QuoteINSERT INTO smf_tp_shoutbox(`content`, `time`, `member_link`, `type`, `member_ip`, `member_id`, `edit`, `shoutbox_id`)
VALUES
('nie chcesz włożyć LB do maszyny :D\\\\', '1708769095', '<a href=\"http://127.0.0.1/index.php?action=profile;u=1\" style=\"color: #FF0000\">admin</a>', 'shoutbox', '172.18.0.1', 1, '0', 1)

Both of which are being escaped...

tinoest

I have absolutely no idea how it's not tripping this error every time, but its the ; in the member_link causing the issue.

If you add $shout_name = urlencode($shout_name); after $shout_name .= ($user_info['id'] != 0) ? '>'.$context['user']['name'].'</a>' : ''; in TPShout.php this issue will go away.

Arantor

It shouldn't be tripping on that because it *should* be replacing what it knows are escaped values with %s when it steps through the string - so it can get at the 'non-content' version of the statement.

If it died every time content included ; you'd never be able to post links in any thing.

I wonder if there's something *else* going on with that.

tinoest

Quote from: Arantor on February 24, 2024, 04:23:12 PMIt shouldn't be tripping on that because it *should* be replacing what it knows are escaped values with %s when it steps through the string - so it can get at the 'non-content' version of the statement.

If it died every time content included ; you'd never be able to post links in any thing.

I wonder if there's something *else* going on with that.

The one I thought was tripping it is replaced with %s, it is also properly escaping that data. I can't see what the issue actually is, as that fixes it then I left it at that. I don't think it's a TinyPortal issue per se we follow the path and use the SMF functions to escape everything.

jsx

Quote from: tinoest on February 24, 2024, 05:05:58 AMCan you confirm which of the following is being entered.

This is the entry:

Quotenie chcesz włożyć LB do maszyny :D


tinoest

Quote from: jsx on February 25, 2024, 07:12:32 AM
Quote from: tinoest on February 24, 2024, 05:05:58 AMCan you confirm which of the following is being entered.

This is the entry:

Quotenie chcesz włożyć LB do maszyny :D



Your images and tracelog suggest it is one of the two I provided. That might be the correct one which doesn't error, but the one that does can you confirm which it is please.

Advertisement: