Custom Theme Settings.template.php Input Type

Started by Burke ♞ Knight, May 28, 2015, 06:07:28 PM

Previous topic - Next topic

Burke ♞ Knight

Okay, I'm working on something for a theme.
In Settings.template.php I need a text box input area, for a large chunk of code to be pasted.
However, I can only get text type to work, as large_text like use in modifications section does not appear to change the box from the usual one line text field.

Antechinus

You need to add code for the textarea in the admin template (I think it's ManageSettings.template.php, but am not certain offhand). It's not in SMF by default. If you look at where the various types of input are listed in the default admin template, and compare that with a custom theme that has textareas added, you should be able to figure it out. The basic procedure is quite simple once you have an example to work from.

It's been a while since I looked at this stuff, but my Apocalypse theme has a lot of custom settings of this type added, and the examples I used for my code came from some of Bloc's older themes (I have an idea I may have used examples from Helios originally).

Burke ♞ Knight

Yes, but I was trying to find a way to add to the theme settings tab, and since that was not working out, I managed to just add to mod settings. Even if only one theme uses it... LOL

Now, I need to know, is there a way, to get the complete info center onto ALL pages?

I'd like to throw it into a portal block.

Antechinus

You should be able to add it to theme settings. There's no reason why you couldn't, AFAICT. Unless by "theme settings" you mean something completely different to what most people call "theme settings".

The info center is just stuff that is usually available in portal blocks anyway. What's the problem? Do you want it all in one block, with exactly the same presentation as the default info centre? In that case you'd just have to write your own block code with the required markup, and use the variables and logic pulled from the portal's calendar, online, recent, etc blocks. A bit of work in it, but shouldn't be too bad.

Advertisement: