Jump to content

Recommended Posts

Posted

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

Posted
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.