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 »
  • [Solved] Droplet [wblink?id=idnumber]
  • Print
Pages: [1]   Go Down

Author Topic: [Solved] Droplet [wblink?id=idnumber]  (Read 13186 times)

Offline Mte90

  • Posts: 93
  • Gender: Male
  • Italian Section Moderator and Translator
[Solved] Droplet [wblink?id=idnumber]
« on: July 29, 2009, 09:45:53 AM »

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

Code: [Select]
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, 12:22:08 PM by Mte90 »
Logged
www.mte90.net - Debian, Kde e programmazione!
Mp per richieste personali verranno cestinate!

erpe0812

  • Guest
Re: Droplet to use [wblinkXX] out the wyswyg area?
« Reply #1 on: July 29, 2009, 10:04:40 AM »
Hi

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

rgds

erpe
Logged

Offline Mte90

  • Posts: 93
  • Gender: Male
  • Italian Section Moderator and Translator
Re: Droplet to use [wblinkXX] out the wyswyg area?
« Reply #2 on: July 29, 2009, 02: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!

erpe0812

  • Guest
Re: Droplet to use [wblinkXX] out the wyswyg area?
« Reply #3 on: July 29, 2009, 02:36:07 PM »
No  :-D

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

Offline Mte90

  • Posts: 93
  • Gender: Male
  • Italian Section Moderator and Translator
Re: Droplet to use [wblinkXX] out the wyswyg area?
« Reply #4 on: August 10, 2009, 05: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!

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: [Request] Droplet to use [wblink=XX]?
« Reply #5 on: August 11, 2009, 01:32:53 AM »
Try this code:

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

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

cheers
Logged
Web developer

Offline Mte90

  • Posts: 93
  • Gender: Male
  • Italian Section Moderator and Translator
Droplet to use [wblink=XX]?
« Reply #6 on: September 08, 2009, 12:19:40 PM »
Code: [Select]
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

  • Guest
Re: [Solved] Droplet [wblink?id=idnumber]
« Reply #7 on: May 25, 2010, 10: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

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: [Solved] Droplet [wblink?id=idnumber]
« Reply #8 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.
Logged
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"We need education to cope with digitalization - and NOT the digitalization of education.!"

Tägliches Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

snark

  • Guest
Re: Droplet to use [wblink=XX]?
« Reply #9 on: June 02, 2010, 07:59:59 AM »
Quote from: Mte90 on September 08, 2009, 12:19:40 PM
Code: [Select]
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

Offline Paul - Westhouse IT

  • Posts: 75
    • Westhouse IT
Re: [Solved] Droplet [wblink?id=idnumber]
« Reply #10 on: November 12, 2010, 02:11:05 PM »
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
Logged
Westhouse IT - Professional WebsiteBaker developers for hire.

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: [Solved] Droplet [wblink?id=idnumber]
« 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
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"We need education to cope with digitalization - and NOT the digitalization of education.!"

Tägliches Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • [Solved] Droplet [wblink?id=idnumber]
 

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