Older blog entries for mglazer (starting at number 18)

22 Jun 2002 (updated 22 Jun 2002 at 06:56 UTC) »

Responding to the advice from Malx I added a faux PATH_INFO variable in PHPortal.

This basically means anything after the file extensions are trasnformed into an array of variables.

EXAMPLE: http://dev.4arrow.com/index.xpc.text/string1/var1,val1/var2|val2/string2

PRODUCES:

$x->_URL = Array
(
   [0] => /index
   [1] => .text/string1/var1,val1/var2|val2/string2

)

$x->_PATH = Array ( [1] => string1 [var1] => val1 [var2] => val2 [4] => string2 )

All three of these characters are checked and can be used as delimters to create variables and values in urls.

$separators=array(',',':','|');

If you click the example link above view source and scroll to the end of the page and look for a XML namespace like so: <xpc:path str... />

You can also play with the link by adding and removing you own paths, delimiters, and variables to see how this works.

Added CSS and CSV content type transformation to PHPortal the CSV can use either a tab delimiter or comma separator.

As with all content type transformations they can receive and handle arrays as well as strings or singular rows, can be presented inline or as a downloadable file, can use the default or a custom template, and now can also display Object generation (after PHportal parser) or Object source (direct from data store no parsing).

21 Jun 2002 (updated 21 Jun 2002 at 20:26 UTC) »

Some think its humane to be humane to those who are inhumane but they are logically wrong and in fact sustain those who are inhumane by not isolating and disenfranchising their inhumane behaviours.

Thus, enhancing and prolonging this use of barbaric actions by accomadating and allowing it to occur via your humane efforts towards the inhumane.

The reason for this is based on their own faults, they do not trust their own value judgment system and thus project their inabilities to choose right from wrong onto others and say 'how can you say what is inhumane or not' when it is more than clealry obvious to the standards of civil society.

If you can't figure out the difference between the two you yourself are then not humane. Being incapable to differentiate the two, places you in this same subclass of savagery.

It is not intolerant to not tolerate bad behaviour but it is in fact intolerable to allow this same bad actions to thrive.

Your support of said behavior in fact negates your own humanity that you beleive you are protecting.

By supporting the inhumane you have in fact yourself become inhumane. The inability to discern between humane and the inhumane makes you inhumane and therefore part of the inhumane class of actors and not a thoughtfull outsider that you pretend you are.

Persisting Objects is an important part of PHPortal.

In the life of the script run the script can be called numerous times we want embedded objects to acquire top level properties but also we want to maintain the top level objects hierarchy and standing in the life of the script run.

So, what are the solutions for this?

Sesssions, flat file, sql store, cookies? We don't want to get too complicated this is only to persist the life of each click through.

Capturing the string after the file extensions and/or if no extensions after the found object.

21 Jun 2002 (updated 21 Jun 2002 at 17:39 UTC) »

MSFT excel viewer http://office.microsoft.com/downloads/2000/xlviewer.aspx

header("Content-type: application/ms-excel; name=file1.xls"); 
header("Content-Disposition: inline; filename=file1.xls"); 
echo "a1\tb1\t\na2\tb2\t\n";exit;

PHP Excel Class without needing COM support: http://psxlsgen.sourceforge.net

NOTE: There is a big difference between viewing XLS files as a MSFT works SpreadSheet and a MSFT Excel SpreadSheet. Basically, one can't do the other.

Content types have various options such as an array looped or a singular string entry.

Another is selecting templates, there are defaults as well as custom.

Here is an example of a text content type URI Object in the default (http://dev.4arro w.com/index.xpc.text) and with a custom template (http://dev.4arrow.com/index.xpc.text? with=print_tpl).

21 Jun 2002 (updated 21 Jun 2002 at 07:12 UTC) »

A PHPortal instance top level 'owner' or master user is the first user in the first row of the first user table which was created when the PHPortal instance was itself created as well.

This user id will generally be userid = 1.

Therefore, in the master only control panel we can easily do a check for the top level user to make sure only they are entering.

PHPortal Ownership is based on the first row in the top user table with the id = 1. That user is the top owner and the only one with access to the control panel of that specific PHPortal instance.

At the same time other users can belong to the local access role of 'owner'. This would enable said user, if user had access permissions to the 'takeOwnership' method, to take ownership of a object and its subobjects from another user even another user in the same 'owner' role.

Again, even with all that said only the top level user, which cannot be deleted, can have access to the control panel of the management interace.

21 Jun 2002 (updated 21 Jun 2002 at 07:13 UTC) »

I have also been working on Object Ownership and the userfolder app. In the userfolder app there is an added method named 'store'. This method allows you to identify a unique or shared table that is different that the default used for that specific object instance.

In the user table there are two indices one called PID (parent identifier) the other OID (object identifier). PID signifies parent id. One user may be a child of another user made so by the relational pid. The OID signifies the userfolder Object instance that the user belongs inside. The oid is a relational key from the main objects table id integer of that specific userfolder object instance.

In regards to object ownership there can only be one owner per object which is based on the user who edited or created said Object. a Objects capabilites are limited to the users access permissions. Therefore, if a user cannot addFiles to a folder object he created but then another user who does have those writes edits his folder or takes ownership of the folder then that user would be able to then addFiles to that folder object.

The control panels access can never be overwritten. The master of a PHPortal instance is the user id =1 which also cannot be deleted. The control panel methods cannot change ownership either.

The 'take ownership' (of objects) method is only available to those users who acquire that permission based on the master's settings for his local user roles.

9 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!