Advertisement:

Author Topic: ed2k links support  (Read 65702 times)

Offline FragaCampos

  • Sophist Member
  • *****
  • Posts: 1,294
  • Gender: Male
    • docsPT
Re: ed2k links support
« Reply #60 on: December 20, 2007, 08:58:45 AM »
Any chance of adding ed2k stats support from this page?
http://tothbenedek.hu/ed2kstats/

Offline tckbm

  • Semi-Newbie
  • *
  • Posts: 13
Re: ed2k links support
« Reply #61 on: March 31, 2008, 11:09:16 PM »
Any chance of adding ed2k stats support from this page?
http://tothbenedek.hu/ed2kstats/ [nofollow]

Is my doubt too!

Offline tckbm

  • Semi-Newbie
  • *
  • Posts: 13
Re: ed2k links support
« Reply #62 on: March 31, 2008, 11:15:22 PM »
Heres the code for PHPBB

can anyone migrate to smf?

Code: [Select]
<?php

/*

phpBB script for getting ed2k file/url list

It scans the phpbb database for ed2k links and if it finds one in a topic which can be read by an anonymous user it displays it.

Install:
Make sure you run phpBB version 2.0 or later
Simply copy the file to the phpbb root directory and rename it to listed2k.php

If you want your database to be present at the RB2M ed2k stats' "backlinking" database, please contact me!

more info and updates can be found at http://tothbenedek.hu/ed2kstats/

(c)2006 Benedek Toth
Licensed under GPL which can be found at http://www.gnu.org/licenses/gpl.txt

THERE IS ABSOLUTELY NO WARRANTY FOR THIS SCRIPT 
(...altough I find it hard to believe it can damage anything... in the worst case it will simply not work)
*/




/*

If you want to define a password to not let anyone access your database, uncomment the next line and change yourpass to your password! Accessing the file will be available at the url listed2k.php?pass=yourpass

If your file is linked to the RB2M ed2k stats service don't forget to notify me before(!!!) doing so, or your files will disappear from the database.

*/

//if ($HTTP_GET_VARS[pass]!='yourpass') die();


set_time_limit(300);

function 
plog ($log) {
print "#COMMENT\t$log\n";
}

plog("running  <pre>"); // for better HTML VIEW
define('IN_PHPBB'true);
$phpbb_root_path './';
include(
$phpbb_root_path 'extension.inc');
include(
$phpbb_root_path 'common.'.$phpEx);
if (
$board_config[server_port])
plog("phpbb init done and okay");
$porta $board_config[server_port]==80?"":":"$board_config[server_port];

$rooturl "http://" $board_config[server_name] . $porta $board_config[script_path];


$sql "SELECT count(*) FROM " POSTS_TEXT_TABLE " c , " POSTS_TABLE " d, " FORUMS_TABLE " f WHERE c.post_id=d.post_id and f.forum_id=d.forum_id and f.auth_read=0 and instr(c.post_text, 'ed2k://|file|')>0;";
if (!(
$result $db->sql_query($sql))) die("#FATAL_ERROR\t SQL problem");
//plog("sql ok: ".$sql);

if ($row $db->sql_fetchrow($result)) {
$lcount $row[0];
plog("sum posts: ".$lcount);
}

for (
$i=0;$i<=$lcount;$i+=100) {
plog("starting circle ".$i/100);

$sql "SELECT c.post_id, c.post_text FROM " POSTS_TEXT_TABLE " c , " POSTS_TABLE " d, " FORUMS_TABLE " f
WHERE c.post_id=d.post_id and f.forum_id=d.forum_id and f.auth_read=0 and instr(c.post_text, 'ed2k://|file|')>0
ORDER BY c.post_id DESC LIMIT 
$i,100;";
if (!($result $db->sql_query($sql))) die("#FATAL_ERROR\t SQL problem");
$rows = array();
while ($row $db->sql_fetchrow($result)) {
$url $rooturl.'viewtopic.' $phpEx '?'  POST_POST_URL '=' $row[0] . '#' $row[0];
$pt "nuku".strtolower($row[1]);
$ptt explode('ed2k://|file|'$pt);
$elso true;
while (list($k$v) = each($ptt)) {
if (!$elso) {
$hasht explode('|'$v);
$hash strtoupper($hasht[2]);
$hash substr($hash032);
if (strlen($hash)==32 and strspn($hash"0123456789ABCDEF")==32)
print $hash "\t" $url "\n";
}
$elso false;
}
}
}
$db->sql_freeresult($result);

plog("done");

?>

Offline Mindstorm

  • Semi-Newbie
  • *
  • Posts: 22
Re: ed2k links support
« Reply #63 on: June 01, 2008, 07:00:37 AM »
There is a mode which hides images from guests. Would it be posible to edit the php file so that it hides ed2k tags instead of img?
It's certainly possible and probably not that hard. As I've previously said my free time is running dangerously low, so I probably won't be doing it anytime soon.

My english is very bad, but i can say: THANKS  :D
You're welcome! :)

I have this error

if Enable URL filters is not active, the ed2k mod work, but if the Enable URL filters is active, ed2k not work. look the examples

Hello. I suppose you're refering to the prettyurls mod, right? I'm not sure why it doesn't work... I'll try and look at it when I can find the time.
« Last Edit: June 01, 2008, 07:02:57 AM by Mindstorm »

Offline Mindstorm

  • Semi-Newbie
  • *
  • Posts: 22
Re: ed2k links support
« Reply #64 on: June 01, 2008, 07:44:52 AM »
Any chance of adding ed2k stats support from this page?
http://tothbenedek.hu/ed2kstats/ [nofollow]

Any chance of adding ed2k stats support from this page?
http://tothbenedek.hu/ed2kstats/ [nofollow]

Is my doubt too!

Heres the code for PHPBB

can anyone migrate to smf?

I think I'm missing the purpose... That code prints a list of all links on the forum, right? What's it good for?

In any case, I'll probably reply with the standard line: this is supposed to be a minimal extension, and I don't have the time to create and maintain any others. I'm sorry!

Offline EkSeS

  • Semi-Newbie
  • *
  • Posts: 29
  • Gender: Male
    • VAYSIPA
Re: ed2k links support
« Reply #65 on: October 02, 2008, 11:16:25 PM »
Think about update to SMF 2.x ? when ?

Offline Mindstorm

  • Semi-Newbie
  • *
  • Posts: 22
Re: ed2k links support
« Reply #66 on: October 11, 2008, 08:05:25 AM »
I will update to 2.0 when it gets out of beta and I update my forums. I'm sorry, but I don't have the time to go look at it "just for fun".

Offline Dukessa

  • Newbie
  • *
  • Posts: 2
Re: ed2k links support
« Reply #67 on: October 27, 2008, 01:00:03 PM »
I have SMF 1.1.6.
The mod works flawlessly, but Id need your help with something please!

The problem is that sometimes there are spaces in ed2k link names...

Example:

ed2k://|file|[some%20file%20with%20spaces.rar|101996469|FF7D18024C4C61716F2188568DECA73C|/

The result is:

some%20file%20with%20spaces.rar  >:(

So i would like to take off %20 from the name, cose its ugly, and put spaces there instead, but in the link %20 MUST stay (otherwise link doesnt work).

How I want it:

some file with spaces.rar   :)
(and the link is= ed2k://|file|[some%20file%20with%20spaces.rar|101996469|FF7D18024C4C61716F2188568DECA73C|/)

I tried to use:
Code: [Select]
$message=str_replace("%20"," ",$message);It works with the name, %20 are gone...but the links are broken now because it put a space there too, so its not ok.
I was wondering if maybe there is an "if" to add to the function link_from_a_ed2k ($m)....?
Im not an expert at php...so Im just guessing...

Anyone?

Offline EkSeS

  • Semi-Newbie
  • *
  • Posts: 29
  • Gender: Male
    • VAYSIPA
Re: ed2k links support
« Reply #68 on: February 06, 2009, 10:31:55 AM »
Hi
I will update to 2.0 when it gets out of beta and I update my forums. I'm sorry, but I don't have the time to go look at it "just for fun".

SMF 2.0 RC1 is released ;)

I'm waiting for update ... thx ;)

Offline FragaCampos

  • Sophist Member
  • *****
  • Posts: 1,294
  • Gender: Male
    • docsPT
Re: ed2k links support
« Reply #69 on: February 10, 2009, 09:11:13 PM »
Is it doable to somehow show the number of hits of an edk2?

Offline FragaCampos

  • Sophist Member
  • *****
  • Posts: 1,294
  • Gender: Male
    • docsPT
Re: ed2k links support
« Reply #70 on: May 26, 2009, 12:56:34 PM »
Bump  O:)

Offline davidhs

  • Sr. Member
  • ****
  • Posts: 996
  • Gender: Male
Re: ed2k links support
« Reply #71 on: October 24, 2011, 04:29:34 PM »
In attachment file I add support for SMF 2.0.* (code is equal to 1.1.*).

Offline zorer

  • Semi-Newbie
  • *
  • Posts: 14
Re: ed2k links support
« Reply #72 on: April 13, 2013, 10:36:03 AM »
Hi! i installed the elink mod attached in smf 2.0.4 but i have problems displaying the emule gif.

I don't get problems in the preview, but after the post the url redirects to /forum/index.php/ed2k/emule.gif and the original file it's in /forum/ed2k/emule.gif

How i can fix it?

Thanks!

Offline FragaCampos

  • Sophist Member
  • *****
  • Posts: 1,294
  • Gender: Male
    • docsPT
Re: ed2k links support
« Reply #73 on: April 13, 2013, 02:07:57 PM »
I don't know why, but I had the same problem and fixed it this way:

In Subs.php search src="./ed2k/emule.gif" and substitute the link by an external link, from imageshack or imgur, for example.

Offline davidhs

  • Sr. Member
  • ****
  • Posts: 996
  • Gender: Male
Re: ed2k links support
« Reply #74 on: April 20, 2013, 09:45:04 AM »
I use this MOD and works fine when I want see eLinks with icon-style but if I write more than one eLink on BBC code
Quote
Code: [Select]
ed2k://|file|file_name1.ext|123456789|123456789ABCDEFG123456789ABCDEFG|/
ed2k://|file|file_name2.ext|123456789|123456789ABCDEFG123456789ABCDEFG|/
<a href="ed2k://|file|file_name3.ext|123456789|123456789ABCDEFG123456789ABCDEFG|/">file_name3.ext</a>
I want see source code but this MOD converts the second and next elinks to icon-style.

I think this is an error. Can you correct this?

Offline Asier

  • Semi-Newbie
  • *
  • Posts: 19
  • Gender: Male
    • Tus Proyectos
Re: ed2k links support
« Reply #75 on: November 02, 2014, 06:15:08 PM »
I try this mod and works fine when I use editor in code mode, but when I use WYSIWYG the code changes and doesn't work any more.

For this code:

Code: [Select]
ed2k://|file|file_name1.ext|123456789|123456789ABCDEFG123456789ABCDEFG|/
ed2k://|file|file_name2.ext|123456789|123456789ABCDEFG123456789ABCDEFG|/
<a href="ed2k://|file|file_name3.ext|123456789|123456789ABCDEFG123456789ABCDEFG|/">file_name3.ext</a>

And I clik preview. The code changes to this other:
Code: [Select]
[img alt=ed2k:]http://foro.tusproyectos.net/./ed2kfile/donkey.gif[/img] [url=http://foro.tusproyectos.net/ed2k://|file|file_name1.ext|123456789|123456789ABCDEFG123456789ABCDEFG|/]file_name1.ext[/url] (117.74 MiB)
[img alt=ed2k:]http://foro.tusproyectos.net/./ed2kfile/donkey.gif[/img] [url=http://foro.tusproyectos.net/ed2k://|file|file_name2.ext|123456789|123456789ABCDEFG123456789ABCDEFG|/]file_name2.ext[/url] (117.74 MiB)
<a href="ed2k://|file|file_name3.ext|123456789|123456789ABCDEFG123456789ABCDEFG|/">file_name3.ext

Can you helpme?

Thanks ;)
« Last Edit: November 02, 2014, 06:40:00 PM by Asier »
Dicen que la fe mueve montaƱas, apuesto que la ciencia lo consigue en menos tiempo.
[nofollow]