User Tools

Site Tools


doc:tips:webshareapi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:tips:webshareapi [2022/08/13 02:37] – Multilingual support is handled by fp fraenkimandoc:tips:webshareapi [2024/12/13 00:45] (current) – [Demo and Download by George] Is outdated/ Domain down fraenkiman
Line 10: Line 10:
 ==== How to integrate with Flatpress ==== ==== How to integrate with Flatpress ====
  
-First find and edit the file [[https://github.com/flatpressblog/flatpress/blob/master/fp-interface/themes/leggero/static.tpl|fp-interface/themes/YOUR THEME/static.tpl]] and find this line 14 +First find and edit the file [[https://github.com/flatpressblog/flatpress/blob/master/fp-interface/themes/leggero/static.tpl|fp-interface/themes/YOUR THEME/static.tpl]] and find this line 12 
-{/static}+''{$content|tag:the_content}''
  
  
Line 23: Line 23:
 To add webshare API to all your posts your must edit the file [[https://github.com/flatpressblog/flatpress/blob/master/fp-interface/themes/leggero/entry-default.tpl|/fp-interface/themes/YOUR THEME/entry-default.tpl]]. To add webshare API to all your posts your must edit the file [[https://github.com/flatpressblog/flatpress/blob/master/fp-interface/themes/leggero/entry-default.tpl|/fp-interface/themes/YOUR THEME/entry-default.tpl]].
  
-Paste the following code above the last </div> and then save the file back to your server.+Paste the following code above the last ''</div>'' (Line 40) and then save the file back to your server.
 <code html> <code html>
 <input type="button" value="Share this entry" class="the-share-button" onclick="shareTheLink()" /> <input type="button" value="Share this entry" class="the-share-button" onclick="shareTheLink()" />
Line 31: Line 31:
 Edit the file [[https://github.com/flatpressblog/flatpress/blob/master/fp-interface/themes/leggero/header.tpl|fp-interface/themes/YOUR THEME/header.tpl]] Edit the file [[https://github.com/flatpressblog/flatpress/blob/master/fp-interface/themes/leggero/header.tpl|fp-interface/themes/YOUR THEME/header.tpl]]
  
-Add the following script above the line 7 {action hook=wp_head}+Add the following script above the line 7 ''{action hook=wp_head}''
 a. a.
 <code html> <code html>
Line 68: Line 68:
 now all your posts will have a webshareAPI button now all your posts will have a webshareAPI button
  
-==== Demo and Download by George ==== +
-if you prefer to host your own js file you can download it from [[https://www.mypoppy.uk/webshare/share-min.zip]] just make sure your edit the above code so it points to your js file,  +
-test this on my website [[https://www.mypoppy.uk/blog|https://www.mypoppy.uk/blog]] just look for the webshare button below each post or page.If you are using a tablet or phone you may need to click on the more button when it opens+
  
 ===== Language settings and adoption of Flatpress variables ===== ===== Language settings and adoption of Flatpress variables =====
  
-With a bit of manual work, the Webshare API adopts Flatpress's language settings and can be supplied with Flatpress' standard variables. I took the files from the FP-1.3dev master branch and adapted them. If you want to test it, you can unpack the packed directory structure in FP-Root.+With a bit of manual work, the Webshare API adopts Flatpress's language settings and can be supplied with Flatpress' standard variables. I took the files from the FP-1.3dev master branch and adapted them. If you want to test it, you can unpack the {{ res:plugins:frank:webshare-api-en-de.zip|packed}} directory structure in FP-Root. 
  
 ==== The file and directory structure ==== ==== The file and directory structure ====
doc/tips/webshareapi.1660351069.txt.gz · Last modified: 2022/08/13 02:37 by fraenkiman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki