Recent Topics

1 Apr 30, 2008 23:16    

get_plugin_url() generates a wrong link to plugins folder on blogs with relative subfolder path.

What I mean is if you set your "Blog Folder URL" to users/ and select "Explicit reference to stub file" stub.php, your blog url will be http://www.site.com/blogs/users/stub.php.

And this function generates plugins links like /blogs/users/plugins/code_highlight_plugin/amcode.css instead of /blogs/plugins/code_highlight_plugin/amcode.css

The function is in /inc/_misc/_plugin.class.php (2307)
I fixed it this way, but I don't know for sure if it IS a bug or not

if( isset($Blog) && ! is_admin_page() )
		{
			//$base = $Blog->get('baseurl').$plugins_subdir;
			$base = $plugins_url;
		}
		else
		{
			$base = $plugins_url;
		}

PM me for login/pass if you don't have 1.10.x installed to try this ;)

2 May 02, 2008 07:47

Since nobody replies I guess this is not a bug. But why it does this thing, any ideas?

This part $Blog->get('baseurl') is gone in 2.x version

3 May 02, 2008 09:26

Maybe no one replied because no one has a reply to give? Or possibly no one who might know about it (and do something about it) pays any attention to bugs in the 1.* generation any more? Somewhat obsolete unless a security hole is discovered yah?

Good catch though. I suppose I should tweak my remaining 1.10.3 installation to reflect this fix - not that I need it given that I have no plugins that need to access the plugin folder from the front end. Still it's nice to keep my files as functional as possible ;)

4 May 02, 2008 09:41

I don't actually care about 1.x generation, but I have to finish my plugin and at the same time don't kill all others with this "fix".

Please try it when you get a chance.

5 May 02, 2008 10:04

Okay will do, but it won't be soon due to I really want to finish a plugin translation maker plugin.

6 May 02, 2008 10:06

No problem, it's already work well with $base = $plugins_url;


Form is loading...