ed2k links support (with bb-codes)

Started by tFF, April 05, 2007, 07:28:10 AM

Previous topic - Next topic

tFF

Link to Mod

This mod adds support for ed2k (plain and AICH).

examples are:

1. just a link in bb-codes
[ed2k]ed2k://|file|fakes.rar|1548921|6A11535BC5A77F6DE0CC47EABE9AFF83|/[/ed2k]

2. a link with a description
[ed2k=ed2k://|file|fakes.rar|1548921|6A11535BC5A77F6DE0CC47EABE9AFF83|/]worth downloading[/ed2k]

3. simply a link
ed2k://|file|fakes.rar|1548921|6A11535BC5A77F6DE0CC47EABE9AFF83|/


This mod renders ed2k-links as hyper-text links with an emule icon placed before them. Ed2k-links behave the same way like usual http-links (i.e. ed2k-links may be decorated with/or without bb-codes, with/or without equal sign in bb-code (see examples above)). Also the mod adds a new editor button.


PS Concerning some quiestions asked: This mod is a new one and is not an add-on to mindstorm's one. You better choose one or another. Switching mods shouldn't affect your content and this would be absolutely transparent (this mod is backwards compatible).


Thanks to mindstorm for the regexp and emule icon.


Changes:
---------

v3.1.1 by tFF (13 Dec, 2007)
* SMF 1.1.4 (FRESH) and SMF 1.1.4 (UPG) mod's installer compatibility fix
  ps: SMF 1.1.4 fresh installation differs from SMF 1.1.4 upgraded from previous version. That's why the mod
      could be successfully installed on upgraded version, but failed on fresh installation. Subs.php files
      differ in the mentioned versions. This compatibility fix works great with SMF 1.1.4 fresh installation
      and upgraded from previous version (and also with all 1.1.x versions upgraded or fresh).

v3.1.0 by tFF (28 Nov, 2007)
+ human readable size of eDonkey-files (hover your mouse over an eMule icon to see the size)
  ps: the Size was 'hidden' under the eMule icon because it is no more than for informational
      purposes and shouldn't ruin (interfere with) an author's original formatting.

v3.0.1 by tFF (7 Mar, 2007)
* 'descriptive links' (example 2) were not rendered properly for printing

v3.0 by tFF (version number chronology was preserved)
+ added new bb-codes
- removed "ed2kfile" directory
* emule icon was moved to "themes/default/images/bbc"
+ added new editor button

v2.4 by mindstorm (here)
- just taken as example for rewriting from scratch




issues to investigate:
So it goes...

drazprod

very good mod.

The pando and bittorent protocol can are introduce in this mod ...

Sorry for my english.

indos

SMF 1.1.4
------------------
<<<< Se vende 1500 visitas por dia (Ver mas info en el sitio)

Jmecca2


Mindstorm

#4
Hello there. Good work and thanks for the credit! I'd ask you however to also credit Simmiyy, who wrote the icon thingy and part of the handling regexp.

I'd also sugest you chose a different name, having two similar mods with the same name can cause a lot of confusion.

iacomac

Fine mod, but it works only if I use the tags [ed2k][/ed2k]. But no, is not a problem. Another bug (bug?): in the name I can't see the spaces. An example:

[icon] This is an example
i see:
[icon] Thisisanexample

Anyway we can use the "." or "_": This.is.an.example or This_is_an_example.

At last: can we see the file dimension? [icon] filename [XXmb]



sorry for my bad english

Cheers,
iacomac
My english teacher has committed suicide in despair, forgive my english...

FragaCampos

This mod would be perfect with file size display. I had to change to mindstorm's because of that :(

tFF

Quote from: iacomac on August 24, 2007, 04:12:47 PM
Another bug (bug?): in the name I can't see the spaces. An example:

[icon] This is an example
i see:
[icon] Thisisanexample

Anyway we can use the "." or "_": This.is.an.example or This_is_an_example.
What spaces and where do you mean? in the original filename? Can you PM me a link that reveals the 'bug'.
PS I do really trim spaces and other unusual stuff as well... Let me see the link first.
So it goes...

tFF

#8
Quote from: FragaCampos on November 27, 2007, 12:31:38 PM
This mod would be perfect with file size display. I had to change to mindstorm's because of that :(

mod was updated:
v3.1.0
added human readable size of eDonkey-files (hover your mouse over an eMule icon to see the size).
The Size was 'hidden' under the eMule icon because it is no more than for informational purposes and shouldn't ruin (interfere with) an author's original formatting.

I was not going to put the size after a filename or anywhere else in a text, coz i really don't need it always there. Size is only for info and nothing more. Also i've never needed it and even now. The mod was meant to render ugly emule-links and make them customizable thru bbcodes. Any other info can be seen in any ed2k-client (to say more ed2k gives enough time to explore file's details while waiting in a queue). :) Btw, the mod will not show size figures in a printed version (guess, additional size info would not make things clearer with full ed2k-links (with those brackets and pipes and other stuff) already there).

That's my humble opinion.

Anyway, here you are. Catching up the requests.
So it goes...

FragaCampos

Thanks a lot tFF  for your time and will to help :D
Changing again to you mod  8)

Take care!

ディン1031

#10
Somehow, the new version could not installed on a fresh and new installed smf :x.
Each time a parse error in Subs.php occur. (I only would like to test a compatible thing to my hide tag special mod, because someone told me there is a bug in my mod with this :x or think that it have something to do with the mod, but it's difficult to test if i can't install it ;D .oO(okay i'm only lazy, because i can install it also but i think you should know it ;P)).

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

tFF

#11
It appears to be that there were 3 spaces deleted in new Subs.php (1.1.4) but these spaces remained untouched in old Subs.php after an upgrade to 1.1.4. So there are two legitimate fragments with and without spaces. Take a look:


And my mod relied on this fragment.
I've fixed it already, but i have to re-chek it now with previous 1.1.x versions. So i'll upload it later.
So it goes...

tFF

#12
Mod was updated:
v3.1.1
  * SMF 1.1.4 (FRESH) and SMF 1.1.4 (UPG) mod's installer compatibility fix
  ps: SMF 1.1.4 fresh installation differs from SMF 1.1.4 upgraded from previous version. That's why the mod
      could be successfully installed on upgraded version, but failed on fresh installation. Subs.php files
      differ in the mentioned versions. This compatibility fix works great with SMF 1.1.4 fresh installation
      and upgraded from previous version (and also with all 1.1.x versions upgraded or fresh).


Once again. There are two legitimate Subs.php which differ in one fragment (or even more). One Subs.php you get when you install SMF from scratch and another one when you upgrade from previous version. So, my mod could be successfully installed on an upgraded SMF version, but failed to install on fresh SMF installation.
So here is a compatibility fix which works great with all of SMFs either fresh or upgraded. Moreover i've re-checked it once again with all 1.1.x versions of SMF (1.1.1 thru 1.1.4). It works great with all these versions no matter either they are fresh or upgraded.


Quote from: ディン1031 on December 11, 2007, 03:06:35 AM
Somehow, the new version could not installed on a fresh and new installed smf :x.
Thank you for the comment.
So it goes...

allumius

I have one problem

if i past this elink
ed2k://|file|Cuento%20de%20navidad%20(pelicula,%20no%20dibujos!)-Muchas%20Gracias%20Mr.%20Scrooge.avi|1472454656|0DE7720812AFE4A85DF253E055C621FC|/

the link in the post is
QuoteCuento%20de%20navidad%20(pelicula,%20no%20dibujos!)-Muchas%20Gracias%20Mr.%20Scrooge.avi

But the real title is
QuoteCuento de navidad (pelicula, no dibujos!)-Muchas Gracias Mr. Scrooge.avi

Why is %20 and not  (white space)?

tFF

#14
Quote from: allumius on December 13, 2007, 10:53:37 AM
Why is %20 and not  (white space)?
Links shouldn't have spaces in them... So all spaces get substituted by space's character code.
code for [space] = 32 decimal = 20 hexadecimal
%20 means its hexadecimal representation in html notation.

This is true not only for ed2k-links but for other links as well. Those %20 and other encoded symbols should be automatically decoded by related software (browser, ed2k-client etc.).

To solve your prob you can use the second format of ed2k-bbcode
Quote2. a link with a description
[ed2k=ed2k://|file|fakes.rar|1548921|6A11535BC5A77F6DE0CC47EABE9AFF83|/]worth downloading[/ed2k]
instead of "worth downloading" u can write whatever you want, even your filename without %20's.

PS You have all the flexibility in decoration with bb-codes. Just use your imagination to get what you want.
So it goes...

allumius

#15
But if you have this elinks?
ed2k://|file|Pocoyo%201x01%20Musica%20Maestro%20[DVDrip]%20[TusSeries.com].avi|64286720|4D79DE0B2C7F7120DBD2CEA079EA788F|/

The 2º option not work!!

And you can add this other options to mod?

QuoteAdds support for ed2k links in <a href> tags

tFF

#16
Quote from: allumius on December 14, 2007, 06:14:46 AM
And you can add this other options to mod?
QuoteAdds support for ed2k links in <a href> tags
You don't need any mod for it. You just need an html-enabled forum.

Quote from: allumius on December 14, 2007, 06:14:46 AM
The 2º option not work!!
That's because you are not attentive enough!!!

Don't you see that the bb-code ends with ']' and your link breaks at first ']'??? Edit the filename and remove all [DVDrip] and [TusSeries.com] from it. Don't worry 'coz different filenames make no big sense for edonkey...
You'll get this for instance
[ed2k=ed2k://|file|Pocoyo%201x01%20Musica%20Maestro.avi|64286720|4D79DE0B2C7F7120DBD2CEA079EA788F|/]Pocoyo 1x01 Musica Maestro[/ed2k]

PS
This topic is for support, not for teaching
So it goes...

Darknico

Italian SMF - Supporto Italiano per la board SMF - Ci trovate tutti li!! :)


tFF

#18
Quote from: Darknico on January 11, 2008, 09:39:14 PM
It is possibile to have the stats by http://tothbenedek.hu/ed2kstats ??
Maybe... I have no time for it now. I've read the page for developers there. Everything must be easy enough.
But my opinion is: if you know how to get stats then go and get it. Stats, IMHO, has nothing to do with the mod, there is not only this service providing such information and linking with this service may make the mod unstable and dependent on this service's quality. Imagine that some day the service stops responding to outer request thus making your whole forum unstable thru the mod (even with AJAX-based requests). So, my opinion is: any mod should provide reasonable functions, every extra functions leads to either junk in a database (i.e. various settings for tuning extra services) or instability of a forum itself.
So, I'll think twice before implementing such features even if I have time for scripting.
So it goes...

Darknico

Italian SMF - Supporto Italiano per la board SMF - Ci trovate tutti li!! :)


Advertisement: