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.


Reply
 
LinkBack Thread Tools Display Modes
Old 06-22-2010, 10:49 AM   #1 (permalink)
Junior Member
 
Join Date: Jun 2010
Posts: 3
stachi is on a distinguished road
Default Help with a Plugin

I need a plugin that do this replacemant:

Replace this
Code:
javascript:page('any_number','userpage.php')
with that
Code:
http://any_url/htm/userpage.php?user=the_number
Maybe someone can help me.
stachi is offline
Country: Germany
 
Reply With Quote
Old 06-22-2010, 11:44 AM   #2 (permalink)
Moderator
 
04blatca's Avatar
 
Join Date: May 2010
Location: United Kingdom
Posts: 212
04blatca is a splendid one to behold04blatca is a splendid one to behold04blatca is a splendid one to behold04blatca is a splendid one to behold04blatca is a splendid one to behold04blatca is a splendid one to behold04blatca is a splendid one to behold04blatca is a splendid one to behold
Send a message via MSN to 04blatca Send a message via Skype™ to 04blatca
Default

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.
04blatca is offline
Country: United Kingdom
 
Reply With Quote
Old 06-22-2010, 12:09 PM   #3 (permalink)
Junior Member
 
Join Date: Jun 2010
Posts: 3
stachi is on a distinguished road
Default

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">
        &nbsp;<a class="weiss" href="javascript:page('383278','userpage.php')">
        Eisbaer61</a> (m,49)</td>
        </tr>
            <tr>
        <td class="menu2">
        &nbsp;<a class="weiss" href="javascript:page('383277','userpage.php')">
        Ich.liebe.M...</a> (w,12)</td>
        </tr>
            <tr>
        <td class="menu2">
        &nbsp;<a class="weiss" href="javascript:page('383276','userpage.php')">
        Pyrania</a> (w,21)</td>
        </tr>
            <tr>
        <td class="menu2">
        &nbsp;<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.
stachi is offline
Country: Germany
 
Reply With Quote
Old 06-22-2010, 12:29 PM   #4 (permalink)
Moderator
 
04blatca's Avatar
 
Join Date: May 2010
Location: United Kingdom
Posts: 212
04blatca is a splendid one to behold04blatca is a splendid one to behold04blatca is a splendid one to behold04blatca is a splendid one to behold04blatca is a splendid one to behold04blatca is a splendid one to behold04blatca is a splendid one to behold04blatca is a splendid one to behold
Send a message via MSN to 04blatca Send a message via Skype™ to 04blatca
Default

Originally Posted by stachi View Post
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">
        &nbsp;<a class="weiss" href="javascript:page('383278','userpage.php')">
        Eisbaer61</a> (m,49)</td>
        </tr>
            <tr>
        <td class="menu2">
        &nbsp;<a class="weiss" href="javascript:page('383277','userpage.php')">
        Ich.liebe.M...</a> (w,12)</td>
        </tr>
            <tr>
        <td class="menu2">
        &nbsp;<a class="weiss" href="javascript:page('383276','userpage.php')">
        Pyrania</a> (w,21)</td>
        </tr>
            <tr>
        <td class="menu2">
        &nbsp;<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 View Post
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 View Post
Sorry for my bad English.
Your english is very good
04blatca is offline
Country: United Kingdom
 
Reply With Quote
Old 06-22-2010, 01:13 PM   #5 (permalink)
Junior Member
 
Join Date: Jun 2010
Posts: 3
stachi is on a distinguished road
Default

Originally Posted by 04blatca View Post
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;
}
stachi is offline
Country: Germany
 
Reply With Quote
Old 06-23-2010, 06:34 AM   #6 (permalink)
Junior Member
 
Join Date: May 2009
Posts: 25
Lisa
Default

Originally Posted by stachi View Post
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?
Lisa is offline
Country: India
 
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 01:34 AM.
© 2006-2010 Glype. All Rights Reserved.