48 | Posts |
I want to adapt https://github.com/florincatalin/jquery-share-plugin
for SimpleBlog (for Typesetter I succeeded).
In this regard I have modified the SimpleBlogCommon.php file ( public static function AddCSS() )
$ page-> head_js [] = 'goshare.js';
$ page-> jQueryCode. = '$ (". utilshare"). goshare ();';
The goshare.js file is copied to the root.
The problem is that it only works when I am logged on as an administrator, when I logout I receive an error message. The source code shows that indeed the goshare.js file is not found.
This occurs only when I see post without being logged in.
What could be the cause? Maybe I did something wrong?
1.5K | Posts |
64.5K | Downloads |
16 | Plugins |
> The goshare.js file is copied to the root.
I wouldn't do it like that. The installation root shouldn't be used in this regard and is not (shouldn't be) writable to plugins.
Furthermore
$page-> head_js[] = 'goshare.js';
needs the (global) $dirPrefix; variable prepended in order to work in all situations.
global $dirPrefiix; $page-> head_js[] = $dirPrefix . '/goshare.js';
1.5K | Posts |
64.5K | Downloads |
16 | Plugins |
1.5K | Posts |
64.5K | Downloads |
16 | Plugins |
48 | Posts |
I wouldn't do it like that. The installation root shouldn't be used in this regard and is not (shouldn't be) writable to plugins.
I understand, there are security reasons.
needs the (global) $dirPrefix; variable prepended in order to work in all situations.
it is good to know in the future
Thanks so much for the plugin, you were very kind! (and very fast)
I've already installed it on my site and my blog and it works flawlessly!
I think this plugin is very useful because it can also do terms search and translation using Google, which solves an important problem. In addition, Google uses AI algorithms for translation and is getting better and better every day.
It is not very complicated, other options can be added. For the addition of new icons we have online
https://onlinepngtools.com/convert-base64-to-png
we just need to change some code inside goshare.js. And now it could be used with any template.
All the best,
Florin
1.5K | Posts |
64.5K | Downloads |
16 | Plugins |
Glad you like it. Please just add this semicolon to the code in goshare.php. Might cause issues with other plugins otherwise.
<?php
defined('is_running') or die('Not an entry point...');
class TSgoShare{
/**
* Typesetter action hook
*/
public static function GetHead(){
global $page, $addonRelativeCode;
$page->css_admin[] = $addonRelativeCode . '/goshare.css';
$page->head_js[] = $addonRelativeCode . '/goshare.js';
$page->jQueryCode .= '$("#gpx_content").goshare();';
}
}
48 | Posts |
A new release for Typesetter is in the works with a lot of improvements including the ... Read More
Typesetter 5.1Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More
More News
What CMS: Find out what CMS a site is using.
Who Hosts This: Find out who is hosting any web site
WordPress Theme Detect: Find out which theme a WordPress site is using