Omnimaga

Omnimaga => News => Topic started by: DJ Omnimaga on November 01, 2011, 03:58:42 pm

Title: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 03:58:42 pm
Since the past few days, Netham45 screwed the board up a few dozen of times before he successfully tried many SMF mods on Omnimaga. Among them he installed two so far: new versions of quick reply and CODE tags!

While Juju was looking for My Little Pony, Friendship is Magic toys at his local Korvette store instead of helping, Netham45 modified some of the mods he tried to fit our needs and fix some of the bugs. The Quick Reply mod difference with the regular quick reply feature of SMF is that when submitting your message, it doesn't send a request to refresh the entire page anymore: it simplies update the current page through AJAX, like Facebook, reducing bandwidth usage for users and load times. Currently, this new feature is only available on the default forum theme, though. Netham45 is planning to install it on the other ones soon.

Besides that, the new CODE blocks feature now lets you select all the code in them in one click and quickly copy it to the clipboard. The only downside is that the Copy to Clipboard feature relies on Flash, so if you do not have Flash installed, only the Select All feature and the CODE blocks themselves will work fine. In the future, Netham45 plans to add line numbering in those tags, although he needs to make sure line numbers won't be part of copy/pastes.

Other changes might occur soon!

UPDATE (Nov 2nd 3:29 AM): The topic starter is now marked accross the topic view. You will see "Topic Starter" below his avatar.

UPDATE(2) (Nov 2nd 4:12 AM): The rest of the mods are installed. Here is a log of all the changes:
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Yeong on November 01, 2011, 03:59:56 pm
sounds awesome!


Quote
While Juju was looking for My Little Pony, Friendship is Magic toys at his local Korvette store instead of helping
lol
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Juju on November 01, 2011, 04:00:50 pm
Yay for ponies new useful mods! :D Damn this Quick Reply thing works well.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: XVicarious on November 01, 2011, 04:02:25 pm
Nice.  I did notice the new code blocks.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 04:03:24 pm
Quote
While Juju was looking for My Little Pony, Friendship is Magic toys at his local Korvette store instead of helping
lol
This is true though O.O (although it actually happened a few day earlier).. Actually not really, he just happened to see those toys there. :P
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: XVicarious on November 01, 2011, 04:05:07 pm
The thing about the code blocks is... I Don't know if its just my computer, but I don't see words... I just see a white box.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Juju on November 01, 2011, 04:05:46 pm
Yeah it was...

Code: [Select]
Also OMG I need to try this
Works fine for me.

Also the AJAX thing makes stuff easier to ninja...
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 04:08:37 pm
Hmm seems to work for me too. What browser do you use Jkag? You might want to report the bug in the site feedback section.

(Ignore the above if you use IE6, though)

The only thing I dislike about the Code tags is the small gap between the text/links at the top and the block itself.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Munchor on November 01, 2011, 04:09:48 pm
New Quick Reply post test:

Awesome features, glad to see the code tag updated, after having requested it many times!

EDIT: Didn't work.
Also, the new code tags don't work for me, and I have Flash.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: BlakPilar on November 01, 2011, 04:12:51 pm
I noticed the new quick reply last night (maybe this morning?). And the new code blocks is really useful. Pretty neat stuff :)
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 04:19:35 pm
Ephan It migth be Chromium 17 fault actually. It's not a stable release, right?
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: XVicarious on November 01, 2011, 04:24:49 pm
I am running Firefox Nightly 10.1... That might be. Lemme check on my desktop.

EDIT: works on firefox stable... hum. might try on my netbook when I get back (and install Flash on it)
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Munchor on November 01, 2011, 04:25:21 pm
Ephan It migth be Chromium 17 fault actually. It's not a stable release, right?

Indeed, it works on Firefox 7.1 on the same machine and operating system. I'm still dazzled at why the Copy to Clipboard doesn't work though, since it's Flash.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 04:27:26 pm
Ah maybe that's why then. You shoudl test in the latest stable versions to see if it works. By the way for me Copy to clipboard and select all, along with the code tags, worked in Safari, Chrome, IE9, Firefox 5 and Opera 11.52 and I tested quick reply in Chrome and Opera. I am testing in IE9 as of this post, now.

EDIT: Works. Btw I know quick modify sometimes doesn't work when you use the [Netham45] BBCode, though (like in iVenom's signature)
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Juju on November 01, 2011, 04:27:45 pm
Actually, there is Javascript Copy to Clipboard implementations, but the code to make it work is both a PITA and is different (or missing) for each browser.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Munchor on November 01, 2011, 04:28:41 pm
Actually, there is Javascript Copy to Clipboard implementations, but the code to make it work is both a PITA and is different (or missing) for each browser.

Yeah I searched for it as soon as I found out it was Flash, but the libraries don't seem very 'natural', and they're complex.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 04:33:24 pm
Oh wow then that might explain it. Could there be something added so one of the code works in non-specified browsers?

EDIT: Btw Quick reply works in Firefox 7.01 too (Just updated lol)
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Munchor on November 01, 2011, 04:34:41 pm
So, me and Juju talked about a fadeIn or a slideDown thing for this, so that posts slide down to visible, that would be awesome and easy to do with jQuery. Can you do it Netham? I can help :D
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: imo_inx on November 01, 2011, 04:35:44 pm
Ah maybe that's why then. You shoudl test in the latest stable versions to see if it works. By the way for me Copy to clipboard and select all, along with the code tags, worked in Safari, Chrome, IE9, Firefox 5 and Opera 11.52 and I tested quick reply in Chrome and Opera. I am testing in IE9 as of this post, now.

EDIT: Works. Btw I know quick modify sometimes doesn't work when you use the [Netham45] BBCode, though (like in iVenom's signature)
Nice to be recognized.

How do I use it?
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 04:35:49 pm
Do you mean some sort of animation? That might crash some old computers. X.x

EDIT iVenom you just add [Netham45] and everything afterward turns pink. Do not overuse it, though. Also you don't even need to close the tag.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Juju on November 01, 2011, 04:35:54 pm
So, me and Juju talked about a fadeIn or a slideDown thing for this, so that posts slide down to visible, that would be awesome and easy to do with jQuery. Can you do it Netham? I can help :D
I might help as well. jQuery-enhanced stuff FTW! :P
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Munchor on November 01, 2011, 04:37:07 pm
Do you mean some sort of animation? That might crash some old computers. X.x

Yes, a slidedown animation. It's not slow, because it's quite basic and simple. And the posts don't usually have thousands of images and videos (at least we don't use quick reply for those).
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 04:40:33 pm
Ah ok. Personally I'M unsure about it, though. I tend to not like if there are too many fancy stuff on websites and if everything appears instantly, although if a way is found to do it without making it annoying to browse the site after posting I guess it's fine.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: imo_inx on November 01, 2011, 04:47:26 pm
We should have an option whether to have More Effects or Less Effects for slower connections.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: BalancedFury on November 01, 2011, 04:54:19 pm
Just Testing :
HI
It sounds cool
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Jim Bauwens on November 01, 2011, 04:59:18 pm
Very nice, Omnimaga is getting better everytime I visit it =)
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: BalancedFury on November 01, 2011, 05:01:29 pm
True XD
^^^
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Munchor on November 01, 2011, 05:07:31 pm
We should have an option whether to have More Effects or Less Effects for slower connections.

We have No Effects as of right now :/ We only want to add one, a very simple one, that's not slow at all.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: imo_inx on November 01, 2011, 05:12:34 pm
Just meant for later... :/
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: ztrumpet on November 01, 2011, 05:43:03 pm
Great job, Netham!  Thanks for the effort. :D

Code: [Select]
code test
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: LincolnB on November 01, 2011, 05:50:10 pm
Code: [Select]
kewl!
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: shmibs on November 01, 2011, 05:51:37 pm
Code: [Select]
doo doodoo
EDIT: everything is functioning for me on ff 7.01 and linux =D
i love how much faster this makes things.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: parserp on November 01, 2011, 05:53:23 pm
Code: [Select]
this is so cool!!!!!
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: imo_inx on November 01, 2011, 05:55:03 pm
WOOT!
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: BalancedFury on November 01, 2011, 05:55:42 pm
Code: [Select]
hi... YOU LOSE THE GAMEYay! I got it :D
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 05:57:39 pm
I wonder if the new code tags still screw up in Spoiler tags in Chrome?
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: BalancedFury on November 01, 2011, 05:59:04 pm
Google Chrome?
I heard it was the safest browser?
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: nemo on November 01, 2011, 06:01:21 pm
Spoiler For Spoiler:
Code: [Select]
let's
test
this

edit: it doesn't work
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 06:07:43 pm
Hmm... maybe there's something that can be changed in the CSS for Chrome. I know this happens on every SMF site that has both Spoiler and CODE tags. It's not spoiler, but code that is broken, because I tried multiple spoiler tag mods before here (when I was still admin) and they all had the same Chrome issue.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Darl181 on November 01, 2011, 06:17:39 pm
Pretty cool, this should make some things easier ;D
*Darl181 was hoping the button would have an alt-text, tho x.x nvm it's quick reply in the topic not quick modify :P

EDIT: also the Reply #__ at the top of the posts are links..woot
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Eeems on November 01, 2011, 06:52:28 pm
Yay for updates :D
Fx 10.0a1 nightly on Arch Linux with Flash enabled doesn't let me copy to clipboard with the code tags
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 06:59:35 pm
Pretty cool, this should make some things easier ;D
*Darl181 was hoping the button would have an alt-text, tho x.x nvm it's quick reply in the topic not quick modify :P

EDIT: also the Reply #__ at the top of the posts are links..woot
I thought they already were? ??? Or maybe I never noticed if they were or not...
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Yeong on November 01, 2011, 07:00:40 pm
ooh it shows that post itself when the link is clicked :D
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Deep Toaster on November 01, 2011, 07:16:23 pm
What's instant quick reply? ???

EDIT: Oh, wrong theme.

EDIT2: Awesome! :D
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Scipi on November 01, 2011, 07:18:28 pm
Wow, nice. I've seen his on other sites before. :D
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Deep Toaster on November 01, 2011, 07:20:30 pm
Me too, and it's great. Makes things so much faster now!

EDIT: Only problem is that it doesn't tell you when there's been a ninja post before you :/
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 08:10:30 pm
Yeah that's one thing I don't like about it. I wonder if it shows the post though?
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Juju on November 01, 2011, 08:19:10 pm
Well, if this post says Reply #48 or more instead of #47 and you see #47 missing, there was a ninja post, but nobody really looks at this number, so it goes unnoticed.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 08:22:02 pm
Oh I see so it doesn't check for new posts prior updating. Darn x.x

Maybe it could be modified so it refreshes the page normally when there are new replies?
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: squidgetx on November 01, 2011, 09:16:40 pm
This seems nice. The new ban button is dangerously close to the Split/Delete buttons (for mods).......lol.

Edit: Wow, actually REALLY nice.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 09:18:59 pm
Oh wait I forgot about the ban button. Just make sure to not accidentally ban the wrong person. :P Also I hope the button doesn't clash with the site design :P
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: squidgetx on November 01, 2011, 09:19:58 pm
It should be fine, you have to go through at least 2 dialogues before you can actually ban someone after clicking it XD
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: BalancedFury on November 01, 2011, 09:20:04 pm
Also, if u want people to see something before another thing, you can just make it in to code thingy! :D
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 09:21:48 pm
It should be fine, you have to go through at least 2 dialogues before you can actually ban someone after clicking it XD
Ah that's good then.
Also, if u want people to see something before another thing, you can just make it in to code thingy! :D
Could you rephrase that? I am confused about what you mean..???
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: BalancedFury on November 01, 2011, 09:24:48 pm
Like when u type...
You lost
~~~~~~~~~
~~~~~~~~~
~~~~~~~~~
Code: [Select]
the gameIt attracts your eyes to the game thing before most things
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 09:27:07 pm
That would kinda be abusive I think. Let's use the code tag for its appropriate use, which is showing source code to get/give help about programming.

Talking about spam, I forgot to mention the nDoom policy was up in the news post (assuming it's still November-December like last year?)
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: BalancedFury on November 01, 2011, 09:27:36 pm
nDoom?
what is that?
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 09:39:05 pm
nDoom refers to both:

1) TI-Nspire port of the entire DOOM game (required Ndless)
2) The stricter rules enforcement on Omnimaga in November, December, June and July. It used to have no specific name until the nDoom game got featured on EncyclopediaDramatica and various gaming blogs between February 2011 and March. The trolling invasion that resulted from it was so bad that the IRC channel and OmnomIRC had to be closed for 2 weeks and 20 extra moderators were added to the forum team. The spam section was also restricted to members above 100 posts. The stricter rule enforcement policy was exceptionally applied from late March to late April 2011, then took the name of nDoom policy. Note that the nDoom incident escalated further than it should have because certain members of another calc site added fuel to the fire by questioning Omnimaga moderation in the heat of the moment, then for about a month afterward, there were some backlashes between both sites.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: BalancedFury on November 01, 2011, 09:40:31 pm
Ok... so what are the extra rules? can u giv me the link?
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 09:48:49 pm
It's pretty much the same thing as the ones mentionned in the rules section in the navigation, except that for larger offenses the user will receive a ban even if it's the first offense ever, instead of warnings. The ban will last until the night. However in most cases the policy acted more as a dissuasive thing, so as a result, fewer bans had to be given in the end. Also note that the rules are pretty outdated. For example I don't think the religion and ragequit rule are even valid anymore since at least 2 months or so, and the impersonation rule is missing. Staff is supposedly rewriting them, but I don't know what happened to that...
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: BalancedFury on November 01, 2011, 09:52:37 pm
Oh.. Lazy Admins :P
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: calcdude84se on November 01, 2011, 09:54:00 pm
It's the admins who are rewriting them, and last I asked them it was going very slowly. :/
Now we can ban in one less click! With this post I'll see how well the "instant" quick reply works :)
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 09:54:26 pm
Lol it's more the fact the rules are long and when editing them it introduced some errors, not to mention they're translated in five languages. :P

As for the religion rule and the ragequit one those two were only added because of one single member. They were supposedly removed shortly after he got permbanned since they were never a big problem with anyone else.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: BalancedFury on November 01, 2011, 09:56:54 pm
Really?
Let me guess : English
Spanish
French
Italian
Chinese?
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 10:00:06 pm
If you check the rules page, there's English, French, Dutch, German and Portuguese. (The 5 most used languages here)
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: BalancedFury on November 01, 2011, 10:00:34 pm
Oh well, I never look at the rules page cause the first time I looked, I memorized it :P
EDIT: isn't dutch and german the same thing?
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: calcdude84se on November 01, 2011, 10:03:16 pm
DualBLDR, as you should be able to infer, no, they are not ;)
DJ: Do we still have the Dutch boards? IIRC we don't.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: BalancedFury on November 01, 2011, 10:04:21 pm
Wut's the difference?
I thought it was both used it Germany
Is one of them a slang version of the other? or are they completely different?
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 10:13:02 pm
DualBLDR, as you should be able to infer, no, they are not ;)
DJ: Do we still have the Dutch boards? IIRC we don't.
Nah, not anymore, although we got a bunch of dutch users.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Deep Toaster on November 01, 2011, 10:18:39 pm
This seems nice. The new ban button is dangerously close to the Split/Delete buttons (for mods).......lol.
Maybe it should be moved next to the profile/email/PM/arcade icons (in the bottom left of every post)? It seems about the right size.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 10:24:11 pm
Could you make a screenshot of how it looks like btw?
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: calcdude84se on November 01, 2011, 10:33:59 pm
Sure!
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 01, 2011, 10:36:02 pm
Thanks, and nice I guess. Also lucky, you got more space between the rating and quote buttons. I always accidentally click -1 instead of Quote lol.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Hayleia on November 02, 2011, 02:13:55 am
There is a "problem" (not really) with the Reply #72 thing: For example with DJ's post, if I click on "Re: Omnimaga introduces instant quick-reply and enhanced CODE tags", it centers the page so the post is on top but if I click on "Reply #72", it doesn't center anything and I have to scroll down.
Not that I am lazy (:P) but when I first tried it, I didn't scroll down, thinking it was just redirecting me to the same page with no centering or something.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Netham45 on November 02, 2011, 02:34:16 am
I'd rather not do animations for the scroll downs. They're unnecessary, they'd add a considerable amount of code bloat, and they'd slow down on slower devices.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Hayleia on November 02, 2011, 02:41:18 am
I'd rather not do animations for the scroll downs. They're unnecessary, they'd add a considerable amount of code bloat, and they'd slow down on slower devices.
I agree with that but I wasn't talking about animations ??? but about a jump or something (excuse my lack of vocabulary, I am French). Choose a post and try clicking on "Re: Omnimaga introduces ... tags", then on Reply#__. The first one displays the page then jumps to the post, the second one displays the page and doesn't jump (so I see IRC)
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Netham45 on November 02, 2011, 02:56:21 am
I meant that message to Qwerty, sorry.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: z80man on November 02, 2011, 03:39:54 am
Let's see how well the quick reply works.
Edit: pretty snappy
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Hayleia on November 02, 2011, 04:06:41 am
Also, yay for the "Topic starter" thing :D
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Netham45 on November 02, 2011, 04:14:13 am
Me too, and it's great. Makes things so much faster now!

EDIT: Only problem is that it doesn't tell you when there's been a ninja post before you :/

Can I get browser info? :D
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Stefan Bauwens on November 02, 2011, 05:46:23 am
Quick reply test. :P(From iPod!)
Edit:Oh yeah.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Netham45 on November 02, 2011, 05:48:58 am
It should work with any device that supports AJAX.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Yeong on November 02, 2011, 06:59:58 am
topic starter thingy looks awesome :D
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: alberthrocks on November 02, 2011, 03:30:38 pm
Awesome job Netham45! :D

I have an AMAZING fix for you Netham45! :) Remember that annoying, Chrome-only tiny code box in a thingy bug?
I *think* this should fix it...

Replace the following:
Code: [Select]
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}
// ]]></script>
with
Code: [Select]
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
if (is_chrome) { return; }
for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}
// ]]></script>

(This should exist somewhere in the SMF code/templates, as it's outputted with the regular HTML.)
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: ztrumpet on November 02, 2011, 05:01:42 pm
Netham, I didn't realize you added so many things.  Thanks again! :D

Edit: test
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: ralphdspam on November 02, 2011, 05:15:04 pm
Sounds cool!  (This is a test.)
There is a small problem with chrome.  The quick edit text box is squished, and when I press the back arrow, chrome loads the cached page instead of the updated page.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 02, 2011, 05:48:40 pm
Yeah I noticed the cache issue. It happens in Opera too. I guess the only way to fix that would be to make the site force cache reload when pressing back, like it used to be in 2009, but the downside is that it makes browsing annoyingly slow at times and requires a lot more bandwidth/resources from Netham45 server.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Darl181 on November 02, 2011, 06:18:14 pm
I'm not sure if it's just me, but the line numbers on the code box seem to be off...
(firefox 7.0.1)

EDIT: hm the instant quick reply doesn't seem to work for me in SSL
+/- buttons in the edit page thing are awesome ;D (maybe this could also be useful for the sig editor in the Profile, it tends to get big :P)

EDIT2: the reason for edit doesn't show for me tho, it's just the +/- buttons immediately followed by "Last edit" and checkboxes :\ (also in SSL)
So it doesn't show in this topic, but it does in another topic (http://ourl.ca/13721/258499) ???
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Deep Toaster on November 02, 2011, 06:18:28 pm
Suggestion: Can code boxes be made monospace again? For some reason they're now the same font as every other part of the forum (Verdana).
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 02, 2011, 06:18:47 pm
Yeah I reported that bug in a topic. It seems to only happen in certain code boxes, though.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Deep Toaster on November 02, 2011, 06:20:03 pm
I noticed that right after making my post above lol
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: alberthrocks on November 02, 2011, 07:43:48 pm
Some quick testing:

Spoiler For Spoiler test!:
Quote from: Quote test!
Code: (Code test!) [Select]
AwesomeCode();
More awesome code!
Insane code!
Output(1,1,"Hello world!")
Output(2,1,"Hello world!")
Output(3,1,"Hello world!")
Output(4,1,"Hello world!")
/*
 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Oracle nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

import java.nio.file.*;
import static java.nio.file.StandardCopyOption.*;
import java.nio.file.attribute.*;
import static java.nio.file.FileVisitResult.*;
import java.io.IOException;
import java.util.*;

/**
 * Sample code that copies files in a similar manner to the cp(1) program.
 */

public class Copy {

    /**
     * Returns {@code true} if okay to overwrite a  file ("cp -i")
     */
    static boolean okayToOverwrite(Path file) {
        String answer = System.console().readLine("overwrite %s (yes/no)? ", file);
        return (answer.equalsIgnoreCase("y") || answer.equalsIgnoreCase("yes"));
    }

    /**
     * Copy source file to target location. If {@code prompt} is true then
     * prompt user to overwrite target if it exists. The {@code preserve}
     * parameter determines if file attributes should be copied/preserved.
     */
    static void copyFile(Path source, Path target, boolean prompt, boolean preserve) {
        CopyOption[] options = (preserve) ?
            new CopyOption[] { COPY_ATTRIBUTES, REPLACE_EXISTING } :
            new CopyOption[] { REPLACE_EXISTING };
        if (!prompt || Files.notExists(target) || okayToOverwrite(target)) {
            try {
                Files.copy(source, target, options);
            } catch (IOException x) {
                System.err.format("Unable to copy: %s: %s%n", source, x);
            }
        }
    }

    /**
     * A {@code FileVisitor} that copies a file-tree ("cp -r")
     */
    static class TreeCopier implements FileVisitor<Path> {
        private final Path source;
        private final Path target;
        private final boolean prompt;
        private final boolean preserve;

        TreeCopier(Path source, Path target, boolean prompt, boolean preserve) {
            this.source = source;
            this.target = target;
            this.prompt = prompt;
            this.preserve = preserve;
        }

        @Override
        public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {
            // before visiting entries in a directory we copy the directory
            // (okay if directory already exists).
            CopyOption[] options = (preserve) ?
                new CopyOption[] { COPY_ATTRIBUTES } : new CopyOption[0];

            Path newdir = target.resolve(source.relativize(dir));
            try {
                Files.copy(dir, newdir, options);
            } catch (FileAlreadyExistsException x) {
                // ignore
            } catch (IOException x) {
                System.err.format("Unable to create: %s: %s%n", newdir, x);
                return SKIP_SUBTREE;
            }
            return CONTINUE;
        }

        @Override
        public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
            copyFile(file, target.resolve(source.relativize(file)),
                     prompt, preserve);
            return CONTINUE;
        }

        @Override
        public FileVisitResult postVisitDirectory(Path dir, IOException exc) {
            // fix up modification time of directory when done
            if (exc == null && preserve) {
                Path newdir = target.resolve(source.relativize(dir));
                try {
                    FileTime time = Files.getLastModifiedTime(dir);
                    Files.setLastModifiedTime(newdir, time);
                } catch (IOException x) {
                    System.err.format("Unable to copy all attributes to: %s: %s%n", newdir, x);
                }
            }
            return CONTINUE;
        }

        @Override
        public FileVisitResult visitFileFailed(Path file, IOException exc) {
            if (exc instanceof FileSystemLoopException) {
                System.err.println("cycle detected: " + file);
            } else {
                System.err.format("Unable to copy: %s: %s%n", file, exc);
            }
            return CONTINUE;
        }
    }

    static void usage() {
        System.err.println("java Copy [-ip] source... target");
        System.err.println("java Copy -r [-ip] source-dir... target");
        System.exit(-1);
    }

    public static void main(String[] args) throws IOException {
        boolean recursive = false;
        boolean prompt = false;
        boolean preserve = false;

        // process options
        int argi = 0;
        while (argi < args.length) {
            String arg = args[argi];
            if (!arg.startsWith("-"))
                break;
            if (arg.length() < 2)
                usage();
            for (int i=1; i<arg.length(); i++) {
                char c = arg.charAt(i);
                switch (c) {
                    case 'r' : recursive = true; break;
                    case 'i' : prompt = true; break;
                    case 'p' : preserve = true; break;
                    default : usage();
                }
            }
            argi++;
        }

        // remaining arguments are the source files(s) and the target location
        int remaining = args.length - argi;
        if (remaining < 2)
            usage();
        Path[] source = new Path[remaining-1];
        int i=0;
        while (remaining > 1) {
            source[i++] = Paths.get(args[argi++]);
            remaining--;
        }
        Path target = Paths.get(args[argi]);

        // check if target is a directory
        boolean isDir = Files.isDirectory(target);

        // copy each source file/directory to target
        for (i=0; i<source.length; i++) {
            Path dest = (isDir) ? target.resolve(source[i].getFileName()) : target;

            if (recursive) {
                // follow links when copying files
                EnumSet<FileVisitOption> opts = EnumSet.of(FileVisitOption.FOLLOW_LINKS);
                TreeCopier tc = new TreeCopier(source[i], dest, prompt, preserve);
                Files.walkFileTree(source[i], opts, Integer.MAX_VALUE, tc);
            } else {
                // not recursive so source must not be a directory
                if (Files.isDirectory(source[i])) {
                    System.err.format("%s: is a directory%n", source[i]);
                    continue;
                }
                copyFile(source[i], dest, prompt, preserve);
            }
        }
    }
}

EDIT: Yup, the Chrome bug seems to exist, font change or not.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: flyingfisch on November 02, 2011, 07:51:25 pm
small prob, when you type:
Code: [Select]
[ code]The numbering is wrong
ddd
dddd[ /code](intentional space between [ and /)

same with this:
Code: [Select]
[ code]
Some sample code
some more
and more[ /code]

However, typing your code like this fixes it:

Code: [Select]
[ code]
Some sample code
some more
and more
[ /code]
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 02, 2011, 08:03:56 pm
Could you explain more what is the bug doing? I can't seem to see it in the examples above...

Also Alberthrocks I think it's something wrong with the CSS for CODE tags, which messes up in spoiler tags.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: flyingfisch on November 02, 2011, 08:11:54 pm
Oh, it looks like its been fixed :)
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: DJ Omnimaga on November 02, 2011, 08:16:53 pm
Could it have happened due to an instant quick reply issue? Or maybe someone else than Netham45 fixed it, because I don't see him online.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: BalancedFury on November 02, 2011, 08:42:14 pm
Thanks, and nice I guess. Also lucky, you got more space between the rating and quote buttons. I always accidentally click -1 instead of Quote lol.
Me too
One time, I didn't realize that I -1'd something I was supposed to quote and the person pm'd me and said ???
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: mrmprog on November 02, 2011, 08:43:16 pm
Thanks, and nice I guess. Also lucky, you got more space between the rating and quote buttons. I always accidentally click -1 instead of Quote lol.
Me too
One time, I didn't realize that I -1'd something I was supposed to quote and the person pm'd me and said ???
Wait, how did they know you downrated them?
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: BalancedFury on November 02, 2011, 09:21:17 pm
It was my bro. XD
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: aeTIos on November 03, 2011, 06:11:08 am
DualBLDR, as you should be able to infer, no, they are not ;)
DJ: Do we still have the Dutch boards? IIRC we don't.
Nah, not anymore, although we got a bunch of dutch users.
I would actually like to have them back.
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: Stefan Bauwens on November 03, 2011, 11:43:45 am
DualBLDR, as you should be able to infer, no, they are not ;)
DJ: Do we still have the Dutch boards? IIRC we don't.
Nah, not anymore, although we got a bunch of dutch users.
I would actually like to have them back.
I actually don't really miss that. In fact, I'm better at English than at dutch. ;)
Alos, this post is the 100th in this thread!
Title: Re: Omnimaga introduces instant quick-reply and enhanced CODE tags
Post by: BalancedFury on November 03, 2011, 05:23:01 pm
DualBLDR, as you should be able to infer, no, they are not ;)
DJ: Do we still have the Dutch boards? IIRC we don't.
Nah, not anymore, although we got a bunch of dutch users.
I would actually like to have them back.
I actually don't really miss that. In fact, I'm better at English than at dutch. ;)
Alos, this post is the 100th in this thread!
Darn :P
I was waiting for the 100th post :P
Now I have to stick with the number of dogs in that crappy movie :P