• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 how to create option for selection style for my addon?

#1
Hello,

I created an addon, it works, but it n'à no option in the admincp, I wish there was an option for it to work on some of my styles, would you ideas, or a tutorial? Thank you.
 
#3
Here, I made a template change, with the creation of a template for the CSS, and I want that does not apply to all styles, because I'm going to share this with the community XenForo addon, but I do not know how to have the options XenForo an option for this addon to act on the desired styles. Do you have an idea, or a track that I could look me? Thank you in advance.
 

Jake Bunce

XenForo moderator
Staff member
#4
Here, I made a template change, with the creation of a template for the CSS, and I want that does not apply to all styles, because I'm going to share this with the community XenForo addon, but I do not know how to have the options XenForo an option for this addon to act on the desired styles. Do you have an idea, or a track that I could look me? Thank you in advance.
Example:

Code:
$visitor = XenForo_Visitor::getInstance();

if ($visitor['style_id'] == 4)
{
	// THEN YOUR CSS
}
The visitor object contains all information for the current logged in user, including the style they are using.
 
#5
Hello,

Sorry for my late reply, I was away, In your example, I see that vou sutilisais a condition, I want the administrators this addon can choose the style or if it will work this addon have plsueiurs, they will not necessarily use it for all, what is the solution please?

I give you an example picture.

http://prntscr.com/2sn7q6

Thank you to you.