Welcome to the New Forum Interface!

Started by stephaneb 3 years ago15 replieslatest reply 2 years ago512 views

After months of hard word, I am very excited to introduce to you the new forum interface.  It will be the foundation of the related sites for the next several years.

Here are the key features:

Easily add images to a post by drag & dropping the images in the editor

Let me try it with a family photo:

dsc_0485_small_3625.jpg

Too easy!


Easily attach files to a post by drag & dropping the files in the editor

The following file has been dragged and dropped in the editor:

This is a pdf file.pdf

This caused the file to be uploaded on our servers and a link was automatically created.  Best way to understand how easy this is, it to try it by replying to this post and drag and dropping a file in the editor.

Add latex equations to a post and they will be rendered with Mathjax (tutorial)

This LaTex code: 

$$ \sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6} $$

is being processed by Mathjax and produces:

$$ \sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6} $$

By surrounding a code snippet with the "pre" tags, the code will be automatically highlighted with the help of highlights.js

function [ Y ] = downsample2d(M)
x = 2;
y = 2;
N = downsample(M,x);
N = N';
P = downsample(N,y);
P = P' 
end


The 'Have a Beer' reward program 

Probably the most exciting feature - read about it in my blog.


Organisation of the archives with hashtags

When posting a new thread, you can classify it by adding one, two or three hashtags to your post.  For instance, let me use #sticky and #RelatedSites for this thread.  When I will submit my post, the system will detect these two hashtags and categorize the thread automatically based on them.

Try it!

Feel free to test the new interface by replying to this post.  Try to add photos if you want, attach a file, write a Latex equation...  But before you can do so, you may be asked by the system to complete your profile.  The reason for this is to make sure you are a legitimate person and prevent trolls, robots and spammers to pollute the forums.  

Please consider the forum in 'beta' and report any bug or problem you encounter.

Thank you!


[ - ]
Reply by s-lightFebruary 20, 2016

thanks for the work :-)

one thing i accounted on clicking on the pdf file - it just downloads that file - 

but for me using Firefox it would be cooler if the returned download link is just tagged with the right header information so Firefox can display the pdf and i don't have to download/store it somewhere...

this should be mainly a server configuration thing...

some test code :-)

def low(value):
    """return low part of 16bit value."""
    return value % 256


def high(value):
    """return high part of 16bit value."""
    return value // 256

################################################################
if __name__ == '__main__':

    spi = None

    # create spi object
    if spidev_available:
        print("create spi devices.")
        spi = spidev.SpiDev()

    # open spi port 0, device (CS) 0
    #
    print("open spi port.")
    # /dev/spidev32766.0
    # Connects to the specified SPI device, opening /dev/spidev-bus.device
    if spidev_available:
        spi.open(32766, 0)

    print("set speed to 600kHz (min speed)")
    if spidev_available:
        spi.max_speed_hz = 600000
        spi.bits_per_word = 8
# ------------------------------------------
    print("create data")
    # my_data = [0x01, 0x02, 0x03, 0x04]

    # my_data = TLC5971_DATA()
    # print("my_data: ", my_data)

    # print("data_header", data_header)

    # data_GS = [
    #     10010,
    #     10020,
    #     10030,
    #     30010,
    #     10020,
    #     10030,
    #     10010,
    #     30020,
    #     10030,
    #     10010,
    #     10020,
    #     30030,
    # ]
    data_GS = [
        # 0
        3000,
        0,
        0,
        # 1
        0,
        5000,
        0,
        # 2
        0,
        0,
        9000,
        # 3
        3000,
        6000,
        0,
    ]

    # data_to_send = [my_data]
    data_to_send = []
    # data_to_send = data_header

    # add header data:
    for value in data_header:
        data_to_send.append(
            value
        )

    # add GS data:
    for value in data_GS:
        data_to_send.append(high(value))
        data_to_send.append(low(value))
        # data_to_send.append(
        #     ctypes.c_uint16(value)
        # )

    # add 1 byte for additional 8 clock cycles
    # data_to_send.append(0)

    # data_to_send = [0, 255, 0, 65535]

    # print("data_to_send:", data_to_send)
    # print("data_to_send:")
    # for element in data_to_send:
    #     print(element)
    # print("------------")

    # ------------------------------------------

    print("transfer one frame")
    # spi.xfer2([0xAA])
    if spidev_available:
        print("send...")
        # spi.xfer2(
        #     data_to_send,
        #     0,  # delay_usec
        #     # speed_hz
        #     # bits_per_word
        # )
        # spi.xfer2(data_header)
        spi.xfer2(data_to_send)

    print("finished.")

[edit] hm for me the code does not show up in a code block... ??

now it shows nicely.

one additional idea: if the code is longer than 50% of the browser-window-height make the code-box scroll inside - so that the view is more compact

i used the format-code option.


and added a screenshot of this button..

 [/edit]

[edit2]

hm pasting the picture worked in the editor - i saw it - 

but it did not make it to the server...welcome_to_the_new_forum_interface_-_201

drag&drop of a saved picture worked..

[/edit2]

[ - ]
Reply by stephanebFebruary 20, 2016

Thanks a lot for taking the time to do some testing and for your inputs.

one additional idea: if the code is longer than 50% of the browser-window-height make the code-box scroll inside - so that the view is more compact

I love this idea and will implement it next week.

hm pasting the picture worked in the editor - i saw it - but it did not make it to the server...

I am surprised that you were able to paste a picture in the editor, but I am not surprised that it didn't upload to the server.  The way to go is either to drag & drop like you did or use the "insert image" button: 

insertimage_41862.jpg

If you enter a paypal address in your account, it will allow others to offer you a beer - I would love to offer you one.

Thanks again.


[ - ]
Reply by stephanebFebruary 20, 2016
I was able to implement to scrollable code snippet idea much faster than I thought!  Just a few css rules..  Thanks again for the suggestion.
[ - ]
Reply by s-lightFebruary 21, 2016

that was fast :-)

it shows nicely for me.

for the picture past thing:

i think the editor you are using (redactor' i think ;-) ) seams to support pasting images with Ctrl+V. on there demo website it seems the editor  tries to upload a pasted image directly - (ok without success because of the demo) - but the upload progress bar is visible shortly..

so eventually that is just a configuration thing?!

[ - ]
Reply by stephanebFebruary 22, 2016

Yes, Redactor is the editor I chose.  I will investigate and try to make the copy+paste working for images.  Thanks again for your inputs!

[ - ]
Reply by stephanebFebruary 22, 2016

I think I have fixed the header issue for uploaded files (pdf file not being opened in browser).

[ - ]
Reply by Tim WescottMarch 22, 2016

Trying out MathJax:

$ F \right( x \left) = \int _bob^mary q\right( x \left) dx $

[ - ]
Reply by Tim WescottMarch 22, 2016

Uh -- dammit?

Edit: 

Embedded works:

$$ F \left ( x \right ) = \int_{bob}^{mary} q \left ( x \right ) dx $$

Inline?

$ F \left ( x \right ) = \int_{bob}^{mary} q \left ( x \right ) dx $

Try inline again: \[ F \left ( x \right ) = \int_{bob}^{mary} q \left ( x \right ) dx \]

[ - ]
Reply by stephanebMarch 22, 2016
[ - ]
Reply by Tim WescottMarch 22, 2016

Thanks

[ - ]
Reply by stephanebMarch 22, 2016

Inline, try 

\( F \left ( x \right ) = \int_{bob}^{mary} q \left ( x \right ) dx \)

\( F \left ( x \right ) = \int_{bob}^{mary} q \left ( x \right ) dx \)

[ - ]
Reply by texaneFebruary 20, 2016

Always wondered how Jason produced the beautiful equations, but was afraid to ask ... Thanks !

[ - ]
Reply by texaneFebruary 20, 2016

Hi,

A useful feature would be to export some article into PDF ... I do not know how hard it is to implement, but some website propose that and it is useful for off line reading and booklet composition ...

Cheers !

[ - ]
Reply by stephanebFebruary 20, 2016

I like the idea and will look into it.  Thanks Fabien for taking the time to write.

[ - ]
Reply by CarpetofStarsFebruary 23, 2016

@texane, I'm not sure what you're trying to do but if Chrome is your browser and you want to print the content of your current webpage, just click on the upper right grid tool bar and select Print. Then you can elect to print to PDF and browse to the destination folder.

You can also just cursor over the the text you want to export and copy/paste it in Libre OpenOffice doc file and then export to PDF or any other format. I don't know about MS Office.