Page 1 of 1

Forum Tips

Posted: Fri Apr 22, 2011 6:08 am
by Zoey76
I'll be updating this post with useful forum tips.

New forum bbcode for GitHub:

[commit]2d6af28bc61162a76d37f74e529e922c9c76f446[/commit]

Code: Select all

[commit]2d6af28bc61162a76d37f74e529e922c9c76f446[/commit]
Datapack: Download

Code: Select all

[commitdp]b2f62330ea3834687fa98900af2372aa0b2d284e[/commitdp]
SPOILER:
For example using changeset and ticket forum tags:
Core:
Changeset 4586

Code: Select all

[changeset]4586[/changeset]
Ticket #5237

Code: Select all

[ticket]5237[/ticket]
Datapack:
DP Changeset 7929

Code: Select all

[dpchangeset]7929[/dpchangeset]
DP Ticket #4154

Code: Select all

[dpticket]4154[/dpticket]

Code Tags

Posted: Fri Apr 22, 2011 11:39 am
by Zoey76
Code Tags:

XML:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?><note>    <to>Tove</to>    <from>Jani</from>    <heading>Reminder</heading>    <body>Don't forget me this weekend!</body></note>

Code: Select all

[code=xml]<?xml version="1.0" encoding="UTF-8"?><note>    <to>Tove</to>    <from>Jani</from>    <heading>Reminder</heading>    <body>Don't forget me this weekend!</body></note>
[/code]

Java:

Code: Select all

class HelloWorldApp {    public static void main(String[] args) {        System.out.println("Hello World!"); // Display the string.    }}

Code: Select all

[code=java]class HelloWorldApp {    public static void main(String[] args) {        System.out.println("Hello World!"); // Display the string.    }}
[/code]

PHP:

Code: Select all

<?php    //Hello world in PHP    print("Hello World");?>

Code: Select all

[code=php]<?php    //Hello world in PHP    print("Hello World");?>
[/code]

Python:

Code: Select all

def hello():    print "Hello World!"

Code: Select all

[code=python]def hello():    print "Hello World!"
[/code]

Diff/Patch:

Code: Select all

### Eclipse Workspace Patch 1.0#P L2_GameServerIndex: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java===================================================================--- java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (revision 4422)+++ java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (working copy)@@ -390,6 +391,9 @@        SevenSigns.getInstance().sendCurrentPeriodMsg(activeChar);        Announcements.getInstance().showAnnouncements(activeChar); +       if (activeChar.getLevel() == 85)+           activeChar.sendMessage("Hello mate!");+               if (showClanNotice)        {            NpcHtmlMessage notice = new NpcHtmlMessage(1);

Code: Select all

[code=diff]### Eclipse Workspace Patch 1.0#P L2_GameServerIndex: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java===================================================================--- java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (revision 4422)+++ java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (working copy)@@ -390,6 +391,9 @@        SevenSigns.getInstance().sendCurrentPeriodMsg(activeChar);        Announcements.getInstance().showAnnouncements(activeChar); +       if (activeChar.getLevel() == 85)+           activeChar.sendMessage("Hello mate!");+               if (showClanNotice)        {            NpcHtmlMessage notice = new NpcHtmlMessage(1);
[/code]

Note about diff/patch:
Is not recomended to share diff/patchs using the forum since it changes tabs for spaces, which breaks this diffs.
The best way is to attach a zipped file.

As alternative to attachments you can use pastebin.com or other site with such function.

Using Spoilers (New)

Posted: Sun Apr 24, 2011 1:25 am
by Zoey76
Spoilers:
SPOILER:
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.

You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>.

Code: Select all

[spoiler]This program is free software: you can redistribute it and/or modify it underthe terms of the GNU General Public License as published by the Free SoftwareFoundation, either version 3 of the License, or (at your option) any laterversion. This program is distributed in the hope that it will be useful, but WITHOUTANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESSFOR A PARTICULAR PURPOSE. See the GNU General Public License for moredetails. You should have received a copy of the GNU General Public License along withthis program. If not, see <http://www.gnu.org/licenses/>.[/spoiler]

Re: Forum Tips

Posted: Fri Feb 21, 2014 2:27 pm
by Zoey76
Display code!

Display Gists with:

Code: Select all

[gist=Zoey76]8391277[/gist]
Gist by: Zoey76
Display Pastebins with:

Code: Select all

[pastebin]vfZtYWhT[/pastebin]
[pastebin]vfZtYWhT[/pastebin]

Re: Forum Tips

Posted: Thu Nov 13, 2014 12:47 am
by Zoey76
Added GitHub BBCode for commits, includes colours and diff-download button!