Author Topic: Soft launching a new beta feature: descriptions v2  (Read 1245 times)

Offline Jarudin

  • Member
  • Posts: 6935
Soft launching a new beta feature: descriptions v2
« on: November 25, 2015, 02:34:26 am »
Hi guys,

I'm happy to see the wildgrowth of torrent descriptions. I see many great ideas.
I also see some workarounds to move sample images into the description. That's a great idea but the workaround is not so great.
When you enable version 2 for a torrent you get a  proper way to put sample images in your description - but it breaks the workaround.
I'm soft launching this is because I need you guys to test the new setup.
I intend to add more features that will make it easier to make description, if you have any thoughts, let me know!

I have made a minimal working version. Version 2 (for lack of a better name) will break most existing descriptions - but it should be fairly easy to fix.
I intend this transition to be the only breaking version, so if you get your description working with version 2 I will try to make sure it keeps working.

I'd also like to hear your feedback. Is there a feature you think is going to help you make descriptions?

-J

PS.
The screenshots now also show up in the sandbox! How cool is that? :D


The technical stuff

This is broken in version 2 (by design):
Code: [Select]
window.parent.document.getElementById(/**/)

Instead you can put sample images right into your description. There are several ways to do it:

Code: [Select]
[sample=123456]
Code: [Select]
[sample=http://link.to/full.image.png]
Code: [Select]
<a href="[bbtimg=123456]" class="bbt_sample"><img src="[bbtimgth=123456]" /></a>
class="bbt_sample" is what triggers the sample image discovery.
Code: [Select]
<a href="http://link.to/full.image.png" class="bbt_sample"><img src="http://link.to/thumb.png" /></a>

If you want to go completely nuts you can do:
Code: [Select]
<script type="text/javascript">
bbt.add_sample({
  'href': "http://link.to/full.image.png",
  'thumb': "http://link.to/thumb.png"
});

bbt.open_sample(0 /* index of the sample (ie. where to start the gallery) */);
</script>

The old method of declaring screenshots still works and you can even mix the old method and the new method but I wouldn't recommend it.

How to use

To use the new feature open the description in the sandbox. At the bottom of the page you can switch to version to 2.
When you save it to torrent it will also make it a version 2 torrent.
« Last Edit: November 25, 2015, 04:08:23 am by Jarudin »

Offline carks

  • Staff
  • Member
  • Posts: 418
  • Everyday is always the best day~
    • muh blog
Re: Soft launching a new beta feature: descriptions v2
« Reply #1 on: November 25, 2015, 03:47:28 am »
Thanks Jaru, you broke my descriptions. Now they look even worse than before.

Anime-Planet.com - anime | manga |

Offline Jarudin

  • Member
  • Posts: 6935
Re: Soft launching a new beta feature: descriptions v2
« Reply #2 on: November 25, 2015, 03:53:31 am »
Thanks Jaru, you broke my descriptions. Now they look even worse than before.

Online cold_hell

  • Member
  • Posts: 350
Re: Soft launching a new beta feature: descriptions v2
« Reply #3 on: November 25, 2015, 03:53:57 am »
The screenshots now also show up in the sandbox! How cool is that? :D
This is something I definitely want and overall it will be good for the users to have another/easier option for moving the screenshots, but something really bothers me with how you butcher the site lately... After ~7months I still have no idea how to open Offers or BakaCompare on touch based device without writing the URL, blame me.

I have made a minimal working version. Version 2 (for lack of a better name) will break most existing descriptions - but it should be fairly easy to fix.
Your bank: We will use new database. Database 2 (for lack of a better name) will reset most existing accounts or increase your debts - but it should be fairy easy for you to collect the money (again).

I don't want to be bitter or anything, but compatibility is very important thing. You already broke the descriptions once recently and half of them are still slightly off (example https://bakabt.me/torrent/175458/aura-maryuuinkouga-saigo-no-tatakai-bd-720p-watashi ) and now you want to do it again?
Word 2010 shows documents made by Word 2003 in the same way as Word 2003 and 2013.

If it is "easy" for you how about making some automation script to process all these 16 314 torrents, because I doubt it will be easy for most of us, nevermind the time? Option B - just put some option (checkbox) in torrent info for "old screenshot code" and set it enabled for the old torrents. It isn't that costly to keep 1-2MB of old code on the server.

No code should break old things or if it does - everything should be automatically converted to the new standards.



...As of now BBT's lightbox no longer exist and all screnshots are opened as images on the entire tab, yesterday the lightbox was resizing screenshots, but still loading the whole 2-3MB just because "why not".

Honestly, are you trolling the users on purpose?

Offline Jarudin

  • Member
  • Posts: 6935
Re: Soft launching a new beta feature: descriptions v2
« Reply #4 on: November 25, 2015, 04:06:43 am »
compatibility is very important thing
You have to active version 2 per torrent. Nothing breaks. Nothing should ever break. I'm sorry if that wasn't clear.
If something does break please let me know and I can look into it.

(example https://bakabt.me/torrent/175458/aura-maryuuinkouga-saigo-no-tatakai-bd-720p-watashi )
That does look a bit broken to me, but I doubt that's my doing. The alignment of the boxes is off somehow. This is exactly the sort of thing v2 should prevent.
edit: it looks worse on Firefox. Maybe the description author didn't check compatibility?
« Last Edit: November 25, 2015, 04:33:39 am by Jarudin »

Online cold_hell

  • Member
  • Posts: 350
Re: Soft launching a new beta feature: descriptions v2
« Reply #5 on: November 25, 2015, 04:23:42 am »
That does look a bit broken to me, but I doubt that's my doing. The alignment of the boxes is off somehow. This is exactly the sort of thing v2 should prevent.
edit: it looks worse on Firefox. Maybe the description author didn't check compatibility?
Nah, it broke before 7 months with the new design and still most of the old descriptions are slighly off. This is pretty much the reason I was so scared for breaking the compatibility. Thanks for clarifying about the 2 versions.

Offline macros74

  • Staff
  • Member
  • Posts: 2426
  • Swear it! No more School Days!
Re: Soft launching a new beta feature: descriptions v2
« Reply #6 on: November 25, 2015, 06:21:32 am »
So...
Why does the slide screenshot function not work anymore for current descriptions?
I can't seem to go back and forth anymore while viewing the screenshots, or close them, using FF 42.0.

Online Al_Sleeper

  • Member
  • Posts: 8449
Re: Soft launching a new beta feature: descriptions v2
« Reply #7 on: November 25, 2015, 07:00:04 am »
Maybe you click not far enough from the center of the image.

Offline macros74

  • Staff
  • Member
  • Posts: 2426
  • Swear it! No more School Days!
Re: Soft launching a new beta feature: descriptions v2
« Reply #8 on: November 25, 2015, 07:34:46 am »
Well, I have the same issue on IE 10, on a different PC.
Apparently you haven't. Strange...

Offline Mistgun_Zero

  • Member
  • Posts: 6328
  • Idol~chan
Re: Soft launching a new beta feature: descriptions v2
« Reply #9 on: November 25, 2015, 08:24:06 am »
So...
Why does the slide screenshot function not work anymore for current descriptions?
I can't seem to go back and forth anymore while viewing the screenshots, or close them, using FF 42.0.
Same problem here. Same with MS Edge and latest Chrome. (on Win 10)

I haven't edited any description to version 2 though. Also, I miss the loading circle. It kinda needs to be present.

EDIT: Changed this description to V2. Didn't notice any changes. (except slide still doesn't function anymore). Screenshots were present in description though. (What exactly was supposed to be different in V2 anyway?)
« Last Edit: November 25, 2015, 08:36:00 am by Mistgun_Zero »

Homu-Homu is troubled

Offline 12laus

  • Staff
  • Member
  • Posts: 978
Re: Soft launching a new beta feature: descriptions v2
« Reply #10 on: November 25, 2015, 11:41:44 am »
(What exactly was supposed to be different in V2 anyway?)

As far as I understand, the v2 will 'break' any javascript workaround users have been using to put images within the description itself, (for example in something like this: https://bakabt.me/torrent/182292/t) but will provide an easier way to do it properly.

Offline carks

  • Staff
  • Member
  • Posts: 418
  • Everyday is always the best day~
    • muh blog
Re: Soft launching a new beta feature: descriptions v2
« Reply #11 on: November 25, 2015, 01:35:35 pm »
Quick thing for a few people. You can use the new function without images. Like this. Just do

Code: [Select]
<a class="bbt_sample"  href="[bbtimg=123456]">x</a>

You can even add multiple classes to your identities if you want, like this. So, yeah, most people probably know this.

Anime-Planet.com - anime | manga |

Online lololitas

  • Staff
  • Member
  • Posts: 2386
  • Warning! May appear random at times!
Re: Soft launching a new beta feature: descriptions v2
« Reply #12 on: November 25, 2015, 04:41:24 pm »
So...
Why does the slide screenshot function not work anymore for current descriptions?
I can't seem to go back and forth anymore while viewing the screenshots, or close them, using FF 42.0.

Actually still have the same problem in all v1 images. v2 works.

Another thing you might add is a HTMLv2 for the code bundle function on Bakashots.
« Last Edit: November 25, 2015, 07:43:35 pm by lololitas »

Online Hatsune4505

  • Member
  • Posts: 147
  • So many games, so little time!
Re: Soft launching a new beta feature: descriptions v2
« Reply #13 on: November 25, 2015, 07:32:05 pm »
After ~7months I still have no idea how to open Offers or BakaCompare on touch based device without writing the URL, blame me.
On my adroid-based smartphone you can press and hold the browse/Bakashots link and the drop down list for offers/Bakacompare should appear. I'm not sure about iOS or Microsoft based touch devices though.

The screenshots now also show up in the sandbox! How cool is that? :D
Sweet, I'll check out this V2 on my next upload.
« Last Edit: November 25, 2015, 07:54:10 pm by Hatsune4505 »
It's a trap?!

Offline Krudda

  • Member
  • Posts: 9872
  • 私は 日本語 が 上手 じゃ ありません
    • My Anime List
Re: Soft launching a new beta feature: descriptions v2
« Reply #14 on: November 25, 2015, 07:52:59 pm »
This looks very handy, much thanks. I'll try this out later when I have time. I have one offer in mind that I could make awesome use of this feature if it does what I assume it will.

That touchscreen is still an issue though. Sure you can long press to open the drop down, but on the drop downs with links, my phone opens the link not the menu. If you're fast enough, you might click the one you want before the page loads. Might.

E: tried the v2, it fails and just makes any image I set with sample, a dead image.
It worked fine with a single image, but nothing shows up in the lightbox.
« Last Edit: November 25, 2015, 09:55:25 pm by Krudda »

Trust me, I'm a random nobody.

Offline buchno

  • Member
  • Posts: 4324
Re: Soft launching a new beta feature: descriptions v2
« Reply #15 on: November 25, 2015, 10:33:32 pm »
After ~7months I still have no idea how to open Offers or BakaCompare on touch based device without writing the URL, blame me.
On my adroid-based smartphone you can press and hold the browse/Bakashots link and the drop down list for offers/Bakacompare should appear. I'm not sure about iOS or Microsoft based touch devices though.
You're forced to do that workaround when you should be able to do this.
Hover state drop-down menus aren't mobile-friendly.

Offline Jarudin

  • Member
  • Posts: 6935
Re: Soft launching a new beta feature: descriptions v2
« Reply #16 on: November 25, 2015, 11:39:02 pm »
I've investigated the Firefox bug where the screenshots don't line up.

Torrent: https://bakabt.me/torrent/180192/hunter-x-hunter-2011-bd-1080p-coalgirls


I'm fairly certain this is a bug in the rendering engine of Firefox. If you trigger a repaint on those elements the misaligned elements will fix themselves. I've not been able to find a sure-fire way of triggering a repaint. This might be an interesting avenue to pursue.

I've dug a little deeper and think this line triggers the bug:

Code: [Select]
window.parent.document.getElementById("screenshots").style.fontSize = "0px";

If you replace it with:

Code: [Select]
window.parent.document.getElementById("screenshots").style.fontSize = "1px";
window.parent.document.getElementById("screenshots").getElementsByTagName("p")[0].style.display = "none";

The bug seems to disappear.

Can you guys confirm that this works for you?
I'm worried the 1px fontSize might still give problems for some descriptions.

This would not be a very nice fix as we'd need to manually sift through all the descriptions that have this code.
I could potentially do a replace all on all the descriptions in the database but I'll do that once I'm certain this fixes it and there are no other side-effects.
« Last Edit: November 26, 2015, 12:00:21 am by Jarudin »

Offline Jarudin

  • Member
  • Posts: 6935
Re: Soft launching a new beta feature: descriptions v2
« Reply #17 on: November 26, 2015, 12:06:14 am »
E: tried the v2, it fails and just makes any image I set with sample, a dead image.
It worked fine with a single image, but nothing shows up in the lightbox.
I've been able to reproduce this exactly. I've fixed it.
(of course when I tested this I only tested with a single image  :whistle: )
« Last Edit: November 26, 2015, 12:08:02 am by Jarudin »

Offline Krudda

  • Member
  • Posts: 9872
  • 私は 日本語 が 上手 じゃ ありません
    • My Anime List
Re: Soft launching a new beta feature: descriptions v2
« Reply #18 on: November 26, 2015, 12:08:35 am »
E: tried the v2, it fails and just makes any image I set with sample, a dead image.
It worked fine with a single image, but nothing shows up in the lightbox.
I've been able to reproduce this exactly. I've fixed it.
(of course when I tested this I tested with a single image  :whistle: )
Thanks for the quick work! Much appreciated.

Trust me, I'm a random nobody.

Offline Jarudin

  • Member
  • Posts: 6935
Re: Soft launching a new beta feature: descriptions v2
« Reply #19 on: November 26, 2015, 12:30:41 am »
I can't seem to go back and forth anymore while viewing the screenshots, or close them, using FF 42.0.
The navigation works again, but it doesn't seem to want to show the buttons (you can click them though).
I'll save you the rant I posted in the staff channel >_> summary: jQuery sucks.

I'm going to write a proper gallery some time and not use a script I found on the Internet.