WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Droplets & Snippets => Topic started by: Ralf Hertsch on May 24, 2011, 09:49:01 AM

Title: DropletsExtension
Post by: Ralf Hertsch on May 24, 2011, 09:49:01 AM
Hello,

droplets are one of the best and important feature of WebsiteBaker.

As long as you are using droplets only for small code-snippet it's all fine - but droplets are also used as interface for addons, i.e. for connecting Admin-Tools with the frontend or for interaction with the user. In these cases droplets have some poor restrictions:


DropletExtension counterbalance these restrictions an give droplets the abilities of regular page modules.

A full description is available at phpManufaktur:

DropletExtension - der Nachbrenner für ihre Code-Schnipsel (http://phpmanufaktur.de/cms/topics/dropletsextension-der-nachbrenner-fuer-ihre-code-schnipsel.php) (german only, please use translation (http://translate.google.de/translate?js=n&prev=_t&hl=de&ie=UTF-8&layout=2&eotf=1&sl=de&tl=en&u=http://phpmanufaktur.de/cms/topics/dropletsextension-der-nachbrenner-fuer-ihre-code-schnipsel.php&act=url))

Download DropletExtension (http://phpmanufaktur.de/modules/download_gallery/dlc.php?file=55)

Regards
Ralf

Title: Re: DropletsExtension
Post by: crnogorac081 on May 24, 2011, 11:57:35 AM
This sounds great Ralf, I like idea..
Title: Re: DropletsExtension
Post by: pcwacht on May 24, 2011, 02:04:49 PM
Did have a quick look at your page wich explain this nifty droplet addon

One question comes to mind,
DropletsExtension can load css :
Code: [Select]
if (function_exists('is_registered_droplet_css') && !is_registered_droplet_css('droplet_name'))) {   
  register_droplet_css('droplet_name', PAGE_ID, 'module_directory', 'frontend.css'); 
}
Maybe enhance this to include javascript as well?

Dunnoh if it is needed , but I could imagine it could be handy as well.

John
Title: Re: DropletsExtension
Post by: Ralf Hertsch on May 24, 2011, 02:17:21 PM
Hello John,

DropletsExtension can load css :
Code: [Select]
if (function_exists('is_registered_droplet_css') && !is_registered_droplet_css('droplet_name'))) {   
  register_droplet_css('droplet_name', PAGE_ID, 'module_directory', 'frontend.css'); 
}
Maybe enhance this to include javascript as well?

this is really no problem, I will add an register function for JavaScript!

Regards
Ralf
Title: Re: DropletsExtension
Post by: BlackBird on June 05, 2011, 05:57:41 PM
Why did you create a new module instead of extending the Droplets module? (Like I did...)
Title: Re: DropletsExtension
Post by: Ralf Hertsch on June 05, 2011, 06:17:45 PM
Why did you create a new module instead of extending the Droplets module? (Like I did...)

I've explained this question in the german thread (https://forum.WebsiteBaker.org/index.php/topic,21614.0.html) too.

In this case it's not possible to extend the Droplets module, because Droplets is an admin-tool.

To integrate droplets into the WebsiteBaker search, it is necessary to to have a page modul. The reason is: WebsiteBaker checks only active page modules for the file search.php which can deliver results to the WebsiteBaker search function.

For this reason DropletsExtension is a page module and works as interface for all droplets.

Regards
Ralf

Title: Re: DropletsExtension
Post by: BlackBird on June 05, 2011, 09:34:46 PM
Hm, as far as I remember, I managed to include Droplets in Search. :roll:
Title: Re: DropletsExtension
Post by: Ralf Hertsch on June 05, 2011, 10:09:15 PM

Please let us discuss this in the german thread (https://forum.WebsiteBaker.org/index.php/topic,21614.0.html) and not in two threads in two languages at the same time.

Regards
Ralf
Title: Re: DropletsExtension
Post by: Ralf Hertsch on June 07, 2011, 06:48:18 AM
Moin miteinander,

I've just released DropletsExtension 0.14.

DropletsExtension now supports Facebook Open Graph Meta tags. You can know set facebook=true with the print_page_head() function within the template of your website:

Code: [Select]
<?php
  
if (file_exists(WB_PATH.&#39;/modules/droplets_extension/interface.php&#39;)) { 
    
require_once(WB_PATH.&#39;/modules/droplets_extension/interface.php&#39;);
    
print_page_head(true);
  }
  else { 
?>

    <meta name="description" content="<?php page_description(); ?>" />
    <meta name="keywords" content="<?php page_keywords(); ?>" />
    <title><?php page_title(&#39;&#39;, &#39;[WEBSITE_TITLE]&#39;); ?></title>
  <?php }
?>


With print_page_head(true) DropletsExtension will write 5 additional meta tags:

Code: [Select]
<meta property="og:image" content="http://phpmanufaktur.de/media/content/addons/droplets_extension/droplet-extension-300x400.png" />
<meta property="og:type" content="article" />
<meta property="og:title" content="DropletsExtension - der Nachbrenner für ihre Code-Schnipsel" />
<meta property="og:description" content="Droplets sind eine geniale und einfache Möglichkeit Programmcode genau dort auszuführen, wo er gerade benötigt wird. DropletsExtension stattet Droplets mit den Fähigkeiten vollwertiger Addons aus und macht sie noch leistungsfähiger." />
<meta property="og:url" content="http://phpmanufaktur.de/cms/topics/dropletsextension-der-nachbrenner-fuer-ihre-code-schnipsel.php" />

For the tag og:image DropletExtension will use the first image of the content (WYSIWYG section or TOPICS article). This grant, that facebook will use this image and don't select any image from your site.

The other tags will be set similiar to the general informations of the page.

Mor informations, download: DropletsExtension (http://phpmanufaktur.de/cms/topics/dropletsextension-der-nachbrenner-fuer-ihre-code-schnipsel.php)

Regards
Ralf