Maybe I missunderstood something, so im searching for clearness
![Smile :)](images/smilies/icon_smile.gif)
I install all my extra plugins to "plugins.local" directory. Most "Sharing" plugins, for example "Google+" from https://tt-rss.org/gitlab/fox/tt-rss-at ... er/plugins have links to images hardcoded to plugin directory. E.g. from init.php / function hook_article_button($line) :
src=\"plugins/googleplus/googleplus.png\"
should be
src=\"plugins.local/googleplus/googleplus.png\"
but better a variable or function with the plugin directory. Is there such a funtion
Or is it just wrong that I use the plugins.local directory?
Im not such a PHP crack, but here is my suggestions to solve this issue:
Code: Select all
function hook_article_button($line) {
return "<img src=\"".substr(dirname(__FILE__), strlen($_SERVER['DOCUMENT_ROOT']))."/googleplus.png\"
class='tagsPic' style=\"cursor : pointer\"
onclick=\"shareArticleToGooglePlus(".$line["id"].")\"
title='".__('Share on Google+')."'>";
}
Maybe ther is a better way to get the relative directory of the running script.
Thanks for discussion
Mate