|
From: Verdon V. <ve...@ve...> - 2008-02-12 15:12:30
|
So,
In a simple case then, like this from my index.php file...
PHPWS_Core::initModClass('podcaster', 'Podcaster.php');
$podcaster = new Podcaster;
if (isset($_REQUEST['aop'])) {
$podcaster->adminMenu();
} elseif (isset($_REQUEST['uop'])) {
$podcaster->userMenu();
} elseif (isset($_REQUEST['id'])) {
$podcaster->userMenu('view_channel');
} else {
PHPWS_Core::home();
}
... all I need to do is change $_REQUEST['id'] to $_REQUEST['var1']
How would this be changed?
PHPWS_Text::rewriteLink($channel->title, 'podcaster', $this-
>channel_id);
Thanks,
verdon
On 12-Feb-08, at 9:47 AM, matt wrote:
> Good day,
>
> phpWebSite 1.5.0 will change the way it handles mod_rewrite. The
> .htaccess file will filter all requests that do not match a
> directory or
> file to the index.php file. The index.php file includes a new core
> file
> named Forward.php. phpWebSite then detects if the mod_rewrite
> format is
> getting used. If so, it writes the following variables:
>
> $_REQUEST['module'] = $variable_1;
> $_GET['var1'] = $variable_2;
> ...
> $_GET['var' . $n] = ${'variable_' . $n};
>
>
> So this address:
> http://phpwebsite.appstate.edu/blog/2008/1/4
>
> Will create:
>
> $_REQUEST['module'] = 'blog';
> $_GET['var1'] = 2008;
> $_GET['var2'] = 1;
> $_GET['var3'] = 4;
>
> The updated blog module looks for this and changes the vars into year,
> month, and day for a new viewing preference.
>
> Access will no longer store the shortcuts in the .htaccess file.
> Instead, if the only variable passed is not a module, it is assumed to
> be a title. This will be passed to Access which will pull the
> appropriate key and then fill in the $_GET variable with the
> appropriate
> module and overwrite var1. This will be done instead of a forward to
> prevent losing the url.
>
> In the long run, this will allow module creators to mold mod_rewrites
> however they like. In the meantime, you will need to change your 'id'
> and 'page' checks to 'var1' and 'var2'. This change will also
> affect the
> rewriteLink function in Text.php.
>
> The next release of phpWebSite will go through an RC period. This
> should give you time to adjust your modules for this change and the
> updated File Cabinet. If you have any concerns, please reply to
> this list.
>
> Thanks,
> Matt
>
>
> --
> Matthew McNaney
> Electronic Student Services
> Appalachian State University
> Ext. 6493
> http://ess.appstate.edu
> http://phpwebsite.appstate.edu
>
> ----------------------------------------------------------------------
> ---
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Phpwebsite-developers mailing list
> Php...@li...
> https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers
|