Issue information
-
#035692
-
Fixed
-
2.3.0 Beta 1
-
2.3.0 Beta 1
-
1 - Low
Issue Confirmations
-
Yes (0)No (0)
The blog this sharelinks plugin *mostly* works with IP.Content (after some fixes I just made), however there is one issue that I cannot resolve or work around within Content itself.
The blog this sharelinks plugin uses the following code to figure out what app is being called
This works fine when we run IP.Content from within the forums (using the IPB furl system), however when IP.Content runs outside of the forums the $_app isn't detected properly (and thus the extension file isn't loaded) because the URL does not match up with the FURL regex. It can't, as the admin is able to completely define the URL from start to finish.
I'm not sure the best way to handle this. A few options:
If you need an example:
My front end URL is (notice it is above /trunk): http://localhost/inv...-post-fine-r138
The sharelink URL ends up being: http://localhost/inv...IHBvc3QgZmluZT8,
The blog this sharelinks plugin uses the following code to figure out what app is being called
//-----------------------------------------
// Nope? Okay Work out what app this URL belongs to
//-----------------------------------------
$_app = NULL;
$furlRegex = NULL;
$_url = str_replace( ipsRegistry::$settings['_original_base_url'], '', $url );
$_url = str_replace( array( '/index.php/', '/index.php?/' ), '/', $_url );
foreach ( ipsRegistry::$applications as $app )
{
if ( file_exists( IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/furlTemplates.php' ) )
{
$_SEOTEMPLATES = array();
require( IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/furlTemplates.php' );
foreach ( $_SEOTEMPLATES as $k => $data )
{
if ( preg_match( $data['in']['regex'], $_url ) )
{
$_app = $app['app_directory'];
$furlRegex = $data['in']['regex'];
break 2;
}
}
}
}
This works fine when we run IP.Content from within the forums (using the IPB furl system), however when IP.Content runs outside of the forums the $_app isn't detected properly (and thus the extension file isn't loaded) because the URL does not match up with the FURL regex. It can't, as the admin is able to completely define the URL from start to finish.
I'm not sure the best way to handle this. A few options:
- Assume IP.Content if no $_app is detected, and call a special method that we can define in the IP.Content plugin which will check to see if it is, and if so return the appropriate data, otherwise return a special status so the blog this plugin knows to treat it as generic content.
- Let each extension define another method which can be called to check URLs that the generic checking couldn't verify (IP.Content is likely the only app that would need this, at least internally)
If you need an example:
My front end URL is (notice it is above /trunk): http://localhost/inv...-post-fine-r138
The sharelink URL ends up being: http://localhost/inv...IHBvc3QgZmluZT8,
- I wouldn't default to IPC if nothing else is found, if possible I don't want to hardcode things around
- That seems overly complicate just for IPC
- I'm thinking about another solution that allows us to override the application with a new variable in the url (like overrideApp) and append it to the url.
Brandon: this is changed in both IP.Board and IP.Blog, you need to update content to pass the "overrideApp" parameter in the IPSLib call now.
changed status to: Fixed,
changed version to: 2.3.0 Beta 1,
changed fixed-in version to: 2.3.0 Beta 1
0 user(s) are reading this issue
0 members, 0 guests, 0 anonymous users












