Pathinfo Extension and small fixes to PivotX core

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

Pathinfo Extension and small fixes to PivotX core

Postby janozaurus » Sun Feb 08, 2009 9:56 pm

Hi all,
I'm releasing version 0.2 of my pathinfo extension for beta testing. The extension creates links such as
/i.php/e/1
instead of
/?e=1
without relying on Apache's mod_rewrite module.

At the moment i.php must be present in the 'site_url' directory and the extension must be installed in pivotx/extensions/pathinfo/ directory. The final version will allow more flexible URIs, especially for site with multiple weblogs.

I haven't done extensive testing, so don't use in a production environment. Download PathInfo extension beta 0.2 here:
http://www.spacezone.de/download/pivot/pathinfo0.2.zip


To make the extensions work I made small changes to module_parser.php and module_tags.php. The changes are related to make_link hooks and multiple weblogs. I used module_parser.php revision 1703 and module_tags.php rev 1672, downloaded today from svn. You can download my version and diffs here:
http://www.spacezone.de/download/pivot/ ... 090208.zip

The extension will not work with these changes.
janozaurus
 
Posts: 38
Joined: Mon Nov 26, 2007 9:03 am

Re: Pathinfo Extension and small fixes to PivotX core

Postby hansfn » Sun Feb 08, 2009 11:15 pm

I really appreciate your work. When the extension is more mature I would like to include it in the collection of core extensions (if you don't mind).

I used module_parser.php revision 1703 and module_tags.php rev 1672, downloaded today from svn. You can download my version and diffs here:


Maybe better to just say that this extensions requires PivotX 2.0.0 beta 12h or newer - get it from http://pivotx.net/files/unstable-development/ (12h includes all patches up to 1719.)

The extension will not work with these changes.

withOUT?
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Pathinfo Extension and small fixes to PivotX core

Postby janozaurus » Mon Feb 09, 2009 8:34 pm

hansfn wrote:Maybe better to just say that this extensions requires PivotX 2.0.0 beta 12h or newer - get it from http://pivotx.net/files/unstable-development/ (12h includes all patches up to 1719.)

[The extension will not work] withOUT [these changes].

You're right.

I hope to provide a mature version of my extension soon after you release the final non-beta PivotX.
janozaurus
 
Posts: 38
Joined: Mon Nov 26, 2007 9:03 am

Re: Pathinfo Extension and small fixes to PivotX core

Postby janozaurus » Sun Feb 22, 2009 8:50 pm

Hi Vladimir,
regarding your email about PathInfo and customized URIs:

I'm not a big believer in SEO stuff and my pathinfo is extension is not designed to include redundant information (such as title and category) in the URI. However if you understand some PHP it should be possible to modify my extension to create SEO friendly URIs as you wish.

The basic idea of my extensions is to provide a PHP file that translates URIs such as
i.php/some/path/info/string
to a format PivotX understands and an extension wich generates such URIs.

"/i.php/e/20" translates to "/?e=20", i.e. entry number 20. However "i.php/e/20/somecategory/sometitle" would work as well.

The file hook_pathinfo.php provided with my extension contains a function hookPathInfoEntriesCallback(). This sets a variable $link, typically something like "http://somehost/i.php/e/20". You can modify this to whatever you want as long as you keep the "something.php/e/20" part and something.php exists (and is a copy of my i.php or similar).

HTH

Jan
janozaurus
 
Posts: 38
Joined: Mon Nov 26, 2007 9:03 am


Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 1 guest

cron