Codea Talk update

i want my forum back! Bwaaaaaa!
Please, restore the post ordering with most recent activity on top as it was before. With the current order it is impossible to follow a discussion thread in real time. Many updated threads are not are the top any more. Thanks!

@Simeon TERRIBLE CHANGE! apparently you’ve just changed the way code is embedded… So now my project to collect projects is dead… It wont load code from the forum anymore (it was based on the raw text analysis, looking for your html tags as raw text). I’ll try to fix it when you will be fully finished with your changes… :((
Just to let you know, here is the function i am using:

function decodeForum(data,url)
    local key
    key = getInnerText(url,"/comment/","#")
    if key  then
        key = 'id="Comment_' .. key .. '">'
        key = getInnerText(url,"/discussion/","/")
        key = 'id="Discussion_' .. key .. '">'

    local title = getInnerText( data, "<title>", "</title>")
    local comment = getInnerText( data, key, "</li>")
    local author = getInnerText( data, 'title="', '"') or ""
    local comment = getInnerText( comment, '<div class="Message">', '</div>') or ""
    local description = getInnerText( comment, '<p>', '</p>') or ""
    local code = getInnerText( comment, '
`<br />', "`
") or ""
    if code == "" then
        code = getInnerText( comment, '
`', "`
") or ""
    code = string.gsub(code, ">", ">")
    code = string.gsub(code, "<", "<")

    return code

-- utility function
function getInnerText(str,before,after)
    if not str then return  end
    local a,b,c,d
    a,b = string.find(str, before, 1, true)
    if not b then return  end
    c,d = string.find(str, after, b+1, true) 
    if not c then return  end
    local subStr
    if b and c then
        subStr = string.sub(str,b+1,c-1)
    return subStr

@jmv38 as I said, I did not break this intentionally. The upgrade was necessary: there was a critical security flaw in the previous version of Vanilla that was being actively exploited. The recommendation was to update to the new version as soon as possible, so I did.

I am currently looking at ways to restore most of the changed functionality and aesthetics.

I don’t think I will be able to restore the exact HTML layout you depended on, however I really like the idea of being able to easily extract code from the forums. Perhaps we can devise some sort of API / vanilla plugin that makes it possible to easily request code from forum posts. I’ll look into it.

EDIT: It looks like there is a RESTful Vanilla API here — I can look into integrating it so you can have some stable way to access the forums and build apps on top of them.

EDIT 2: Tried to restore some of the aesthetics

@Ignatz also shrunk the header size, please let me know if there are any more issues.

much better, thank you!

Except that on my iPad 3, the logo is still large, and overlays the menu items immediately under it

Oops. Looks like a bug, will fix

sorry to create work for you. I know CSS can be a pain.

@Simeon thanks for your concern.
let me know when you have settled your html layout, i’ll rework my code then. It is not very difficult for me to update my html decoder, as you’ve seen the function is quite short. I am not sure it is worthwhile the effort to add the RESTful api just for my use.

it is good to have the post order back. Thanks!

On my desktop, all the buttons at the top (discussions, activity, inbox, etc.) are overlaying the “Codea Talk” text, both of which are solid white, and can make it a little hard to read the other.

@SkyTheCoder @Ignatz turns out there is no bug, you need to refresh the page, something is cached somewhere.

I’d really like to be able to switch between the Codea app and forum without being sent back to the forum homepage every time I open it. Also, if there were a Codea talk link to press while inside a project, that would speed things up too.

@shisma its simple to make your second request. Just make a button and draw it in your projects, and have it do an openURL with the in-app browser

It would be cool if it were featured in the editor so you could just do it without having to actually add to the project.

Actually you can switch between them without doing any coding. On the iPad, open the forum then do a four finger shrink. Open the Codea app. You can then do a four finger swipe sideways to show the forum and then swipe back to show the app. You can swipe back and forth as many time as you want.

@dave1707 I was speaking solely about improving the app’s functionality. The link to the Codea forum should support this automatically. Shouldn’t be too hard to code.

@Simeon i have adapted codeaShowcase to your new forum syntax.