Anonymize Links

Started by M-DVD, August 12, 2007, 12:27:48 PM

Previous topic - Next topic

karlbenson

Hey Venice.

Modification Parse Error is not an issue with this mod, but with smf on your host.
Either PHP is running in safe_mod?
or your CHMOD permissions for the packages folder isnt 777.
or the CHMOD permissions for the files this mod alters have been changed since you installed the mod?

It was a bad idea to click uninstall after it gives you that error. It definately will not have uninstalled.
The only option is to manually install the mod.

Which is the opposite to Manual Installation of mods
Running the mod through the package parser may help you find all the bits you need to uninstall
http://modparser.dev.dansoftaustralia.net/

Alternatively download a copy of the mod, open the zip up and read the install.xml file.

venice

THanks Karl
Oh boy this looks like a headache - but I will have a look. Yes I think I maybe changed the CHMOD permissions at some point since I installed the mod. I did set everything back to 777 though before attempting uninstall.

That package parser is a nifty bit of kit - nice one! Hopefully it will help.

Thanks for your help
Venice

Richard Wing

Karl,

Can you let me know what files I need to look at to change all references of http://anonym.to to use a different domain in its place.

Thanks,
Richard Wing

karlbenson

In subs.php
$a = array(
1 => 'anonym.to',
2 => 'de-referer.com',
);


In Admin.template.php
                     0 => $txt['anonymizer_site_0'], // Random
1 => $txt['anonymizer_site_1'], // Anonym.to
2 => $txt['anonymizer_site_2'], // De-referer.com


And of course the language strings in the modification files.

$txt['anonymizer_site_0'] = 'Random';
$txt['anonymizer_site_1'] = 'Anonym.to';
$txt['anonymizer_site_2'] = 'De-Referer.com';


Theoretically rather than replace, you could use this information to add your own site.

But as I've indicated before, don't use a link on the same site. It makes this mod useless.

Richard Wing

Thanks Karl. I am stuck ...

In the subs I have added my site like this to the array...

3 => 'domain.com/cgi-bin/a/out.cgi',

The script I use requires the linking to happen like this...

bestdamnmembership.com/cgi-bin/a/out.cgi?http://www.outgoinglink.com

the issue I am having is that your script ads /?http://www.outgoinglink.com

Can you tell me how I would have the forward slash not added when option 3 is chosen as the anon service?

Thanks,
Richard Wing

karlbenson

You would have to customize the code to either put the /? in the first array I posted.

But I can't provide support for customizing/doing it.

karlbenson

I have reuploaded this mod and screenshots for it.

I am in the process of doing it for ALL my other mods aswell.  Please bear with me.

slackerpunk

hi karl,

any news if the new version now supports limiting the mod to just certain boards?

karlbenson

Hey SlackerPunk,

I indicated http://www.simplemachines.org/community/index.php?topic=188446.msg1319125#msg1319125
That I don't plan on adding per-board support for it.  Its just too much work.

Stirred

#89
Hello. First of all thanks for this mod, don´t have to write everytime the adress to anonym.to. lol

I checked my errors report and i'm gettings this error since i installed this mod:
Quotehttp://www.***/index.php?topic=15649.0
Aplicar Filtro: Mostrar apenas os erros com a mesma mensagem
2: strpos() [<a href='function.strpos'>function.strpos</a>]: Empty delimiter.
Ficheiro: ***/Sources/Subs.php
Linha: 4003

This happens when we open a topic that uses the mod. But the strange thing is that it happens only in some topics.

This is what i got on that line of Subs.php:
Quote// Use this bool to tell the function when to stop
         $cont = 1;
         
         // Don't anonymize email addresses
         if(strpos("@", $link)) -> THIS LINE IS 4003
         {
            unset($links[$id]);
            $cont = 0;
         }
         else
         {

Anyhelp would be helpful, since this errors appears but i don´t feel any serious problems.
Thanks!

Edit: I attached my Subs.php
- eighteen seconds before sunrise -

karlbenson

#90
This was fixed in one of the newer releases I believe.

CHANGE
         if(strpos("@", $link))
TO
         if(strpos($link,"@"))

Edit: I just checked and it is a bug in the latest version.

I'll try to put up a fixed version later
(and since i'm updating my mods for smf 2.0 beta 2 anyway, I might aswell try to do that at the same time)

Stirred

Thanks karlbenson!

I have just updated. If anything comes up, I'll return to report it. =)

Good luck on updating...
- eighteen seconds before sunrise -

slackerpunk


edi67

sound very useful let me try thx karl ;)
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

edi67

What means this Karl ?
Quoteo Anonymize YOUR Base/Subdomain links (Recommended ONLY if you do NOT own the domain)
- By default the mod do not anonymize the domain or subdomain which smf is running on.
- Turn this setting on to exclude all subdomains/base aswell
o Anonymize YOUR Servers IP links (Recommended if you do not own the domain or are on shared/free hosting)
- If users can access your forum via a dedicated IP, enable this setting to exclude YOUR servers IP links from being anonymized
> eg if your server ip was http://12.345.678.90 then any links with it in would be excluded from being anonymized

Means that selecting one of these options, if somebody post in another other site one ACTIVE link of my forum this will be anomyzed?

let me know thx
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

karlbenson

Enable those settings if you want your subdomain links anonymised.

So if your forum is yoursite.com
whether you want subdomain.yoursite.com to be anonymised or not.
This is useful if your running on a free domain/host.

au8ust


karlbenson

#97
Since some people asked for it on per-forum basis and I'm in a generous mood.
Heres how to do it in the code. However I won't be added this to the mod because in my opinion it compromises the functionality. You can't have anonymity in one forum. Its an all or nothing proposition.

And note this will prevent the mod installing via the package manager.  So if and when i post the new version, you'll have to manually uninstall.

in Sources/Subs.php
FIND

// Call the anonymize links function
if ($modSettings['anonymizer'])
$message = anonymize_links($message);


REPLACE (CHANGING 0, 1, 2, 3 to boards ids of forums you want to enable the mod for.)

// Call the anonymize links function
if ($modSettings['anonymizer'])
{
global $board;
if(!empty($board) && in_array($board, array(0,1,2,3)))
$message = anonymize_links($message);
}


If you wanted to do the opposite and disable the mod for certain board ids. Then put a ! (apostrophe) before the in_array bit.
Eg !in_array ...

Member

Great mod! Thanks!

But now I am looking for an opportunity to change it in a way that links in the users signatures were not anonymize.

That would be logical for all.

What I must change in Subs.php for it?

Help me please.

RoarinRow

Darn anything passed except for this:

Execute Modification     ./Themes/default/Admin.template.php     Test failed

Maybe I'll try to manually make the changes when there are less people online    :)

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Advertisement: