Author Topic: DropletsExtension  (Read 4568 times)

Ralf Hertsch

  • Guest
DropletsExtension
« 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:

  • the WebsiteBaker search functions ignores the output of droplets completly
  • droplets are not able to change the page title, description or keywords
  • droplets can't autoload css files

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 (german only, please use translation)

Download DropletExtension

Regards
Ralf


Offline crnogorac081

  • Posts: 1974
  • Gender: Male
Re: DropletsExtension
« Reply #1 on: May 24, 2011, 11:57:35 AM »
This sounds great Ralf, I like idea..
UI / UX Designer

Offline pcwacht

  • Posts: 2923
  • Gender: Male
    • Dutch ICT info
Re: DropletsExtension
« Reply #2 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
http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....

Ralf Hertsch

  • Guest
Re: DropletsExtension
« Reply #3 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

Offline BlackBird

  • Posts: 2573
Re: DropletsExtension
« Reply #4 on: June 05, 2011, 05:57:41 PM »
Why did you create a new module instead of extending the Droplets module? (Like I did...)

Ralf Hertsch

  • Guest
Re: DropletsExtension
« Reply #5 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 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


Offline BlackBird

  • Posts: 2573
Re: DropletsExtension
« Reply #6 on: June 05, 2011, 09:34:46 PM »
Hm, as far as I remember, I managed to include Droplets in Search. :roll:

Ralf Hertsch

  • Guest
Re: DropletsExtension
« Reply #7 on: June 05, 2011, 10:09:15 PM »

Please let us discuss this in the german thread and not in two threads in two languages at the same time.

Regards
Ralf

Ralf Hertsch

  • Guest
Re: DropletsExtension
« Reply #8 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

Regards
Ralf
« Last Edit: June 07, 2011, 02:35:55 PM by Ralf (Berlin) »