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

@rjen

The English files already contain this fix: I see it it missing in the Polish file, so update that one...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

jsx

Thanks for the help. :)

lurkalot

Quote from: jsx on February 12, 2020, 04:55:35 AM
In what file should I replace these lines? In the files TPortal.english.php and TPortal.english-utf8.php and TPortal.polish-utf8.php?

TPortal.english.php and TPortal.english-utf8.php should that code.  So, TPortal.polish-utf8.php

@rjen

Quote from: big red on February 11, 2020, 10:18:17 PM
Search isn't returning anything so thought i would ask

  I would like a "Newest Member Block" including the avatar but not seeing it in the available block list?

You can create one using a PHP block. It is not available as a standard block...

Create a PHP block and put this in the code. It will show the newest user with avatar (if he/she has an avatar) or just the name if they don't...


global $memberContext;
$user_id = $context['common_stats']['latest_member']['id'];
loadMemberData(array($context['common_stats']['latest_member']['id']));
loadMemberContext($user_id);
if (!empty($memberContext[$user_id]['avatar']['image']))
echo '<div align="center">'.$memberContext[$user_id]['avatar']['image'].'<br>'.$context['common_stats']['latest_member']['link'].'</div>';
else
echo '<div align="center">'.$context['common_stats']['latest_member']['link'].'</div>';


or (without avatar):

ssi_latestMember();
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

big red

Quote from: lurkalot on February 12, 2020, 03:08:23 AM
Downloads block, you can create this buy adding a new Block, choose type "Article / Download Functions" Then in that block choose one of the required options,

Downloads: Show x New Files
Downloads: Top x Downloads
Downloads: Top x Views
Downloads: Latest File Uploaded
Downloads: Top File in Downloads
Downloads: Top File in Views
Articles: recently written
Articles: top views
Articles: top comments

  Yes - that one does work but is missing the option that i would like and that is to show my 3 download folders in a block.

big red

Quote from: @rjen on February 12, 2020, 04:45:31 PM
Quote from: big red on February 11, 2020, 10:18:17 PM
Search isn't returning anything so thought i would ask

  I would like a "Newest Member Block" including the avatar but not seeing it in the available block list?

You can create one using a PHP block. It is not available as a standard block...

Create a PHP block and put this in the code. It will show the newest user with avatar (if he/she has an avatar) or just the name if they don't...


global $memberContext;
$user_id = $context['common_stats']['latest_member']['id'];
loadMemberData(array($context['common_stats']['latest_member']['id']));
loadMemberContext($user_id);
if (!empty($memberContext[$user_id]['avatar']['image']))
echo '<div align="center">'.$memberContext[$user_id]['avatar']['image'].'<br>'.$context['common_stats']['latest_member']['link'].'</div>';
else
echo '<div align="center">'.$context['common_stats']['latest_member']['link'].'</div>';


or (without avatar):

ssi_latestMember();


  Working and so far showing No Errors. Thank You so much!  8)

Antechinus

This isn't a TP support question as such, but is something I'm idly curious about. How difficult would it be to expand block placement options, to allow blocks between posts and categories?

The reason I'm curious is that TP is already close to being a comprehensive ad management system (if used for that purpose) so it occurred to me to wonder if it could be extended with the extra placement options. Has anyone ever considered this?

lurkalot

Quote from: Antechinus on February 14, 2020, 05:54:21 PM

Has anyone ever considered this?


Considered , yes.  ;)  It's a good idea and would make use of this myself for that very purpose.  We already made the news block work interdependently from the SMF news, so even with the news deactivated from the theme header you can still display random news in the news block.  That's also a handy option for adding random banner ads.

But as for how difficult it would be to put blocks between posts etc, unfortunately I haven't a clue, and best answered by one of our Developers.


big red

The "Help" tab on the menu doesn't provide much to users so would like to remove that help tab and have something like a "Quick Support Block"

  Would be something along the lines of a user can type in a few lines and then click "Send" which goes to the Admin Message Inbox. Or if that isn't possible, keep the help tab but change the TP Text to something else.

  Any thoughts on this?

big red

I have the TP Shout to manual scroll but would like to reverse it and have the new shouts appear at the bottom and not the top. What would i change for this?

@rjen

Quote from: big red on February 16, 2020, 09:01:24 PM
I have the TP Shout to manual scroll but would like to reverse it and have the new shouts appear at the bottom and not the top. What would i change for this?

There is no setting for that. Changing the shout order would require a code change..
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Antechinus

Just a thought: you could try display: flex; flex-direction: column-reverse; in the css. That might do the trick.

ETA: Just went over there and tried it. This works.

  .tp_shoutframe{
    display: flex;
    flex-direction: column-reverse;
  }
  {
  .tp_shoutframe>div{
    flex: 0 0 auto;
  }

big red

Quote from: Antechinus on February 17, 2020, 02:18:26 AM
Just a thought: you could try display: flex; flex-direction: column-reverse; in the css. That might do the trick.

ETA: Just went over there and tried it. This works.

  .tp_shoutframe{
    display: flex;
    flex-direction: column-reverse;
  }
  {
  .tp_shoutframe>div{
    flex: 0 0 auto;
  }


  Awesome - which file exactly do i add this to please?

Antechinus

index.css would work. Or any TP css file would also work. Just tack it on the end.

big red

I added it at the end of the default theme index css as i couldn't find one for TP but didn't work. Could you see if i did it right?

Antechinus

You added it inside the media query for print, so it will only be active if you fire up a printer.

Code (You have this) Select
/* Styles for print media.
------------------------------------------------------- */
@media print
{
#headerarea
{
display: none;
}

.tborder
{
border: none;
}
        .tp_shoutframe{
          display: flex;
          flex-direction: column-reverse;
        }
        {
        .tp_shoutframe>div{
          flex: 0 0 auto;
        }
}


See that last curly bracket? That closes the @media for print. You put it inside the brackets, which is causing the problem.

Do it like this, with the new code outside anyone else's curly brackets.

Code (You have this) Select
/* Styles for print media.
------------------------------------------------------- */
@media print
{
#headerarea
{
display: none;
}

.tborder
{
border: none;
}
}
/* Put your new code here.
------------------------------------------------------- */
.tp_shoutframe{
  display: flex;
  flex-direction: column-reverse;
}
{
.tp_shoutframe>div{
  flex: 0 0 auto;
}

landyvlad

Quote from: big red on February 15, 2020, 02:24:14 PM
The "Help" tab on the menu doesn't provide much to users so would like to remove that help tab and have something like a "Quick Support Block"

  Would be something along the lines of a user can type in a few lines and then click "Send" which goes to the Admin Message Inbox. Or if that isn't possible, keep the help tab but change the TP Text to something else.

  Any thoughts on this?

Are you talking about the TinyPortal Help or the standard SMF help
The latter is https://www.simplemachines.org/community/index.php?action=help
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

lurkalot

Quote from: big red on February 15, 2020, 02:24:14 PM
The "Help" tab on the menu doesn't provide much to users so would like to remove that help tab and have something like a "Quick Support Block"

  Would be something along the lines of a user can type in a few lines and then click "Send" which goes to the Admin Message Inbox. Or if that isn't possible, keep the help tab but change the TP Text to something else.

  Any thoughts on this?

You can remove TinyPortal from the help tab using the edit here, https://www.simplemachines.org/community/index.php?topic=27642.msg4026706#msg4026706

big red

Busy work week so Sorry for the late reply. And Thank You for yours  ;)

The help tab i just decided to change true to false to have it disappear. As for the reverse scrolling of the shoutbox, i tried your last suggestion Antechinus in default theme index css and still the new posts start at the top.

  Also i would like the blocks to disappear if someone is viewing in "Mobile View". Can this be done as i don't see anything in the settings. As it stands, the blocks just get pushed to the bottom.

Slonik :)

How can I add Key Tags (Hashtags or Global Tags) service to articles?

Maybe in the next versions of TP? :)


Advertisement: