[Solved] Droplet [wblink?id=idnumber]

DarkViper

#12
Quote from: Paul - Westhouse ITTrue, 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 [wblink123] which can not be evaluated by the output filter to prevent i.e. a wanted, literal [wblink123] in a FAQ section or somewhere else.
[url=http://www.youtube.com/watch?v=tmzDAz6ZvFQ]Der blaue Planet[/url] - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen[br]
[i]"You have to take the men as they are... but you can not leave them like that !" :-P [/i]
[i]Das tägliche Stoßgebet: [b]Oh Herr, wirf Hirn vom Himmel ![/b][/i]

Paul - Westhouse IT

Quote from: DarkViper on May 25, 2010, 12:01:20 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
Westhouse IT - Professional WebsiteBaker developers for hire.

snark

Quote from: Mte90 on September 08, 2009, 12:19:40 PM
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?

DarkViper

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.
[url=http://www.youtube.com/watch?v=tmzDAz6ZvFQ]Der blaue Planet[/url] - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen[br]
[i]"You have to take the men as they are... but you can not leave them like that !" :-P [/i]
[i]Das tägliche Stoßgebet: [b]Oh Herr, wirf Hirn vom Himmel ![/b][/i]

redWhite

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?

Mte90

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.
[url="//www.mte90.net"]www.mte90.net[/url] - Debian, Kde e programmazione!
Mp per richieste personali verranno cestinate!

crnogorac081

Try this code:


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


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

cheers
Web developer

Mte90

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?
[url="//www.mte90.net"]www.mte90.net[/url] - Debian, Kde e programmazione!
Mp per richieste personali verranno cestinate!


Mte90

modify [wblinkXX] in [[wblinkXX]] is no problem.
but a way to make a droplet to use this command?
[url="//www.mte90.net"]www.mte90.net[/url] - Debian, Kde e programmazione!
Mp per richieste personali verranno cestinate!

erpe0812

Hi

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

rgds

erpe

Mte90

#1

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

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";
[url="//www.mte90.net"]www.mte90.net[/url] - Debian, Kde e programmazione!
Mp per richieste personali verranno cestinate!