Forum Tips

If something doesnt fit in any other forum then post it here.
Forum rules
READ NOW: L2j Forums Rules of Conduct

Forum Tips

Postby Zoey76 » Fri Apr 22, 2011 7:08 am

I'll be updating this post with useful forum tips.

For example using changeset and ticket forum tags:

Core:
Changeset 4586
  1. [changeset]4586[/changeset]


Ticket #5237


Datapack:
DP Changeset 7929
  1. [dpchangeset]7929[/dpchangeset]


DP Ticket #4154
  1. [dpticket]4154[/dpticket]
Last edited by Zoey76 on Fri Apr 22, 2011 1:09 pm, edited 1 time in total.
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
 
Posts: 3897
Joined: Tue Aug 11, 2009 4:36 am

Code Tags

Postby Zoey76 » Fri Apr 22, 2011 12:39 pm

Code Tags:

XML:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <note>
  3.     <to>Tove</to>
  4.     <from>Jani</from>
  5.     <heading>Reminder</heading>
  6.     <body>Don't forget me this weekend!</body>
  7. </note>


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


Java:
  1. class HelloWorldApp {
  2.     public static void main(String[] args) {
  3.         System.out.println("Hello World!"); // Display the string.
  4.     }
  5. }


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


PHP:
  1. <?php
  2.     //Hello world in PHP
  3.     print("Hello World");
  4. ?>


  1. [code=php]<?php
  2.     //Hello world in PHP
  3.     print("Hello World");
  4. ?>[/code]


Python:
  1. def hello():
  2.     print "Hello World!"


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


Diff/Patch:
  1. ### Eclipse Workspace Patch 1.0
  2. #P L2_GameServer
  3. Index: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java
  4. ===================================================================
  5. --- java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (revision 4422)
  6. +++ java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (working copy)
  7. @@ -390,6 +391,9 @@
  8.         SevenSigns.getInstance().sendCurrentPeriodMsg(activeChar);
  9.         Announcements.getInstance().showAnnouncements(activeChar);
  10.  
  11. +       if (activeChar.getLevel() == 85)
  12. +           activeChar.sendMessage("Hello mate!");
  13. +      
  14.         if (showClanNotice)
  15.         {
  16.             NpcHtmlMessage notice = new NpcHtmlMessage(1);


  1. [code=diff]### Eclipse Workspace Patch 1.0
  2. #P L2_GameServer
  3. Index: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java
  4. ===================================================================
  5. --- java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (revision 4422)
  6. +++ java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (working copy)
  7. @@ -390,6 +391,9 @@
  8.         SevenSigns.getInstance().sendCurrentPeriodMsg(activeChar);
  9.         Announcements.getInstance().showAnnouncements(activeChar);
  10.  
  11. +       if (activeChar.getLevel() == 85)
  12. +           activeChar.sendMessage("Hello mate!");
  13. +      
  14.         if (showClanNotice)
  15.         {
  16.             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.
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
 
Posts: 3897
Joined: Tue Aug 11, 2009 4:36 am

Using Spoilers (New)

Postby Zoey76 » Sun Apr 24, 2011 2:25 am

Spoilers:
Spoiler: show
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/>.



  1. [spoiler]This program is free software: you can redistribute it and/or modify it under
  2. the terms of the GNU General Public License as published by the Free Software
  3. Foundation, either version 3 of the License, or (at your option) any later
  4. version.
  5.  
  6. This program is distributed in the hope that it will be useful, but WITHOUT
  7. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  8. FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  9. details.
  10.  
  11. You should have received a copy of the GNU General Public License along with
  12. this program. If not, see <http://www.gnu.org/licenses/>.[/spoiler]
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
 
Posts: 3897
Joined: Tue Aug 11, 2009 4:36 am


Return to Off-Topic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests