Dev Notes

38 posts / 0 new
Last post
Sam
#1

Starting this thread to have a place to note when updates are made to the site.

Made some updates to subscriptions. Should be easier now to manage subscriptions to topics as a whole rather than just the individual threads.

Started working on a P1P1 kinda thing. Dunno if it should be an actual 'poll' where people can vote or just the embedded 15 cards to start a regular discussion. We'll play with it.

There are other features of the site that are basically ready, but I still have to get a few more sets imported so the card database is complete. Wizards changed their code on the gatherer so the extractor program is being re-worked currently.

Sam

Got BNG and JOU added to the database. Had to make some updates to the import script. There was an em dash introduced in the ability text of cards like 'Inspire — blah blah' that broke everything.

I'll get the non-real sets like portal and commander imported and the database of cards will be complete and up to date. Then we can play with the cube concepts.

Sam

Imported Portal 3 kingdoms, planechase (which i guess is all just reprints), commander, commander's arsenal & commander 2013. Pasted in the full list I received a while back and nothing error'd so I think we've got everything in there.

Time to make some pick 1s.

Sam

Had to add newer planechase set for a few cards. Still need original portal sets for a few cards.

Sam

Need to fix email templates to look nicer.
Don't send email to author.
Add quoting button to posts.

Tim

Bug Report

Events always shows 1 new post regardless of how many times I've viewed the top threads in that forum.

The (X new) link on the general forums landing redirects to that forum in basically the same way as clicking on that forum's name does rather than navigating to new posts.

The (View X new) link on individual threads just causes a postback to that forum's page with the clicked linked thread scrolled to the top of the page. As far as I can tell this never actually redirects you to the thread itself.

edit: Ok, the the first issue was resolved as there was a new thread I hadn't clicked on but it had 0 replies and the "new" link basically looked like a part of the thread title. When clicking the "new post" link from the main forums landing, the thread in question was scrolled to the top of the page but it was covered by the "Topic / Topic starter" header that remains displayed as you scroll down.

Sam

TY I'll look into this when I can.

Lewis

Did the email notifications get taken off? I haven't received any this week.

Sam

Fuck, no idea. I can look into it later.

Sam

I'm getting emails so maybe it's something about your settings?

Lewis

Whoa....haha...OK, it was something on MY end. I didn't do anything, but EVERY email notice from this week showed up at once about 5 minutes ago.

Sam

SamGaardtest test test

Added quote button.

Sam

Multiple quotes in single post

Tim

SamMultiple quotes in single post

Test bare quote

edit: looks like the quote button is injecting HTML into the comment box. Feel free to delete spam above.

Sam

Maybe you can help me figure this out. I think it's the regular expression i'm using.

preg_match_all('/\[QUOTE(.*)\](.*)\[\/QUOTE\]/s', $temp_body, $results)

Tim

Man you have a lot of different js files. Where is that used and what is it doing? Extracting the contents of nested quote?

Tim

In your quoteComment function you have

post += jQuery('#post-' + cid + ' .field-name-comment-body .field-item').html();

pretty sure you want .text();
the .html(); is including the p tags from inside the div.

Sam

It's in the php. I had to run but I think the key is the regular expression. I need it to be a nested array instead of tons of arrays. So I can loop through them and replace multiple instances.

SamIt's in the php. I had to run but I think the key is the regular expression. I need it to be a nested array instead of tons of arrays. So I can loop through them and replace multiple instances.

TimTschumyThe "*" quantifier is greedy by default which normally wouldn't be a problem, except that you have the "/s" single-line modifier which is making your "." wild card match newlines.

Tim

Solution:

The "*" quantifier is greedy by default which normally wouldn't be a problem, except that you have the "/s" single-line modifier which is making your "." wild card match newlines. So the first group is matching from the first user="Sam.... all the way to the end of the last instance of user="Sam... which gives chunks of both quotes plus anything in between when there is more than one quote in the post. Adding the "?" lazy quantifier makes it stop at the first instance of [/QUOTE] which I assume is what your code expects.

/\[QUOTE(.*?)\](.*?)\[\/QUOTE\]/s

That should work, although you're still going to have issues with both nested quotes and quoting posts that contain quote tags in the content (like this one) unless you are handling that with additional logic in the code behind.

Sam

Awesome man. That worked great.

Sam

Updated all modules. Re-added the cube slideshow to the homepage. Implemented boost caching.

Tim

Bug Report

Clicking "View [n] new" links doesn't redirect to the actual thread and just scrolls down the current page to the first thread with new replies.

I think this is because (for example) the link "/forum/p1p1/p1p1-62315#new" is looking for a link element named "new" and the same name is used on the page containing the link. For some reason this causes it to redirect to "/forum/p1p1#new" when it finds a match on the current page. Was able to redirect to the thread successfully after renaming all #new links on the forum page to something else.

Sam

lol yeah that's funny. It's whatever the forums module does and looks like out of the box, I didn't even know that was there. I can either fix it or eliminate it.

Tim

I think it would be nice to have if it's not too much of a pain to give each page it's own set of #somethingsomethingnew IDs but obviously not urgent.

Sam

Added 'Cube Cards' checkbox to filters on card search page.

Tim

SamAdded 'Cube Cards' checkbox to filters on card search page.

This is dope as fuck. I'm gonna commit to memory all the best blue card + x interactions I can find.

Three suggestions
1. Make this text box accept tabs so I don't have to click back into it and press space 4 times instead (if this is more than two lines of code don't bother). --edit: ok wait leading spaces are trimmed so it's impossible to indent either way.
                    nonbreaking spaces?
2. Either enable paging or let me view more than 400 cards at a time. I'd like to be able to browse the entire cube at once.
3. The ListViews/Multi-Selects for Color, Type and SubType either need a "None" option or some sort of checkbox functionality. Once I have a color selected, I can't deselect and search again without a color parameter.

edit: the above is super nit-picky, this is an awesome feature :)

Sam

Moved the site to a new server. Let me know if you see anything weird.

Tim

It's pretty bizarre how fast my pages are loading now.

Sam

Fuck yeah. I'm clickin around makin comments and shit is loading fast.

Lewis

How do I make that link I just posted on the GP OKC page an actuall link where we don't have to cut and paste?

Sam

Sry, I'll look into it this weekend. I had to disable it because it was breaking stuff.