WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • How to create a lib_jquery preset to droplets
  • Print
Pages: [1]   Go Down

Author Topic: How to create a lib_jquery preset to droplets  (Read 10465 times)

Offline SnapDaddy

  • Posts: 44
How to create a lib_jquery preset to droplets
« on: August 28, 2012, 12:09:06 AM »
Hi All,

Is it possible to create a droplet to insert "[[LibInclude?lib=lib_jquery&preset=slimbox]]" or other presets from the insert droplet function in the wysiwyg editor.

Thanks  :-D
Logged
Remember, experience is what you get when you don’t get what you want…

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: How to create a lib_jquery preset to droplets
« Reply #1 on: August 28, 2012, 08:14:46 AM »
Hi, don't ask, simply try:

dropletname: slimbox
Code: [Select]
return '[[LibInclude?lib=lib_jquery&preset=slimbox]]';
 :wink:
Logged
https://onkel-franky.de

Offline SnapDaddy

  • Posts: 44
Re: How to create a lib_jquery preset to droplets
« Reply #2 on: August 28, 2012, 10:26:29 PM »
Thanks dbs, tried that, but all I get when I insert is the droplet's name of [[Slimbox2]] and not the return of [[LibInclude?lib=lib_jquery&preset=slimbox]]  :?

Here's what I have:

Name: SLimbox2
Description: Inserts the Slimbox2 Preset
Code: return "[[LibInclude?lib=lib_jquery&preset=slimbox]]";
Comments: Use: [[LibInclude?lib=lib_jquery&preset=slimbox]]

I'm using WB 2.8.3 SP1 & Droplet v1.72
Logged
Remember, experience is what you get when you don’t get what you want…

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: How to create a lib_jquery preset to droplets
« Reply #3 on: August 28, 2012, 10:55:33 PM »
You have something like that in the head of the index.php of your template?
Code: [Select]
<?php
// automatically include optional WB module files (frontend.css, frontend.js)
if (function_exists('register_frontend_modfiles')) {
register_frontend_modfiles('css');
// register_frontend_modfiles('jquery');
register_frontend_modfiles('js');
} ?>
Logged
https://onkel-franky.de

Offline SnapDaddy

  • Posts: 44
Re: How to create a lib_jquery preset to droplets
« Reply #4 on: August 28, 2012, 11:43:47 PM »
Yes. Here's what I have...

Code: [Select]
// this allows to include the optional module files (frontend.css, frontend.js) into the head section
if(function_exists('register_frontend_modfiles')) {
  register_frontend_modfiles('css');
  register_frontend_modfiles('js');
}
Logged
Remember, experience is what you get when you don’t get what you want…

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: How to create a lib_jquery preset to droplets
« Reply #5 on: August 29, 2012, 07:17:04 AM »
You can use other droplets on other pages?
Have you tried a standard-template like "round"?
Logged
https://onkel-franky.de

Offline BlackBird

  • Posts: 2573
Re: How to create a lib_jquery preset to droplets
« Reply #6 on: August 29, 2012, 10:50:56 AM »
??? A droplet that returns droplet markup??? I don't think this can work...
Logged
http://wbaddons.webbird.de Don't miss this

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: How to create a lib_jquery preset to droplets
« Reply #7 on: August 29, 2012, 11:00:08 AM »
Quote from: BlackBird on August 29, 2012, 10:50:56 AM
A droplet that returns droplet markup??? I don't think this can work...

In WB 2.8.3 it should work. By default "3 levels deep"
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: How to create a lib_jquery preset to droplets
« Reply #8 on: August 29, 2012, 11:11:46 AM »
yes it works, have tested.  :wink:
Logged
https://onkel-franky.de

Offline BlackBird

  • Posts: 2573
Re: How to create a lib_jquery preset to droplets
« Reply #9 on: August 29, 2012, 11:12:28 AM »
Okay, but does it make sense? :?
Logged
http://wbaddons.webbird.de Don't miss this

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: How to create a lib_jquery preset to droplets
« Reply #10 on: August 29, 2012, 11:13:56 AM »
NO  :-D

For this is the page-based-function good, but i can't explain it in english.
The real droplet-call is tooooooo long.
« Last Edit: August 29, 2012, 11:16:52 AM by dbs »
Logged
https://onkel-franky.de

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: How to create a lib_jquery preset to droplets
« Reply #11 on: August 29, 2012, 11:21:27 AM »
In the case of the topic starter I think it makes sense.

This way you can tell a client to include a certain droplet on a page without having to tell him/her about any difficult parameters.
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline BlackBird

  • Posts: 2573
Re: How to create a lib_jquery preset to droplets
« Reply #12 on: August 29, 2012, 11:52:37 AM »
k, ic
Logged
http://wbaddons.webbird.de Don't miss this

Offline SnapDaddy

  • Posts: 44
Re: How to create a lib_jquery preset to droplets
« Reply #13 on: August 29, 2012, 05:20:32 PM »
Good feedback All!

To answer the question why create a droplet to insert a droplet, for me it is for jquery presets I create for client projects and ease of use.

The presets are droplets, but have no way to be inserted, you have to remember the droplet and prams and manually type it in (unless I'm missing something)...yet we have a complete droplet system to insert droplets, with comments as how to use them. So, my post was essentially a way to use the droplet system for jquery (or other) presets.

Since I'm on this topic, if the droplet function was modified to search for existing droplet presets and include them in the droplet dropdown when inserting, it would avoiding having to do what I am doing here!

Anyhow, thanks for the help! I got it working as dbs explained... :-D
Logged
Remember, experience is what you get when you don’t get what you want…

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • How to create a lib_jquery preset to droplets
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2