Anonymize Links

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

Previous topic - Next topic

Sabre™

@ xxxbbs site
You should read these 2 documents
How do I ask support questions the smart way?
How can I get my problems solved faster?

An RC3 version is attached.
There are now 11 sites to choose/randomize
Will remove upon request from author and/or staff.
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


madman71

#181
sabre,

With your copy of the mod, I got 2 failures in the subs.php

Should i just manually edit that file?

I went ahead and let the package manager install it for me (with the errors) then i used your code found here:

http://www.simplemachines.org/community/index.php?topic=188446.msg2389762#msg2389762

As of now, it seems to be working fine on 2.0 RC3 :)

Sabre™

I forgot all about those edits lol
You should never install a package if it throws up errors, even if somebody says to do so, then edit your template later.
What if they find a bug in that version, and you need to update?
You'd have to manually uninstall it. Headache time.
What I do is see what conflicts the install is having, then alter the package to install around the conflict, that way I can install and uninstall it anytime I like.
Anyho, with an un-official updated package, you can put it through a Package Parser to get ALL the edits you need.
Upload the package to the parser, then look at the edits for subs.php and make sure all 3 are inserted.
It may be working fine now, but missing code 'will' have an effect one time or another. It is best to squash them immediately, or before they occur.
Good luck buddy, and if you ever need assistance, never hesitate to ask for it :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


mariusfv

I have SMF 1.1.11 the problem is only this(in subs.php):

I must replace this :


$data = preg_replace(array('~(?<=[\s>\.(;\'"]|^)((?:http|https|ftp|ftps)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\'\\\\]*|[\(\{][\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i', '~(?<=[\s>(\'<]|^)(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\'\\\\]*|[\(\{][\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i'), array('[url]$1[/url]', '[url=http://$1]$1[/url]'), $data);



with this:


$data = preg_replace(array('~(?<=[\s>\.(;\'"\]]|^)((?:http|https|ftp|ftps)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\'\\\\]*|[\(\{][\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i', '~(?<=[\s>(\'<\]]|^)(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\'\\\\]*|[\(\{][\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i'), array('[url]$1[/url]', '[url=http://$1]$1[/url]'), $data);


but all i find is that :
$data = preg_replace(array(\'~^(.+?)&lt;\?.{0,40}?php(&nbsp;|\s)~\', \'~\?&gt;((?:</(font|span)>)*)$~\'), \'$1\', $data, 2);

So i don't have first part of code....can someone help me please ?

I read on anonym.to that :
You only have to place the resulting code at the end of the body area (if possible, directly before the </body> tag) of your main template:
<script src="http://js.anonym.to/anonym/anonymize.js" type="text/javascript"></script>

<script type="text/javascript"><!--
protected_links = "";


this code do the job what the mod do ...but in what file i must put that ?
little help please !

10x in advance !



madman71

Quote from: mariusfv on May 23, 2010, 11:40:37 AM
I have SMF 1.1.11 the problem is only this(in subs.php):

I must replace this :



Is this the same code that you posted? if not, use this code:

http://www.simplemachines.org/community/index.php?topic=188446.msg2389762#msg2389762
$data = preg_replace(array('~(?<=[\s>\.(;\'"]|^)((?:http|https|ftp|ftps)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\'\\\\]*|[\(\{][\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i', '~(?<=[\s>(\'<]|^)(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\'\\\\]*|[\(\{][\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i'), array('[url]$1[/url]', '[url=http://$1]$1[/url]'), $data);



with this:


$data = preg_replace(array('~(?<=[\s>\.(;\'"\]]|^)((?:http|https|ftp|ftps)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\'\\\\]*|[\(\{][\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i', '~(?<=[\s>(\'<\]]|^)(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\'\\\\]*|[\(\{][\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i'), array('[url]$1[/url]', '[url=http://$1]$1[/url]'), $data);


but all i find is that :
$data = preg_replace(array(\'~^(.+?)&lt;\?.{0,40}?php(&nbsp;|\s)~\', \'~\?&gt;((?:</(font|span)>)*)$~\'), \'$1\', $data, 2);

So i don't have first part of code....can someone help me please ?

I read on anonym.to that :
You only have to place the resulting code at the end of the body area (if possible, directly before the </body> tag) of your main template:
<script src="http://js.anonym.to/anonym/anonymize.js" type="text/javascript"></script>

<script type="text/javascript"><!--
protected_links = "";


this code do the job what the mod do ...but in what file i must put that ?
little help please !

10x in advance !




mariusfv

you just quote...and no answer  ;D

madman71


mariusfv

I read all the topic...that don't help me...i don't have that part of code...maybe due the fact i have installed others mods what modify my code...

So my help will be to use that code :

<script src="http://js.anonym.to/anonym/anonymize.js" type="text/javascript"></script>

<script type="text/javascript"><!--
protected_links = "";


from anonym.to   but i don't know where i must to put this code ... i find this topic :

http://www.simplemachines.org/community/index.php?topic=251138.0

is in spanish language ...i translate with google translate ...i understand i must to put in index.template.php but i don't know where because i didn't find:
</ Div>
</body>

can you help me please ? ....this code do the job ...and don't need the mod...


madman71

sorry mate. Im not sure. Hopefully someone can help ya

Sabre™

Add it before your </body> tag, if that doesn't work, try before </head>(I think this may be the appropriate place)
This thread is not here to support your random code, so if you need more assistance, please ask in the thread you pointed to, or create your own.
Best of luck :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


- danny

I went ahead and installed the mod, which works, but I have an issue.

First off, I had to make the edit previously mentioned in this thread:

// Only do this if the preg survives.
if (is_string($result = preg_replace(array(
'~(?<=[\s>\.(;\'"]|^)((?:http|https|ftp|ftps)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i',
'~(?<=[\s>(\'<]|^)(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i'
), array(
'[url]$1[/url]',
'[url=http://$1]$1[/url]'
), $data)))
$data = $result;


Replace it with:

                  // Only do this if the preg survives.
                  if (is_string($result = preg_replace(array(
                     '~(?<=[\s>\.(;\'"\]]|^)((?:http|https|ftp|ftps)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i',
                     '~(?<=[\s>(\'<\]]|^)(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i'
                  ), array(
                     '[url]$1[/url]',
                     '[url=http://$1]$1[/url]'
                  ), $data)))
                     $data = $result;


But I also had an issue with the modification to Admin.template.php, which I still can't resolve.

I currently have the following issue in Posts and Topics>Post Settings (see attached image). I can't select anything from the drop down menu.

Any clue why this is?

madman71

i have the same issue as above.
Can not select which referer to use.


using 1.1.11

SONSiVRi

I solved that "cannot select" issue before, and I would have posted it somewhere here. Its HTML problem.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

madman71

thanks, SonsiVRi

I now see your link: http://www.simplemachines.org/community/index.php?topic=188446.msg1648409#msg1648409

but im unable to find the code you pointed out.

CAn anyone see the code he/she pointed out in my admin temp?
see attached

SONSiVRi

"madman71"
My code is written for another version of this mod. I checked your file and I saw combolist content are populated by $txt['anonymizer_setup_opti']. It was hardcoded before, and now assigned to some variable. You need to trace where this variable gets its value and locate why your list becomes empty.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

madman71

thanks for looking, Sonsivri :)

THE BRA1N

Quote from: Sabre™ on May 19, 2010, 12:06:01 AM
An RC3 version is attached.
There are now 11 sites to choose/randomize
Will remove upon request from author and/or staff.

Thank you for that. Installed and working flawlessly.

trubbeller

Can confirm, that the package I build for 1.1.11 is working after an upgrade to SMF 1.1.12. Someone said that the package (uploaded 2 or 3 pages ago) is broken so here it is again. Also installing and uninstalling it in 1.1.12 works flawlessly for me.

donw9876

Quote from: Sabre™ on May 19, 2010, 12:06:01 AM
An RC3 version is attached.
There are now 11 sites to choose/randomize

Greetings,

I installed the RC3 version (into what I just sheepishly noticed is SMF 2.0 RC4  :( ) and while it says it installed correctly, it simply does nothing. No URLs are modified. The settings are all shown in the "Manage Posts and Settings"/"Post Topics" screen.

And, yup, I've got the following settings: Enable anonymizer; choose what to anonymize (all links); other settings (for the same board's URL, etc, inclusion/exclusion) are empty.

Sabre™

It shouldn't have installed into rc4 without error, as the regex has changed in rc4, hence the reason why that package does not work.
I'm sure somebody will update it soon, but I suggest you uninstall the package, and check that all your templates are indeed updated to rc4 by using the update package.
If it's a fresh install of rc4 and not an updated version, then I don't know what's going on there.

Good luck :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Advertisement: