## Welcome to the New Forum Interface!

Started by 2 years ago15 replieslatest reply 2 years ago505 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:

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 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!

[ - ]

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)

# 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.append(
value
)

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)
# )

# 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_to_send)

print("finished.")

 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...

drag&drop of a saved picture worked..

[/edit2]

[ - ]

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:

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.

[ - ]
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.
[ - ]

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?!

[ - ]

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!

[ - ]

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

[ - ]

Trying out MathJax:

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

[ - ]

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$

[ - ]

You can test your code here:

[ - ]

Thanks

[ - ]

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$$

[ - ]

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

[ - ]

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 !

[ - ]