| Plugins Plugins can make site-specific changes to the proxy's behavior and parsing mechanisms. You can use plugins to overcome limitations of the base proxy script. |
06-22-2010, 10:49 AM
|
#1 (permalink)
|
|
Junior Member
Join Date: Jun 2010
Posts: 3
|
Help with a Plugin
I need a plugin that do this replacemant:
Replace this
|
Code:
|
javascript:page('any_number','userpage.php') |
with that
Maybe someone can help me.
|
Country: Germany
|
|
|
06-22-2010, 11:44 AM
|
#2 (permalink)
|
|
Moderator
Join Date: May 2010
Location: United Kingdom
Posts: 212
|
Save this as 'domain.php' changing domain to the domain you want this plugin to be used on, and try it out (I haven't tested it):
|
Code:
|
<?php
function preParse($input, $type) {
switch ( $type ) {
case 'html':
$input = str_replace('javascript:page(\'any_number\',\'userpage.php\')', 'http://any_url/htm/userpage.php?user=the_number', $input);
break;
}
// Return changed
return $input;
}
?> |
Last edited by 04blatca; 06-22-2010 at 12:01 PM.
|
Country: United Kingdom
|
|
|
06-22-2010, 12:09 PM
|
#3 (permalink)
|
|
Junior Member
Join Date: Jun 2010
Posts: 3
|
It think it is not so easy. Here is an example:
I have this links
|
Code:
|
<a class="weiss" href="javascript:page('383280','userpage.php')">
zoey14</a> (w,11)</td>
</tr>
<tr>
<td class="menu2">
<a class="weiss" href="javascript:page('383278','userpage.php')">
Eisbaer61</a> (m,49)</td>
</tr>
<tr>
<td class="menu2">
<a class="weiss" href="javascript:page('383277','userpage.php')">
Ich.liebe.M...</a> (w,12)</td>
</tr>
<tr>
<td class="menu2">
<a class="weiss" href="javascript:page('383276','userpage.php')">
Pyrania</a> (w,21)</td>
</tr>
<tr>
<td class="menu2">
<a class="weiss" href="javascript:page('383275','userpage.php')">
black-blood</a> (w,24)</td> |
glype just removes this links.
But each
|
Code:
|
javascript:page('the_right_id','userpage.php') |
has to be replaced with
|
Code:
|
http://www.url/htm/userpage.php?user=the_right_id |
The id numbers will change on every visit.
Sorry for my bad English.
|
Country: Germany
|
|
|
06-22-2010, 12:29 PM
|
#4 (permalink)
|
|
Moderator
Join Date: May 2010
Location: United Kingdom
Posts: 212
|
Originally Posted by stachi
|
It think it is not so easy. Here is an example:
I have this links
|
Code:
|
<a class="weiss" href="javascript:page('383280','userpage.php')">
zoey14</a> (w,11)</td>
</tr>
<tr>
<td class="menu2">
<a class="weiss" href="javascript:page('383278','userpage.php')">
Eisbaer61</a> (m,49)</td>
</tr>
<tr>
<td class="menu2">
<a class="weiss" href="javascript:page('383277','userpage.php')">
Ich.liebe.M...</a> (w,12)</td>
</tr>
<tr>
<td class="menu2">
<a class="weiss" href="javascript:page('383276','userpage.php')">
Pyrania</a> (w,21)</td>
</tr>
<tr>
<td class="menu2">
<a class="weiss" href="javascript:page('383275','userpage.php')">
black-blood</a> (w,24)</td> |
glype just removes this links.
|
Glype should replace the links with the link you gave in the second part of the str_replace of that plugin.
Originally Posted by stachi
|
But each
|
Code:
|
javascript:page('the_right_id','userpage.php') |
has to be replaced with
|
Code:
|
http://www.url/htm/userpage.php?user=the_right_id |
The id numbers will change on every visit.
|
I agree, that will be much harder....
How are the numbers generated as they would need to be integrated into the plugin...
Originally Posted by stachi
|
|
Sorry for my bad English.
|
Your english is very good
|
Country: United Kingdom
|
|
|
06-22-2010, 01:13 PM
|
#5 (permalink)
|
|
Junior Member
Join Date: Jun 2010
Posts: 3
|
Originally Posted by 04blatca
|
Your english is very good
|
Thank you
I've found a solution for my problem.
Here is my Plugin:
|
Code:
|
function preParse($input, $type){
switch ( $type ){
case 'html':
$input = preg_replace('/(javascript\:page\(\')/','http://url/htm/userpage.php?user=', $input);
$input = preg_replace('/\',\'userpage\.php\'\)/','', $input);
break;
}
return $input;
} |
|
Country: Germany
|
|
|
06-23-2010, 06:34 AM
|
#6 (permalink)
|
|
Junior Member
Join Date: May 2009
Posts: 25
|
Originally Posted by stachi
|
Thank you
I've found a solution for my problem.
Here is my Plugin:
|
Code:
|
function preParse($input, $type){
switch ( $type ){
case 'html':
$input = preg_replace('/(javascript\:page\(\')/','http://url/htm/userpage.php?user=', $input);
$input = preg_replace('/\',\'userpage\.php\'\)/','', $input);
break;
}
return $input;
} |
|
what does it do?
|
Country: India
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:34 AM.
© 2006-2010 Glype. All Rights Reserved.
|
|