[SUGGESTION] # button to insert [code=ags]

Started by Crimson Wizard, Fri 06/09/2013 09:10:39

Previous topic - Next topic

Crimson Wizard

Since it seems that people do not always figure out how the "code" tag works, there was an opinion that the '#' button in the post toolbar should insert [ code = ags ][ / code ].
Simply [ code ] does not work on the forums at all.

Gilbert

I didn't follow much on forum updates, but wasn't the [code=ags][/code] button once available alongside with the ordinary [code][/code] one? Was it removed recently? I didn't use it though, as I remembered the tool bar was quite clumsy and it's quite hard to find the right buttons to do stuff (compared to before the upgrade), and the current layout seems to be a lot cleaner now, so this is an improvement. But of course, since [code][/code] doesn't have much practical use here, I think we should remove it and instead keep the [code=ags][/code] one.

AGA

The code tag changed when I upgraded SMF whenever it was.  I can't work out how to make it support just "
Code: ags
" rather than needing the specific ags parameter.  It uses GeSHi, a syntax highlighter that supports dozens of languages, which makes it very complicated.

And yes, there used to be a shortcut button in the post editor. It (and a few other tags) disappeared when I upgraded the plugin that handles the editor a while ago, but I couldn't remember which tags those were to readd them.  I'll hack it back in at some point.

cat

Could then please also add the zoomable image button as well?

Peder 🚀

#4
It's pretty simple to make the code tag button add =AGS as default.
But off course the best option would be to make
Code: ags
use AGS as default since as mentioned in another thread all old threads/posts using
Code: ags
now doesn't work.

AGA:
Spoiler
In Sources/Subs-markItUp.php
Just change openWith:"[ code]" with openWith:"[ code=AGS]"
[close]

AGA

Yeah, it was making the code tag parse the same as code=ags that was the problem.  The markup editor used to add =ags by default.

Crimson Wizard

Sorry, I bump this, because a lot of newcomers (and not only them) unfamiliar with how forum tags work use "[code ]".

AGA

Code: ags
cAGA.Say("Think it works? With and without a definition of the language...");


Code: ags
cAGA.Say("Think it works? With and without a definition of the language...");


(yup.  Also sadly I can't be sure that is actually the correct AGS script anymore.)

cat

Could you also add the image zoom tags, please?

selmiak

and 1 space in front of the smileys when clicked;)

AGA

None of the other tags have a space before them...

selmiak

cool. I don't care about the text in the imgzoom all that much, but this could come in handy:
[imgzoom]http://i.imgur.com/ipR91U6.gif[/imgzoom]

AGA

Yeah, the image is still on the server, I just can't work out why the image isn't showing properly.  SMF is so complicated!

selmiak

probably because there is no

Code: css
.markItUp .imgzoom a {
    background-image: url("images/imgzoompictureURL.png");
}


in the style.css

AGA

The problem was that for some reason the extension was ignoring the CSS in the AGS and AGSCompact theme folders (which I had changed) and falling back to the default one (which I don't usually need to touch).  Odd!

The image icon is actually a little large, so if someone wants to resize it to 16x16px that'd be helpful.  I don't have anything more than Paint on my work PC, and that makes it go all blurry.

AGA


cat


SMF spam blocked by CleanTalk