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 »
  • Call Droplet in Code2: PHP module?
  • Print
Pages: [1]   Go Down

Author Topic: Call Droplet in Code2: PHP module?  (Read 11083 times)

Offline bupaje

  • Posts: 592
Call Droplet in Code2: PHP module?
« on: April 16, 2013, 08:33:37 PM »
I have a Code2 module on my main page that has some PHP and escaped HTML code, I want to call a WYSIWYG area so I can easily update some and the following droplet looks perfect

Use [[ShowSection?section=1081]]

but my efforts don't work so not sure if it can be done?

Thanks.

Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Call Droplet in Code2: PHP module?
« Reply #1 on: April 16, 2013, 10:00:15 PM »
If you are in the php world you should use: echo '[[ShowSection?section=1081]]';

If that is not solving the problem tell us some more on "my efforts don't work".
Otherwise it is very hard to tell what is wrong.
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline bupaje

  • Posts: 592
Re: Call Droplet in Code2: PHP module?
« Reply #2 on: April 17, 2013, 02:18:26 AM »
Thanks for the reply. If I use the echo statement as in your example it shows it as written [[ShowSection?section=1081]] on the page - it doesn't run the php.
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Call Droplet in Code2: PHP module?
« Reply #3 on: April 17, 2013, 10:27:45 AM »
Quote from: bupaje on April 17, 2013, 02:18:26 AM
it doesn't run the php.
So what does it do?

Do you see the droplet call in your output?
Do you get an error (set errorreporting to E_ALL)?
Do you see nothing?
Does it work when you add the droplet in a WYSIWYG page?

Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline bupaje

  • Posts: 592
Re: Call Droplet in Code2: PHP module?
« Reply #4 on: April 17, 2013, 10:04:58 PM »
Settings error code to all does not show any errors. I simply see the unrendered code on my site.

Use [[ShowSection?section=1081]]

 you can see it on this page http://stormvisions.com/ if it is still not clear. In WYSIWYG or Code2 module - no difference.

I verified that a different droplet does work so something specific to this module.
« Last Edit: April 17, 2013, 10:15:39 PM by bupaje »
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Call Droplet in Code2: PHP module?
« Reply #5 on: April 17, 2013, 10:16:56 PM »
This typically has 3 possible causes..

1. Droplets are either not installed, or uninstalled.
2. The droplet "ShowSection" does not exist in your website.
3. Some other PHP error (failure) stops php before droplets are executed.

the first one is unlikely..
the second can only be checked by yourself..
the third on can be checked by calling [[lorem]] or any other standard droplet. If this fails too, do the same checks on a different page.
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline bupaje

  • Posts: 592
Re: Call Droplet in Code2: PHP module?
« Reply #6 on: April 17, 2013, 10:39:31 PM »
Weird [[Lorem]] and all others seem to work but not that one. It is installed and enabled. I copied a fresh version of the code and still no good. I'll see if sectionpicker or some other droplet or code will do what I need.

Do the droplets get stored in a particular folder or are they only in the database? I wanted to verify the actual file and permissions but long shot.
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Call Droplet in Code2: PHP module?
« Reply #7 on: April 17, 2013, 10:46:08 PM »
Quote from: bupaje on April 17, 2013, 10:39:31 PM
Weird [[Lorem]] and all others seem to work but not that one.
Double check the name of your showsection droplet. If there is a typo (check for blanks too) in the name this will be the result. (naming is case insensitive)
If the droplet exists, it will generate something (error/content/blank) and the [[...]] will be replaced.

Droplets are stored in the database, so no permission problems should occur.

Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline bupaje

  • Posts: 592
Re: Call Droplet in Code2: PHP module?
« Reply #8 on: April 17, 2013, 10:47:27 PM »
More strangeness. I tried sectionpicker and saw that it did get the word 'Test' from the wysiwyg but showed it 5 times. Then I tried again and it printed the word Use  and a balnk space 5 times and then the droplet call as plain text [[sectionpicker whatever]] then accidentally put it twice on the page and I got

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 79703315 bytes) in /home/storm59/public_html/modules/droplets/droplets.php on line 106

anyway here is the output I get from section picker

http://www.stormvisions.com/pages/home/latest-downloads.php
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Call Droplet in Code2: PHP module?
« Reply #9 on: April 17, 2013, 11:13:51 PM »
This looks like a sectionpicker calling another sectionpicker calling te first sectionpicker.. in the end it will crash somewhere..

Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline bupaje

  • Posts: 592
Re: Call Droplet in Code2: PHP module?
« Reply #10 on: April 17, 2013, 11:37:46 PM »
I assume this must be a problem with the php setup on my host? Hmmm... I also use Incapsula to protect the website, not sure why that would affect it but anyway I know I can't do it. I'll see if I get an answer on the RSS thing (generate rss feed of last 5 Downloads Gallery and Bookmarks module as I use RSS on several places and that is simple and works well. Thank you for taking the time to answer.

Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Call Droplet in Code2: PHP module?
 

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