is there a noparse tag for the forum? Topic is solved

Discuss issues and requests related with the forum software
Lepes
Posts: 141
Joined: 06 May 2021, 07:32
Location: Spain

is there a noparse tag for the forum?

30 Oct 2022, 08:00

I was trying to paste a AHK hotstrings code that include some tags as text like [code] and [/code] , it fails , of course.
If I disable BBCode in the post forum options, it only show plain text, I'm sure someone will recomend to use tag on that thread and... to be honest, it looks horrible.

I did a search on autohotkey site and found nothing, at BBcode site there are "administrator tools" like this: https://forums.phpfreaks.com/topic/284432-stop-other-bbcode-parsing-inside-code-tags/ I'm not sure weather it will work since it is AHK code that should be copied and paste into code Editors.

Here I used kbd tags and it works, If I use regular [code] tags will fail.
::tagcode:: ; tagcode hotstring
Send, {text} [code]
SendInput, ^v
Send, {text}[/code]
return



Is there a walk around?
Thanks in advance.
User avatar
boiler
Posts: 17242
Joined: 21 Dec 2014, 02:44

Re: is there a noparse tag for the forum?  Topic is solved

30 Oct 2022, 19:18

Select "AutoHotkey" from the "Select code" dropdown so you add [Codebox=autohotkey file=Untitled.ahk][/Codebox] tags instead of [code][/code] tags:

Code: Select all

::tagcode:: ; tagcode hotstring
Send, {text} [code]
SendInput, ^v
Send, {text}[/code]
return
Lepes
Posts: 141
Joined: 06 May 2021, 07:32
Location: Spain

Re: is there a noparse tag for the forum?

31 Oct 2022, 06:27

OMG, Thank you very much.

It should be the default option on de code toolbar button.
testing.... and It's perfect now:

Code: Select all

::tagcode::  ; escribo tagcode se anaden las etiquetas del foro y el código que tenga en el portapapeles
  Send, {text} [code] 
  SendInput, ^v
  Send, {text}[/code]
  return

::tagkbd::  ; escribo tagkbd y anade los tag para escribir letras
  Send, [kbd][/kbd]
  Send, {Left 6}
  return


::tagdocs::
  Send, [docs][/docs]
  Send, {Left 7}
  return
User avatar
boiler
Posts: 17242
Joined: 21 Dec 2014, 02:44

Re: is there a noparse tag for the forum?

31 Oct 2022, 06:53

Lepes wrote: It should be the default option on de code toolbar button.
Why? For cases where people want to put code tags in their script? Not only is that such a rare case that it doesn’t necessitate a change, then there would be the same issue if someone were to have codebox tags in their script instead.
Lepes
Posts: 141
Joined: 06 May 2021, 07:32
Location: Spain

Re: is there a noparse tag for the forum?

31 Oct 2022, 07:13

Since we are in an AutoHotkey forum, I think the default option should be "AutoHotkey code". Please don't take me wrong, it is just a noob opinion (mine opinion).

I understand it is a rare study case, and maybe it doesn't need time and effort to fix it. I used other forum and it exists a noparse tag:
[code]
code here parsed
[noparse]
text here will not be parsed.
It will be syntax Hihgtlighted.
[/noparse]
more code here parsed
[/code]



by the way... I used [Codebox] and it seems it doesn't disable parsing the code. I solved using [code] this time.

Code: Select all

::tagcode::  ; escribo tagcode se anaden las etiquetas del foro y el código que tenga en el portapapeles
  Send, {text} [Codebox=autohotkey file=Untitled.ahk] 
  SendInput, ^v
  Send, {text} 
return

::tagkbd:: ; escribo tagkbd y anade los tag para escribir letras
Send,
Send, {Left 6}
return
User avatar
boiler
Posts: 17242
Joined: 21 Dec 2014, 02:44

Re: is there a noparse tag for the forum?

31 Oct 2022, 07:48

Lepes wrote: Since we are in an AutoHotkey forum, I think the default option should be "AutoHotkey code".
What language do you think the default [code][/code] tags are set up for?
Lepes
Posts: 141
Joined: 06 May 2021, 07:32
Location: Spain

Re: is there a noparse tag for the forum?

31 Oct 2022, 10:14

I am not the one to answer that question, I really don't know, I don't even know if that pluging support something as "autodetect language". Anyways I got the point, Thanks.

It seems I am a bit rough, It is not my intention, I can not express on English as best I would like, I'm sorry for that.

The main reason for this thread was to ask spanish community what Autohotkey utilities they used for the forum ( I would like to ask and share) and "this problem raise around", nothing more: viewtopic.php?f=45&t=110002

Once again, Thanks for your help and time you spend on it.
sofista
Posts: 654
Joined: 24 Feb 2020, 13:59
Location: Buenos Aires

Re: is there a noparse tag for the forum?

31 Oct 2022, 10:52

Lepes wrote:
31 Oct 2022, 06:27
OMG, Thank you very much.

It should be the default option on de code toolbar button.
testing.... and It's perfect now:

Code: Select all

::tagcode::  ; escribo tagcode se anaden las etiquetas del foro y el código que tenga en el portapapeles
  Send, {text} [code] 
  SendInput, ^v
  Send, {text}[/code]
  return

::tagkbd::  ; escribo tagkbd y anade los tag para escribir letras
  Send, [kbd][/kbd]
  Send, {Left 6}
  return


::tagdocs::
  Send, [docs][/docs]
  Send, {Left 7}
  return
@Lepes For this kind of tasks I would normally use RegEx Dynamic Hotstrings, which you can download from here
https://github.com/Paris/AutoHotkey-Scripts/blob/master/Hotstrings.ahk

As an example:

Code: Select all

#Include C:\autohotkey\Hotstrings.ahk     ; path to the Lib
hotstrings("/tag(\w+)\s", "ForumTags")
return                                    ; end of AES

ForumTags:
	SendInput, % Format("[{1}][/{1}]", $1)
	SendInput, % "{Left " StrLen($1) + 3 "}"
return
Type /tag, then the name of the tag —docs or any other name— and it will be correctly formatted as soon as you type in a whitespace (space, tab or new line).

Feel free to tailor this hotstrings to better suit your needs.
Lepes
Posts: 141
Joined: 06 May 2021, 07:32
Location: Spain

Re: is there a noparse tag for the forum?

31 Oct 2022, 12:04

Thank you @sofista , I will take a look!

Return to “Forum Issues”

Who is online

Users browsing this forum: No registered users and 7 guests