Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 08:42:25 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155527 Posts in 21712 Topics by 7737 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: [Solved] Droplet [wblink?id=idnumber]  (Read 2045 times)
Mte90
Forum Team
*****
Offline Offline

Posts: 93


WWW
« on: July 29, 2009, 08:45:53 AM »


The droplet return the link or path of the number page.

Code:
global $database, $wb;
    $query=$database->query("SELECT link FROM ".TABLE_PREFIX."pages where page_id=".$id);
    $link=$query->fetchRow();
    return "http://".$_SERVER['HTTP_HOST']."/pages".$link[0].".php";
« Last Edit: September 08, 2009, 11:22:08 AM by Mte90 » Logged

www.mte90.net - Debian, Kde e programmazione!
Mp per richieste personali verranno cestinate!
erpe

Offline Offline

Posts: 2077


WWW
« Reply #1 on: July 29, 2009, 09:04:40 AM »

Hi

I don't think it is a droplet, because in that case it has to be written like [[wblinkxxx]].  grin

rgds

erpe
Logged

Mte90
Forum Team
*****
Offline Offline

Posts: 93


WWW
« Reply #2 on: July 29, 2009, 01:19:56 PM »

modify [wblinkXX] in [[wblinkXX]] is no problem.
but a way to make a droplet to use this command?
Logged

www.mte90.net - Debian, Kde e programmazione!
Mp per richieste personali verranno cestinate!
erpe

Offline Offline

Posts: 2077


WWW
« Reply #3 on: July 29, 2009, 01:36:07 PM »

No  grin

Learn more about Droplets at this page:
http://www.websitebakers.com/pages/droplets/about-droplets.php
and
http://www.websitebakers.com/pages/droplets/help.php

rgds

erpe
Logged

Mte90
Forum Team
*****
Offline Offline

Posts: 93


WWW
« Reply #4 on: August 10, 2009, 04:44:22 PM »

Sorry for the time for the post XD

It's possible to make a dropelt that permect the parameter that is the number of the page that return the link?
Logged

www.mte90.net - Debian, Kde e programmazione!
Mp per richieste personali verranno cestinate!
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #5 on: August 11, 2009, 12:32:53 AM »

Try this code:

Code:
$pid = $title "";
return '<a href="[wblink'.$pid.']">'.$title.'</a>';

then you call a droplet for example [[wblink?pid=1&title=link name]]

cheers
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Mte90
Forum Team
*****
Offline Offline

Posts: 93


WWW
« Reply #6 on: September 08, 2009, 11:19:40 AM »

Code:
global $database, $wb;
    $query=$database->query("SELECT link FROM ".TABLE_PREFIX."pages where page_id=".$id);
    $link=$query->fetchRow();
    return "http://".$_SERVER['HTTP_HOST']."/pages".$link[0].".php";
I have mad the Droplet that make it the link.
I have sent it at Amasp.
Logged

www.mte90.net - Debian, Kde e programmazione!
Mp per richieste personali verranno cestinate!
redWhite

Offline Offline

Posts: 1


« Reply #7 on: May 25, 2010, 09:56:49 AM »

I guess i've to script the wblink droplet myself? In the new WebsiteBaker version it's not available and nowhere to find in droplet libraries... Has anyone got the right code?
Logged
DarkViper
Development Team
*****
Offline Offline

Posts: 1252


« Reply #8 on: May 25, 2010, 11:01:20 AM »

Since WB 2.8.1 Rev.1292 from 2010-02-19  this Droplet is never needed.
It's enough to place [wblink123] somewhere in in the template.
WB will replace it with a valid internal link.
Logged

Anleitungen lesen und selber nachdenken ist anstrengend...  Da lass ich doch lieber andere für mich denken...

In 1984:  Nineteen Eighty-Four is a unrealistic utopia!!
In 2012:  Nineteen Eighty-Four is a little piece only of our reality!!
snark
Guest
« Reply #9 on: June 02, 2010, 06:59:59 AM »

Code:
global $database, $wb;
    $query=$database->query("SELECT link FROM ".TABLE_PREFIX."pages where page_id=".$id);
    $link=$query->fetchRow();
    return "http://".$_SERVER['HTTP_HOST']."/pages".$link[0].".php";
I have mad the Droplet that make it the link.
I have sent it at Amasp.

is there a way to expand this to display the path of a news-post?
Logged
Paul - Westhouse IT

Offline Offline

Posts: 63


WWW
« Reply #10 on: November 12, 2010, 02:11:05 PM »

Since WB 2.8.1 Rev.1292 from 2010-02-19  this Droplet is never needed.
It's enough to place [wblink123] somewhere in in the template.
WB will replace it with a valid internal link.

True, but wblink doesn't work in Bakery full descriptions or in show_menu2
Logged

Westhouse IT - Professional WebsiteBaker developers for hire.
DarkViper
Development Team
*****
Offline Offline

Posts: 1252


« Reply #11 on: November 12, 2010, 03:20:23 PM »

Quote from: Paul - Westhouse IT
True, but wblink doesn't work in Bakery full descriptions or in show_menu2

That's correct. Some modules/snippets have a little bit too aggressive kind using htmlentities().
So you will see [wblink123] but the real code behind is &#91;wblink123&#93; which can not be evaluated by the output filter to prevent i.e. a wanted, literal [wblink123] in a FAQ section or somewhere else.
« Last Edit: November 12, 2010, 03:26:16 PM by DarkViper » Logged

Anleitungen lesen und selber nachdenken ist anstrengend...  Da lass ich doch lieber andere für mich denken...

In 1984:  Nineteen Eighty-Four is a unrealistic utopia!!
In 2012:  Nineteen Eighty-Four is a little piece only of our reality!!
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!