1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

If I want use [Jass] and [Trigger] on my Blog?

Discussion in 'Site Discussion' started by ALTELMA, May 9, 2012.

  1. ALTELMA

    ALTELMA

    Joined:
    Jan 4, 2009
    Messages:
    113
    Resources:
    0
    Resources:
    0
    If I want use
    Code (vJASS):
     and [Trigger] on my Blog? Who have that code for me. Plz.
     
  2. Vladadamm

    Vladadamm

    Joined:
    Apr 19, 2011
    Messages:
    1,255
    Resources:
    9
    Maps:
    5
    Spells:
    3
    Tutorials:
    1
    Resources:
    9
    It won't work in all cases.

    The balises wouldn't be adapted to work on your blog i think.
     
  3. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,840
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    Making a syntax highlighter (also the more sophisticated GUI one) isn't very hard, but it really depends on what your blog supports, assuming it isn't your own server.
     
  4. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    You could ask Ralle on how they added it to The Hive...
     
  5. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    It's just a page or two of PHP code, and I don't believe he wants it shared.
     
  6. Magtheridon96

    Magtheridon96

    Joined:
    Dec 12, 2008
    Messages:
    6,006
    Resources:
    26
    Maps:
    1
    Spells:
    8
    Tutorials:
    7
    JASS:
    10
    Resources:
    26
    The algorithm for GUI is to get the lowest non-zero number of spaces in the beginning of the lines and considering that to be one tab. On each line, you would loop through all the tabs and if the current tab happens to be the last one before the actual text, you would create a [​IMG]

    Sometimes, you have to use a [​IMG] if the line has the keywords Events, If, Then, etc...
    And you'd have to register a click event. When it's clicked, you would change it to [​IMG]

    Note: If there's nothing within that block, you would just use a [​IMG]

    Whenever you encounter a keyword in the beginning of the line, you would place an image corresponding to that key.

    Set corresponds to [​IMG], Unit corresponds to [​IMG], etc...

    Eventually, you'd have to loop vertically to see if any [​IMG] need to be placed. If you ever have a [​IMG] or a [​IMG], you would have to place one [​IMG] while making sure that the tab index for each of the images is the same. (But since you're iterating vertically, you wouldn't have to do that.)

    There are other things of course, but I'm not giving you a full algorithm because that would be taking the fun out of it :p

    As for Jass, you would just need to search for keywords and color or bold-face them after creating a white background. :D

    I came up with the GUI algorithm myself ^^
     
  7. ALTELMA

    ALTELMA

    Joined:
    Jan 4, 2009
    Messages:
    113
    Resources:
    0
    Resources:
    0
    OK, Thank for help me.
     
  8. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,059
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Otherwise, I recommend making it in plain-text, doing screenshots, or simply managing/linking your blog on the hive itself as part of a user group, for example.