[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  Forum
. -> [Folder]  Test
. . -> [Subject]  Testing templates
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Testing templates

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Pages: 1  2  3  4 5  

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #45 on Fri 21 Aug 2009 05:07 AM (UTC)
Message
Ah yeah, good point. You're a better designer than I ;)

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #46 on Fri 21 Aug 2009 05:14 AM (UTC)
Message
I've just been working with stylesheets lately from trying to convert the help over to chm format... I'm not good, just newly experienced. ;)
[Go to top] top

Posted by Nick Gammon   Australia  (21,647 posts)  [Biography] bio   Forum Administrator
Date Reply #47 on Fri 21 Aug 2009 05:41 AM (UTC)
Message
Twisol said:

Scripting? I was thinking more like just a button that would open the same reply entry box, but with the selected post quoted already inside.


Hmmm - yes you are right that is possible. Handling the forum codes is a bit fiddly. You have the problem of nested forum tags if you aren't careful.

Anyway, I am experimenting a bit to see if a workable version can be done.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (21,647 posts)  [Biography] bio   Forum Administrator
Date Reply #48 on Fri 21 Aug 2009 06:48 AM (UTC)
Message
Twisol said:

Adding a 'Quote' button on each post would also be nice; I frequently find myself wanting to quote someone, but having to go back and copy it manually.


OK - I think I got the quote button working. It was quite fiddly, I didn't want to keep all the forum tags in the quoted message, for one thing that looked messy, and for another you had the problem with nested tags.

So, a quoted message basically has the forum tags stripped from it - it may not work perfectly, if you find something obviously wrong I'll try to correct it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (21,647 posts)  [Biography] bio   Forum Administrator
Date Reply #49 on Fri 21 Aug 2009 06:59 AM (UTC)
Message
Testing:

bold

italic

underline


  1. ordered list item 1
  2. ordered list item 2



  • unordered list item 1
  • unordered list item 2


Quote:

a quoted item



some code



monospaced stuff


horizontal rule:



escaped brackets: [ ] \

Template:bug Please help us by advising:
  • The version of MUSHclient you are using. Use the Help menu -> About MUSHclient.
  • A copy of the trigger, alias or timer you were using (see Copying XML)
  • The output from the MUD that caused the problem
  • The error message, if any, that you got (or other relevant output)

Template:codetag To make your code more readable please use [code] tags as described here.

Template:copying For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.

Template:faq Please read the MUSHclient FAQ.

Template:faq=11 Please read the MUSHclient FAQ - point 11.

Template:function=AddTrigger AddTrigger

The documentation for the AddTrigger script function is available online. It is also in the MUSHclient help file.


Template:pasting For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.

Template:post=9687 Please see the forum thread: http://gammon.com.au/forum/?id=9687.

Nick Gammon said:

Template:regexp Regular expressions
  • Regular expressions (as used in triggers and aliases) are documented on the Regular expression tips forum page.
  • Also see how Lua string matching patterns work, as documented on the Lua string.find page.

Template:saveplugin=ConsiderMobs To save and install the ConsiderMobs plugin do this:
  1. Copy between the lines below (to the Clipboard)
  2. Open a text editor (such as Notepad) and paste the plugin into it
  3. Save to disk on your PC, preferably in your plugins directory, as ConsiderMobs.xml
  4. Go to the MUSHclient File menu -> Plugins
  5. Click "Add"
  6. Choose the file ConsiderMobs.xml (which you just saved in step 3) as a plugin
  7. Click "Close"

Template:scripting Scripting tutorial

There is extensive information about scripting in MUSHclient at http://mushclient.com/scripting. This includes screen shots and examples.


Please try searching this forum.

Please try searching this forum for the phrase "stat roller".

SmaugFUSS (Fixed Up Smaug Source)

The SmaugFUSS reference site is http://www.smaugmuds.org/.


Template:starting Tips on getting started with MUSHclient are in the Getting Started part of the Forum. Most have screen shots to show in detail how to do things.

There are also some some YouTube videos demonstrating various aspects of MUSHclient in operation.


Template:version Please help us by advising the version of MUSHclient you are using. Use the Help menu -> About MUSHclient.

Template:what Please help us by showing:
  • A copy of the trigger, alias or timer you were using (see Copying XML)
  • The error message, if any, that you got


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (21,647 posts)  [Biography] bio   Forum Administrator
Date Reply #50 on Fri 21 Aug 2009 07:00 AM (UTC)
Message
Quoting the above message:

Nick Gammon said:

Testing:

bold

italic

underline


*ordered list item 1
*ordered list item 2



*unordered list item 1
*unordered list item 2


(quote)
a quoted item


------
some code
------


monospaced stuff


horizontal rule:
-----

escaped brackets: [ ] \

(bug)
(codetag)
(copying)
(faq)
(faq=11)
(function=AddTrigger)
(pasting)
(post=9687)
(quote=Nick Gammon)
(regexp)
(saveplugin=ConsiderMobs)
(scripting)
(search)
(search=stat roller)
(smaugfuss)
(starting)
(version)
(what)


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #51 on Fri 21 Aug 2009 07:00 AM (UTC)

Amended on Fri 21 Aug 2009 07:01 AM (UTC) by WillFa

Message
Nick Gammon said:

(quote=Twisol)
Adding a 'Quote' button on each post would also be nice; I frequently find myself wanting to quote someone, but having to go back and copy it manually.


OK - I think I got the quote button working. It was quite fiddly, I didn't want to keep all the forum tags in the quoted message, for one thing that looked messy, and for another you had the problem with nested tags.

So, a quoted message basically has the forum tags stripped from it - it may not work perfectly, if you find something obviously wrong I'll try to correct it.
[quote=E.A.Poe]
(quote=TheRaven)
Nevermore.


But how will we quote code? :)



I broke it! :)
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #52 on Fri 21 Aug 2009 07:11 AM (UTC)

Amended on Fri 21 Aug 2009 07:13 AM (UTC) by Twisol

Message
Maybe the forum software can process [code] and [quote] expansions before it converts to (plain tags)?

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Nick Gammon   Australia  (21,647 posts)  [Biography] bio   Forum Administrator
Date Reply #53 on Fri 21 Aug 2009 07:14 AM (UTC)
Message
I remember now why it is hard to get quotes (or anything) going as a nested thing, using regular expressions. Basically regexp matches can be greedy or non-greedy, but neither one matches correctly on a message with both nested and non-nested quotes in it.


           [quote=Nick] aaa [quote=Willfa] bbb [/quote] [/quote]  [quote=Twisol] ccc [/quote]
greedy:    ^-------------------------------------------------------------------------^
nongreedy: ^-----------------------------------^
correct:   ^--------------------------------------------^


The greedy one goes too far, and the non-greedy one doesn't handle the nesting.

Now you could recursively descend into it (and then you have the problems of handling badly-formed messages) but this is something that has to happen on every post, on every page. (There are up to 15 posts a page).

I was worried about the overhead of doing that all the time.

The current system just blindly replaces form codes with html, eg. [b] becomes <b>.

Twisol said:

One of many solutions I can think of is counting the number of start tags versus end tags


Counting won't detect this:


[/quote] ..... [quote]


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (21,647 posts)  [Biography] bio   Forum Administrator
Date Reply #54 on Fri 21 Aug 2009 07:16 AM (UTC)
Message
WillFa said:


But how will we quote code? :)





..... must ..... not ..... quote ..... code ......

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #55 on Fri 21 Aug 2009 07:18 AM (UTC)

Amended on Fri 21 Aug 2009 07:19 AM (UTC) by WillFa

Message
WillFa said:

Balanced tags are easy in LPEG! Quick, Nick, rewrite the forum software in Lua!


;)



;)

What a can of worms we've opened...
[Go to top] top

Posted by Nick Gammon   Australia  (21,647 posts)  [Biography] bio   Forum Administrator
Date Reply #56 on Fri 21 Aug 2009 07:19 AM (UTC)
Message
Nick said:



<aliases>
  <alias
   match="target *"
   enabled="y"
   variable="target"
   send_to="9"
   sequence="100"
  >
  <send>%1</send>
  </alias>
</aliases>



There! I quoted code.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (21,647 posts)  [Biography] bio   Forum Administrator
Date Reply #57 on Fri 21 Aug 2009 07:20 AM (UTC)
Message
Er, maybe not.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (21,647 posts)  [Biography] bio   Forum Administrator
Date Reply #58 on Fri 21 Aug 2009 07:24 AM (UTC)
Message
Ah, why did it do that? I didn't give it permission to render the page that way.

A <code> tag must have an implied end of paragraph.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #59 on Fri 21 Aug 2009 07:37 AM (UTC)
Message
Yup, a code tag is a new block element.

You could make .code a css class that has white-space: pre; and font-family: monospace; then change the php so it doesn't write <pre><code> tags, but a <div class="code"> tag...

A div will not nest inside of a <P> tag, so it will behave like the rest of the forum even when not nested.


[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


57,178 views.

This is page 4, subject is 5 pages long:  [Previous page]  1  2  3  4 5  [Next page]

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]