Skocz do zawartości
Hosting webh.pl - 20%

custom messgae on theme setting

Rekomendowane odpowiedzi

Opublikowano

hi

I want the users see custom message when they go to a specific tab of the theme settings.

I used the code below, but this message is displayed universally for all tabs, while I want it to be displayed for only one tab.

<?php

\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global', 'core', 'global' )->message( \IPS\Member::loggedIn()->language()->addToStack('custom_information'), 'warning', NULL, NULL, NULL, FALSE );
return new \IPS\Helpers\Form\YesNo( "core_theme_setting_title_{$row['sc_id']}", $value, FALSE, 
		array( 'togglesOn' => array(
		'theme_setting_forums_enbl',
		'theme_setting_posts_enbl',
		'theme_setting_topics_enbl',
	)), NULL, NULL, NULL, 'theme_setting_'.$row['sc_key'] );

 

I hope somebody can help me!

 

thanks

ArashDev.net

Opublikowano
  • Autor
9 hours ago, DawPi said:

This is whole code? Doubt that. Show me part with the tabs.

What do you mean by "whole codes"?

 

I'm going to add a settings tab in my theme, and I'm getting the output using the codes I previously sent you, like the image below. However, I want the message above the tabs to be displayed only when I navigate to that specific tab. but, the code I'm using displays the message in all tabs.

 

Spoiler

Firefox_Screenshot_2023-06-21T06-42-49_265Z.thumb.png.5dc9ed5844916c6765fcfb622e1b9210.png

 

I hope I was able to convey my meaning.

ArashDev.net

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Ostatnio przeglądający 0

  • Brak zarejestrowanych użytkowników przeglądających tę stronę.

Konto

Nawigacja

Szukaj

Szukaj

Skonfiguruj powiadomienia push w przeglądarce

Chrome (Android)
  1. Stuknij ikonę kłódki obok paska adresu.
  2. Stuknij Uprawnienia → Powiadomienia.
  3. Dostosuj swoje ustawienie.
Chrome (Komputer)
  1. Kliknij ikonę kłódki na pasku adresu.
  2. Wybierz Ustawienia witryny.
  3. Znajdź Powiadomienia i dostosuj swoje ustawienie.