gerhard / glz_custom_fields_public

glz_custom_fields contributors can raise bugs here and vote for features
16 stars 2 forks source link

Configure glz_custom_fields link not working when in subdirectory #32

Closed testdept closed 12 years ago

testdept commented 12 years ago

My test Txp site resides in a subdirectory therefore the link to 'Configure glz_custom_fields', available on the admin page is not working properly (directs to site without subdir).

I resolved this by editing the file glz_custom_fields.js, line 147, adding '+window.location.pathname' to 'window.location.host' and omitting '/textpattern'.

Works for now but I haven't tested my adaptation on a site where Txp does not reside in a subdirectory...

original $("select#custom_set_type").after("<span class=\"right\"><em><a href=\"http://"+window.location.host+"/textpattern?event=plugin_prefs.glz_custom_fields\">Configure glz_custom_fields</a></em></span>"); adapted to $("select#custom_set_type").after("<span class=\"right\"><em><a href=\"http://"+window.location.host+window.location.pathname+"?event=plugin_prefs.glz_custom_fields\">Configure glz_custom_fields</a></em></span>");

gerhard commented 12 years ago

Excellent, thanks so much! Already added original file.