IamSH
1
@A
mad writer and I discussed about CodeBox template
in the other thread
to change its background color to # F3ECDF color, which is our wikiHow sidebar’s color. It’ll look like this
. So need some suggestions and comments as it’s a global template.
Writelf
2
Well, I don’t see a problem with changing it. If others don’t think that this will mess up visuals and suchlike, it has my support.
Lojjik
4
I’d prefer the dashed border stay, makes the code stand out a bit more. i think #F9F7F1
would be a better hex code – matches the background, rather than just the sidebar
@Krystle
, I don’t care what you people do with the CodeBox template, as long as the new template fixed the problem with the steps being renumbered after the CodeBox has been inserted. Look at the current versions now on articles using the CodeBox item. It’s got a problem, I’ll tell you that one. I don’t care if the border is dashed, crooked, or literrally totally screwed up, if we fixed this issue, it would make the quality seem better to the reader. Especially for items that have lots of CodeBox es, with it keeping renumbering after every single one, it’s almost impossible to try and understand the steps with step-numberings. Fix that problem first, before fixing the styling of the CodeBox
Writelf
6
It’s the wiki-software that causes that problem, as far as I know, not the code box template itself.
IamSH
7
@Byankno1
, @Writelf
, @Krystle
, I just fixed that numbering issue in CodeBox template. @SudoKing
, I also changed that background color and border as you said. Now take a look at this template and its usage
and one example
.
Lojjik
9
This is a change that DEFINITELY needs to be made to the Codebox: Currently, you have to put in <source lang=“xxx”> in the template, as follows:
{{codebox|<source lang=“php”><!–?php echo “Hello world”; ?–></source>}}
This is ugly, it should be:
{{codebox|php|<!–?php echo “Hello world”;?–>}} fortunately, this is easy enough to fix, but some documentation will need changed.</source>
Ok. I saw the example. As long as the old formatting can easily be flipped over to the new format, I’m all for it!
IamSH
11
@SudoKing
what you are saying to change like “{{codebox|php|<!–?php echo “Hello world”;?–>}}” is already there named SourceCode
template by @Shaiaqua
, but unfortunately it’s not working. If Shaiaqua see this, then he may help us. The problem in SourceCode
template is that when you put {{#tag:source|{{{2}}}|lang={{{1|html4strict}}}}} code, it just takes the lang part, but the 2nd parameter is not taken. Because when we are using <source lang=“php”>Code is going here, which is 2nd parameter, so the 2nd parameter is just taken as other codes(php here). If we are using nowiki tag as suggested in that template page, then it displays an error. See this <a href=“ http://www.wikihow.com/User:IamSH/Codeground2
”>here</a>.
If anyone have knowledge on template coding, then I want your help to solve the above issue in SourceCode template, by which we’ll get a new CodeBox template with no numbering issue and easier implementation on article by editors. Our aim: To make it like {{SourceCode|php|<!–?php echo “Hello world”;?–>}} . </source>
Lojjik
13
I suggest deleting the SourceCode template and modifying the CodeBox template.