TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,947
  • Latest: sgm09
Stats
  • Total Posts: 195,750
  • Total Topics: 21,279
  • Online today: 311
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 279
  • Total: 280
  • @rjen

A couple more questions (sorry) 😊

Started by [chrisB], March 19, 2025, 09:49:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

[chrisB]

As I have mentioned before, I use VBGamers Pretty URL Pro mod. (I know how many SMF users feel about it) 😆

I would like to add all the TinyPortal URLs to the sitemap it generates, with the following area being mentioned as needing to be modified.

$context['sitemap']['items'] = array();
The thing, I can only assume what should be there.

I know this code isn't correct, as I have tried it, but if someone could please amend it (no rush) - I would be very grateful.

    // TinyPortal Content
if (isset($modSettings['tp_enable_sitemap']) && $modSettings['tp_enable_sitemap'])
{
    // Add TinyPortal pages or blocks to the sitemap
    $context['sitemap']['items'] = array_merge($context['sitemap']['items'], pretty_TinyPortalXML());
}

I know this is a big ask, but having the URLs generated nicely with the sitemap would be nice.
----

Lastly, I did search here and I found a topic that seemed to be very similar. However, I wasn't sure how it would be applied in my scenario but honestly I do use the search function.
I even asked on SMF's forums here, but I still can't suss it out: https://www.simplemachines.org/community/index.php?topic=591292.msg4187692#msg4187692

I would like to sort out what shows as active when visiting.

Currently, the about page I created links to home, which has been described as the default behaviour but I don't know how to change this. Please could you explain how I can add the missing active tabs to my site, so I can get everything showing as active in the right area?

@rjen

Quote from: [chrisB] on March 19, 2025, 09:49:07 PMI would like to add all the TinyPortal URLs to the sitemap it generates, with the following area being mentioned as needing to be modified.

Code Select Expand
$context['sitemap']['items'] = array();
The thing, I can only assume what should be there.

I know this code isn't correct, as I have tried it, but if someone could please amend it (no rush) - I would be very grateful.

Code Select Expand
    // TinyPortal Content
if (isset($modSettings['tp_enable_sitemap']) && $modSettings['tp_enable_sitemap'])
{
    // Add TinyPortal pages or blocks to the sitemap
    $context['sitemap']['items'] = array_merge($context['sitemap']['items'], pretty_TinyPortalXML());
}

I know this is a big ask, but having the URLs generated nicely with the sitemap would be nice.

Sorry, I do not know how this sitemap function works exactly, and I have no desire or time to find out.
Running Latest TP on SMF2.1 at: www.fjr-club.nl

@rjen

Quote from: [chrisB] on March 19, 2025, 09:49:07 PMLastly, I did search here and I found a topic that seemed to be very similar. However, I wasn't sure how it would be applied in my scenario but honestly I do use the search function.
I even asked on SMF's forums here, but I still can't suss it out: https://www.simplemachines.org/community/index.php?topic=591292.msg4187692#msg4187692

I would like to sort out what shows as active when visiting.

Currently, the about page I created links to home, which has been described as the default behaviour but I don't know how to change this. Please could you explain how I can add the missing active tabs to my site, so I can get everything showing as active in the right area?

I will look into this
Running Latest TP on SMF2.1 at: www.fjr-club.nl

[chrisB]

Would you be able to point me in the direction of what line of code creates this, please?


I assumed it would be the article.php file in sources, but I can't figure out what line is responsible. To make sense of why I seek it, I would like to add my site's name to it.

Title - Site Name

So, it's consistent throughout the main pages like this.


Quote from: @rjen on March 23, 2025, 10:21:34 PM
Quote from: [chrisB] on March 19, 2025, 09:49:07 PMI would like to add all the TinyPortal URLs to the sitemap it generates, with the following area being mentioned as needing to be modified.

Code Select Expand
$context['sitemap']['items'] = array();
The thing, I can only assume what should be there.

I know this code isn't correct, as I have tried it, but if someone could please amend it (no rush) - I would be very grateful.

Code Select Expand
    // TinyPortal Content
if (isset($modSettings['tp_enable_sitemap']) && $modSettings['tp_enable_sitemap'])
{
    // Add TinyPortal pages or blocks to the sitemap
    $context['sitemap']['items'] = array_merge($context['sitemap']['items'], pretty_TinyPortalXML());
}

I know this is a big ask, but having the URLs generated nicely with the sitemap would be nice.

Sorry, I do not know how this sitemap function works exactly, and I have no desire or time to find out.

No worries. 👍🏻
Quote from: @rjen on March 23, 2025, 10:22:05 PM
Quote from: [chrisB] on March 19, 2025, 09:49:07 PMLastly, I did search here and I found a topic that seemed to be very similar. However, I wasn't sure how it would be applied in my scenario but honestly I do use the search function.
I even asked on SMF's forums here, but I still can't suss it out: https://www.simplemachines.org/community/index.php?topic=591292.msg4187692#msg4187692

I would like to sort out what shows as active when visiting.

Currently, the about page I created links to home, which has been described as the default behaviour but I don't know how to change this. Please could you explain how I can add the missing active tabs to my site, so I can get everything showing as active in the right area?

I will look into this

Thank you, it's probably much easier than I think but I don't understand what I'm supposed to do.

PS. I hope you enjoyed your holiday, rjen, if you are still away, please don't take time out of it to respond to this now but thank you for your help as always.

@rjen

Quote from: [chrisB] on March 24, 2025, 12:17:10 PMWould you be able to point me in the direction of what line of code creates this, please?

No clue what I am looking at here...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

@rjen

Well I think you are referring to the Tab description in the browser..
It would help if you provided a clearer screenshot or description.

I am afraid I cannot help you here, because as far as I can see it is your custom theme doing stuff here.
In the standard Theme the extra stuff is not available , so it seems your theme has some extra stuff that does not play nice with TinyPortal..
Running Latest TP on SMF2.1 at: www.fjr-club.nl

[chrisB]

Quote from: @rjen on March 24, 2025, 02:10:42 PM
Quote from: [chrisB] on March 24, 2025, 12:17:10 PMWould you be able to point me in the direction of what line of code creates this, please?

No clue what I am looking at here...

It's the title displayed on browser tabs.

Quote from: @rjen on March 24, 2025, 02:20:56 PMWell I think you are referring to the Tab description in the browser..
It would help if you provided a clearer screenshot or description.

I am afraid I cannot help you here, because as far as I can see it is your custom theme doing stuff here.
In the standard Theme the extra stuff is not available , so it seems your theme has some extra stuff that does not play nice with TinyPortal..


I have created pages using articles, which is what the 'about' page is. All I need to know is how to make them not fall back to the default which I have been told is the default action due to them not existing. I can confirm it happens in the default theme.



In this screenshot, that is the default theme (which can't be selected by non admins). The page is "about", created within TinyPortal but it shows the home as being active. I would like to make the menu item "about" active.

If I could understand where and how to achieve this, I could fix the other pages which don't exist in the standard SMF install.

@rjen

You are mixing two different questions now: I am stricktly referring to the question on "Title - Site Name", nothing to do with the highlighting of the menu options...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

[chrisB]

Quote from: @rjen on March 24, 2025, 04:05:02 PMYou are mixing two different questions now: I am stricktly referring to the question on "Title - Site Name", nothing to do with the highlighting of the menu options...

So, let's focus on that then. What file generates the title for the browser tabs for articles (pages)?

https://poetryartonline.com/about/
https://poetryartonline.com/news/

When I create articles as pages, something within the TinyPortal code is saying to call the tabs what the name of the article is. Can you please tell me what part that is?

This has nothing to do with my theme.

@rjen

As I said it is your theme doing funny stuff adding site name to the tabs: that is NOT TinyPortal

QuoteI am afraid I cannot help you here, because as far as I can see it is your custom theme doing stuff here.
In the standard Theme the extra stuff is not available , so it seems your theme has some extra stuff that does not play nice with TinyPortal..

In combination with Pretty URLs all bets are of..

If you feel lucky, look in TPortal.php, look for $context['page_title']
Running Latest TP on SMF2.1 at: www.fjr-club.nl

This website is proudly hosted on Crocweb Cloud Website Hosting.