Welcome, Guest. Please login or register.

Author Topic: Experimental IBrowse proxy for amiga.org  (Read 31653 times)

Description:

0 Members and 2 Guests are viewing this topic.

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Experimental IBrowse proxy for amiga.org
« Reply #14 on: April 29, 2010, 09:14:52 AM »
A500 surfing, FTW :)
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Experimental IBrowse proxy for amiga.org
« Reply #15 on: April 29, 2010, 09:16:51 AM »
One thing that is pretty clear from looking at it is that some adaptations could be made for low resolution / low colour scenarios.

I'll have to think about that when I get time. The user profile view needs fixing still, it's totally borked compared to the regular CSS version.
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Experimental IBrowse proxy for amiga.org
« Reply #16 on: May 07, 2010, 02:24:47 PM »
Quote from: Cammy;542772
I hope you don't mind me asking, but would it be possible to make the Quick Reply box show up so we don't need to load an extra page to reply? It's not a big deal, but it might help speed things up a little when posting.


Well, I couldn't get the "proper" quick reply function (that uses the text entry box at the bottom of the page) to work, but I have reworked it such that it works as a normal "reply with quote", rather like the old forum.
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Experimental IBrowse proxy for amiga.org
« Reply #17 on: May 14, 2010, 12:18:17 AM »
After a long time away from this wee project, I finally got around to doing some work on the links section. Not finished, but it is slightly tidier. Not all of the popup menu -> option list type transformations are done yet, nor has the submit page been tested.

However, you can at least browse the links section now without getting this :lol:
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Experimental IBrowse proxy for amiga.org
« Reply #18 on: May 16, 2010, 03:05:12 PM »
I've finally gotten around to fixing a few issues, particularly several of those stubborn bits of layout that thanks to the lack of inherited CSS properties were showing the wrong colour font (black) when used on a dark background.

The regex involved is a bit lairy and I managed to get a few PCRE errors along the way. They should be stomped now, but if anybody encounters one, please let me know.

I've also added an experimental "small width" mode that tries to reduce the screen width requirements. This is primarily aimed at people using ibrowse/aweb on native modes. This reduces the banner size and rearranges the navigation option lists that the proxy puts in place of some of the original popup navigation menus into a second strip underneath the main navigation (see attached image).

To test this, use the following link
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Experimental IBrowse proxy for amiga.org
« Reply #19 on: January 12, 2011, 05:42:47 PM »
Hi,

Looking into it now.

-edit-

All the files, directories and what not are still there and permissions seem OK. There has been some server maintenance going on with the hosting provider, I wonder if they've messed something up.
« Last Edit: January 12, 2011, 05:49:23 PM by Karlos »
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Experimental IBrowse proxy for amiga.org
« Reply #20 on: January 12, 2011, 06:32:10 PM »
The proxy is fine, it's amiga.org that's giving the error message.
Code: [Select]
<!-- http://amiga.org/index.php : retrieved in 0.422s -->
<!--
HeadIFrameEliminator:Bytes in: 469, out: 469, took 0.000 s
DegradeXHTMLRewriter:Bytes in: 469, out: 543, took 0.000 s
LinkRewriter:Bytes in: 543, out: 543, took 0.000 s
MainNavigationRewriter:Bytes in: 543, out: 543, took 0.000 s
CommonBlockRewriter:Bytes in: 543, out: 562, took 0.000 s
CSSRewriter:Bytes in: 562, out: 562, took 0.000 s
JavascriptRewriter:Bytes in: 562, out: 562, took 0.000 s
FrontPageModulesRewriter:Bytes in: 562, out: 562, took 0.000 s
 -->
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;>
<html><head>
<title>403 Forbidden [Old Browser Edition]</title>
</head><body  bgcolor=&quot;#ffffff&quot;>
<h1>Forbidden</h1>
<p>You don't have permission to access /index.php
on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>Apache mod_fcgid/2.3.5 FrontPage/5.0.2.2635 mod_bwlimited/1.4 mod_auth_passthrough/2.1 Server at amiga.org Port 80</address>
</body></html>
 
<!-- http://amiga.org/index.php : processed in 0.001s -->

The comments in that source are generated by the proxy. My guess is that amiga.org no longer likes my webserver reading content *sniff*
« Last Edit: January 12, 2011, 06:34:20 PM by Karlos »
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Experimental IBrowse proxy for amiga.org
« Reply #21 on: January 12, 2011, 07:19:16 PM »
Quote from: pVC;606248
Hmh.. and what could be reason for that? I hope it gets solved or my amiga.org usage will drop down significantly :(


At this moment, I don't know. It could be many things.
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Experimental IBrowse proxy for amiga.org
« Reply #22 on: January 12, 2011, 07:41:38 PM »
When did you first notice a problem?
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Experimental IBrowse proxy for amiga.org
« Reply #23 on: January 12, 2011, 08:30:04 PM »
Strange, the proxy logs look more or less normal until today. I'll have to get my pipe and deerstalker and get back to you on that one.
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Experimental IBrowse proxy for amiga.org
« Reply #24 on: January 12, 2011, 08:37:05 PM »
The issue should now be fixed.

It seems the IP range covering my server was blocked. As the proxy had the blessing of the site owners, I can only assume this was an error and I've added an exception for the specific IP of the server.
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Experimental IBrowse proxy for amiga.org
« Reply #25 on: April 10, 2011, 12:59:10 PM »
I was reminded by Cammy's latest entry into the gallery that I'd added a size switcher to the proxy and forgotten to wire it into the user interface.

I've now added that feature along with one that attempts to store your whether or not you are using it and have hidden the disclaimer into a cookie on your local machine.

If you are using amiga.org via the proxy on a smaller screen size, try clicking the "640 wide screen?" link under the menu bar. It rearranges the menus and uses a smaller logo in an effort to improve the experience on older browsers.
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Experimental IBrowse proxy for amiga.org
« Reply #26 on: April 10, 2011, 11:37:11 PM »
I suppose the avatars could be reduced by forcing the image size, but that might render quite slowly in the browser as it would have to do the scaling itself.

Another option would be to pull them through the proxy and resample them on the fly. The downside of that is it would pretty much destroy any animated ones.

A final option might be to allow the hiding of avatars, but I guess that's doesn't seem as appealing.
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Experimental IBrowse proxy for amiga.org
« Reply #27 on: April 11, 2011, 07:29:53 AM »
Quote from: Retrofan;630847
Great, great, great!!! I`m browsing with my A1200/ACA56/Ibrowse and it`s really fantastic. I`ve substituted the old link. I`m using a 23" led Tv and I find great the size of avatars (Cammy`s better than Karlos`s one). I like a lot the white background. BTW Cammy where did you get that navigation toolbar?
The size of the text can be bigger or is it something I can change in Ibrowse and I don`t know how?


The font size is something you can set in iBrowse's preferences. I don't have as much control over it as you might think - the original page is dependent on CSS for controlling such things whereas the proxy has to generate old-fashioned tags, an anathema to modern web standards to say the least. When I was putting it together and testing it, I found that it looked best for me as it does now. Your mileage may vary. One of the many reasons CSS exists is to help standardise the rendering of elements on a page.

Quote
The AMIGA.org logo should be bigger too, I thik. EDIT: Have you changed it? Now looks right, logo and text.


There are only two options. The regular logo, which you will see when you don't use the "640 wide" mode or a specially resized one (reproduced with permission from the current owners) should you decide to opt for the smaller screen size layout.
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Experimental IBrowse proxy for amiga.org
« Reply #28 from previous page: May 09, 2011, 09:10:11 PM »
Quote from: nicholas;636736
As I understand it it's specific to this site.


Well, it is, but it's also implemented in a fashion that would allow you to make it work for other sites, but not without having to write code. Essentially it's based around a wrapper for cURL to pull documents then a chain of "processors" all of which implement the following simple interface:

Code: [Select]

interface MarkupRewriter {
  public function process($content);
}


The main controller, a singleton class called PageRequest has a default set of these that are needed on all of the amiga.org pages and allows you to add additional ones that are specific to only a few. So, in the stub "newreply.php" file, your code looks like this:
Code: [Select]

require_once('../include.main.php');
require_once('../classes.markuprewriter.editor.php');

PageRequest::getInstance()->addRewriters(
  array(
    new MessageEditorRewriter()
  )
);

PageRequest::getInstance()->process();


Whereas most stub pages just look like this:

Code: [Select]

require_once('../include.main.php');
PageRequest::getInstance()->process();


Although this is simple, the present incarnation requires that you have a stub .php file for every target page on the site you are proxying, which was fine in this case but not useful for a general purpose proxy. A better solution would be to use some rewrite rules and have a single page through which all requests are brokered, with some parameters added invisibly in the rewrite rule that instruct the PageRequest class to bind additional MarkupRewriter instances as required.

So, yes, you could use the code to make a more general proxy for other sites, but you would want to do it in a better fashion than I did for this one :)
int p; // A