1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Other (Reguest) BB code Pastebin/gist Post real code in forum.

Discussion in 'Resource and Add-on Requests' started by zadow, Feb 13, 2013.

  1. zadow

    zadow Member

    One thing i really would like implimented, into the toolbar, is code bar​
    with numbers in the left, just like code editors.​
    So when in my forum , that have coding learning section, one could say​
    in line ( exampel ) 20 the code is bad.​
    Further i found two phpbb BBcode that does just that , and i would love​
    to have in my forum.​

    First is Pastebin.


    Again this is PHPBB BBCODE so not sure it will help.
    But you get the idea.

    <script src="http://pastebin.com/embed_js.php?i={IDENTIFIER}"></script>
    [pastebin]ID from your code[/pastebin]

    The thing is that Paste bin, highlight different kind of code.
    User would know, what value it the code mean.

    Example in this forum.

    #include <iostream>
    int main()
    using namespace std;
    int carrots; // declare an integer variable
    carrots = 25; // assign a value to the variable
    cout << "I have ";
    cout << carrots; // display the value of the variable
    cout << " carrots.";
    cout << endl;
    carrots = carrots - 1; // modify the variable
    cout << "Crunch, crunch. Now I have " << carrots << " carrots." << endl;
    No code is highlighted.
    But this is standard in all forums, so no suprice.

    Other option is more advance, but have the plus, that the gist pasties, can be used strait
    in Github
    Well more advance maybe, just that you have to register to Paste.


    This is PHPBB BBCODE so not sure it will help.
    <script src="{URL}.js"> </script>
    [gist]URL to GIST page[/gist] Example: https://gist.github.com/1343518[/CODE

    Would also be usefull, with all the code this forum have.

    What do you guys/ladys think :)

    Attached Files:

  2. Chris D

    Chris D XenForo Developer Staff Member

  3. zadow

    zadow Member

    Yes ive seen that, its very nice.

    but uses forum code standard box

    Most code is c/c++.

    So if we could add,that i def have that on my forum.

    Still it would be nice, with the two i mentioned, since they have all langueges.
  4. zadow

    zadow Member

    Now i noticed that it support , 201 langueges :giggle:.

    Still it would be nice, with the Pastebin one.
    Chris D likes this.
  5. cclaerhout

    cclaerhout Well-Known Member

    What you can try: create a bbcode with a textarea with the parameter "readonly". You can try to use this framework if you want. I've never tried to customize a readonly textarea so if I have time, I will try to play with Geshi which I'm using with some personnel converters. But try to do it yourself, you can share this addon here.
  6. zadow

    zadow Member

    the http://xenforo.com/community/resources/geshi-syntax-highlighter.89/
    Works like an charm.
    All the 201 languages works.
    I just had to figure out first, that you had to type like this.
    ["code=languages"] code her ["/CODE"]
    difference between small letter and big letter,and stop with out languages select .

    I have to read up, on the BB FrameWork ,and BBcode stuff, alot to learn.
    See if i have the time.
    The textarea readonly should work, on an buch off stuff, if it works.
  7. cclaerhout

    cclaerhout Well-Known Member

    My bad I've always thought this addon was about adding geshi to xenforo template textarea may be i am mistaken with another.
  8. zadow

    zadow Member

    Chris Deeming highlighte,r uses the Geshistructure.
    i just thought it only used 3 html,php,java but you can use all.

    So thats all sorted.
    Still i would love an BBCode that would paste pasties, strait into an post.
  9. EQnoble

    EQnoble Well-Known Member

    are you literally asking for a bbcode for pastebin?
  10. EQnoble

    EQnoble Well-Known Member

  11. zadow

    zadow Member

    damn i like you so much EQnoble now. :D
    ill test it ,as soon i get home.
    to previous qestion.
    seeking bbcode that can read the text , off an pastie , and then post it on your side in an bbcode box.
    then we can save lot of,space since,the text s on the pastie server.

    im on my phone but if you seek.
    phbb advance bbcode 3 mod.
  12. EQnoble

    EQnoble Well-Known Member

    all someone has to do is paste the link...like http://pastebin.com/tBZfVV1H

    the resource at the link I posted will turn a link in into an embed when posted
    zadow likes this.
  13. zadow

    zadow Member

    works like an charm exactly what i needed.

    got all raw download and all (y)
    thx for making it.

Share This Page