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


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • The solution for Short (SEO Friendly) URL's
  • Print
Pages: 1 ... 4 5 [6] 7   Go Down

Author Topic: The solution for Short (SEO Friendly) URL's  (Read 184149 times)

Offline N1kko

  • Posts: 137
  • Gender: Male
Re: The solution for Short (SEO Friendly) URL's
« Reply #125 on: September 24, 2013, 11:30:04 AM »
Droplet says invalid php code  :? I'm using WB 2.8.3 latest version with this droplet code

Code: [Select]
global $wb;
$wb->preprocess( $wb_page_data);
$linkstart = WB_URL.PAGES_DIRECTORY;
$linkend = PAGE_EXTENSION;
$nwlinkstart = WB_URL;
$nwlinkend = \'/\';

preg_match_all(\'~\'.$linkstart.\'(.*?)\\\\\'.$linkend.\'~\', $wb_page_data, $links);
foreach ($links[1] as $link) {
    $wb_page_data = str_replace($linkstart.$link.$linkend, $nwlinkstart.$link.$nwlinkend, $wb_page_data);
}
return true;
Logged
My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them

Offline badknight

  • WebsiteBaker Org e.V.
  • **
  • Posts: 819
  • Gender: Male
    • pinzweb
Re: The solution for Short (SEO Friendly) URL's
« Reply #126 on: September 24, 2013, 11:39:51 AM »
there are many erros

(e.g "nwlinkend, preg_match_all,..) look at the php - Info  is there magic_quotes_gpc on? (http://php.net/manual/en/security.magicquotes.php)

Logged
Ich würde gern die Welt verändern, doch Gott gibt mir den Quellcode nicht...

Offline N1kko

  • Posts: 137
  • Gender: Male
Re: The solution for Short (SEO Friendly) URL's
« Reply #127 on: September 24, 2013, 11:47:59 AM »
Thanks badknight,

Yes magic quotes are on on my host, is there a way to fix the short url droplet? I'm no php expert at all  :?
Logged
My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them

Offline N1kko

  • Posts: 137
  • Gender: Male
Re: The solution for Short (SEO Friendly) URL's
« Reply #128 on: September 24, 2013, 12:08:16 PM »
Is this error with server or caused by WB Revision 1960?
Logged
My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them

Offline N1kko

  • Posts: 137
  • Gender: Male
Re: The solution for Short (SEO Friendly) URL's
« Reply #129 on: September 24, 2013, 12:38:41 PM »
Magic quotes now off, but droplet still says php errors :?
Logged
My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: The solution for Short (SEO Friendly) URL's
« Reply #130 on: September 24, 2013, 12:43:20 PM »
i work on it... ;-)
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 !

Offline N1kko

  • Posts: 137
  • Gender: Male
Re: The solution for Short (SEO Friendly) URL's
« Reply #131 on: September 24, 2013, 12:46:54 PM »
Quote from: DarkViper on September 24, 2013, 12:43:20 PM
i work on it... ;-)

Thanks DarkViper :-D
Logged
My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: The solution for Short (SEO Friendly) URL's
« Reply #132 on: September 24, 2013, 06:47:11 PM »
Quote from: N1kko on September 24, 2013, 11:30:04 AM
Droplet says invalid php code  :? I'm using WB 2.8.3 latest version with this droplet code

First please disengage magic_quotes, because newer code does not care for.

Code: [Select]
<?php // for syntax highlighting only!

$sSearchPattern = '/' . preg_quote(WB_URL . PAGES_DIRECTORY, '/') . '(.*?)'
                
. preg_quote(PAGE_EXTENSION, '/') . '/';
if(
preg_match_all($sSearchPattern, $wb_page_data, $aMatches))
{
foreach($aMatches[1] as $sLink)
{
$wb_page_data = str_replace(WB_URL . PAGES_DIRECTORY . $sLink . PAGE_EXTENSION,
                            WB_URL . $sLink . '/',
                            $wb_page_data
                           );
}
}
return 
'';


Sorry for delay... 
But today I had to go out and enjoy the afternoon sun.  8-)
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 !

Offline N1kko

  • Posts: 137
  • Gender: Male
Re: The solution for Short (SEO Friendly) URL's
« Reply #133 on: September 26, 2013, 09:26:05 PM »
Thanks for this, I have added the new droplet code but still getting error and short urls not working  :?
Logged
My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them

daydreamer

  • Guest
Re: The solution for Short (SEO Friendly) URL's
« Reply #134 on: November 14, 2013, 04:36:24 PM »
How do I get it to work with a subdomain please?
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: The solution for Short (SEO Friendly) URL's
« Reply #135 on: November 14, 2013, 05:02:26 PM »
Quote from: daydreamer on November 14, 2013, 04:36:24 PM
How do I get it to work with a subdomain please?
It should work fine on subdomains.
What is not working in your case?
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

daydreamer

  • Guest
Re: The solution for Short (SEO Friendly) URL's
« Reply #136 on: November 14, 2013, 06:54:17 PM »
Hi Rudd,

I have attached an image to show the error
Logged

daydreamer

  • Guest
Re: The solution for Short (SEO Friendly) URL's
« Reply #137 on: November 14, 2013, 07:54:41 PM »
Now working with this

RewriteRule ^([\/\sa-zA-Z0-9._-]+)$ /baker/short.php?_wb=$1 [QSA,L]

Thanks
Rudd
Logged

daydreamer

  • Guest
Re: The solution for Short (SEO Friendly) URL's
« Reply #138 on: February 19, 2014, 03:28:49 PM »
Bakery add to cary and view cart not working unless I remove mod rewrite from htaccess  :?
Logged

jacobi22

  • Guest
Re: The solution for Short (SEO Friendly) URL's
« Reply #139 on: February 19, 2014, 03:37:12 PM »
you can use the module simplepagehead - it works with bakery

Download here -> http://www.websitebakers.com/pages/modules/various/simple-page-head.php


forget it ...  & sorry
Logged

daydreamer

  • Guest
Re: The solution for Short (SEO Friendly) URL's
« Reply #140 on: February 19, 2014, 05:05:59 PM »
I'm using simple pagehead already Thanks  :-D
Logged

jacobi22

  • Guest
Re: The solution for Short (SEO Friendly) URL's
« Reply #141 on: February 19, 2014, 05:35:34 PM »
i read another thread in a second window - my answer was correct, but in the wrong thread  :oops: :wink:

but for your problem.....
i use on my page the old btw first version from the short-url-script
i add a field in the database-table "pages", called seo_url
then i change the seo_tool from Stefek, so that i can change the entry for this field.
for every page i add this seo_link-name in the database
in the frontend i have links like www.myDomain/home - without a file-typ at the end
then i change the ShortUrl-Droplet to read-out this field seo_link (and not link)

forget a little...
you have to change the select in the short.php too

i dont test it in bakery, but it works in news - if you have no seo_link (like news-postings oder bakery-pages, the script use the normal link

maybe, thats a solution for you too
« Last Edit: February 19, 2014, 05:47:17 PM by jacobi22 »
Logged

Offline rjgamer

  • Posts: 117
Re: The solution for Short (SEO Friendly) URL's
« Reply #142 on: June 30, 2014, 08:22:12 AM »
Is it possible to translate URL's from other droplets to short url's?


Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: The solution for Short (SEO Friendly) URL's
« Reply #143 on: June 30, 2014, 10:08:21 AM »
Quote from: rjgamer on June 30, 2014, 08:22:12 AM
Is it possible to translate URL's from other droplets to short url's?
It is not possible to controll the order of the droplets being executed, so you cannot make sure the shorturl droplet is executed last. That is the reason why some droplet-generated-links will be translated and some not.

The trick is:

Create a droplet that just generates your shorturl droplet as output.
The droplet engine (in WB 2.8.3) will process all found droplets. When it's finished it will check again if new droplets are found.
So, steps to follow:

1. create the normal [[shorturl]] droplet first.
2. create a droplet called [[shorturlloader]] with the content:
Code: [Select]
return '[[shorturl]]';3. put [[shorturlloader]] in your template (remove [[shorturl]] if it was already there).

That does it for me.

Note that the "other droplets" will need to output full url's (including the domain), otherwise they will not be detected as internals.



Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline noolexy

  • Posts: 3
Re: The solution for Short (SEO Friendly) URL's
« Reply #144 on: August 20, 2014, 04:09:17 AM »
Hi,

I have the latest version of Bakery 1.7.0 and the latest version of WebsiteBaker Shorturls Version 3.0. Everything works fine until the user clicks the submit button to check out after adding the product to their cart. It doesn't allow them to put their address, but simply takes them back to the store (Bakery). Any suggestions? Thank you.
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: The solution for Short (SEO Friendly) URL's
« Reply #145 on: August 20, 2014, 10:45:39 AM »
Looking at the site you sent by mail, it seems to me you are not including the shorturl droplet in your template.

Not related to this prblem, your website has javascript (and CSS loading) errors that will make Bakery not function correctly.
An extra tip: Your homepage is loading about 16Mb on images, making the time to load for me something like 20 seconds.
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline noolexy

  • Posts: 3
Re: The solution for Short (SEO Friendly) URL's
« Reply #146 on: August 20, 2014, 06:26:55 PM »
Hi Ruud,

Thanks for getting back to me  :-)

I will resize my images. I think I fixed the css and js problems.

When I add the droplet to my template, it comes back blank.

This is what I am using:

Code: [Select]
//:create short url's
//:
//Shorturl - remove pages/php from links
global $wb;
$wb->preprocess($wb_page_data);
$linkstart = WB_URL.PAGES_DIRECTORY;
$linkend = PAGE_EXTENSION;
$nwlinkstart = WB_URL;
$nwlinkend = '/';

preg_match_all('~'.$linkstart.'(.*?)\\'.$linkend.'~', $wb_page_data, $links);
foreach ($links[1] as $link) {
    $wb_page_data = str_replace($linkstart.$link.$linkend, $nwlinkstart.$link.$nwlinkend, $wb_page_data);
}
return true;

Thanks for your help.
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: The solution for Short (SEO Friendly) URL's
« Reply #147 on: August 20, 2014, 11:00:56 PM »
Without the droplet shorturl will not function!
Try switching on the error reporting (advanced settings page) and see if an error is shown.

Note that the droplet should be somewhere in the HTML part of the template.
For example just after the </html>
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline noolexy

  • Posts: 3
Re: The solution for Short (SEO Friendly) URL's
« Reply #148 on: August 21, 2014, 01:52:08 AM »
Thank you! It worked.

I was putting it in the php coding part, I guess that's why it didn't work. Thank you again for your assistance  :wink:
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: The solution for Short (SEO Friendly) URL's
« Reply #149 on: April 24, 2015, 10:31:14 AM »
Quote from: jacobi22 on August 01, 2013, 01:16:16 PM
in my own page i use the older version of the short-url-script and it works without problem
in a new local wb 2.8.4 project i test the shorturl 3.0 and i have only 404-Errors
the rewrite works in the links and in the adress line from the browser.
Whats the problem here?

Normally i deactiviate the .htaccess on local systems. It's easier as comment out some things like rewrite non-www to www.
This is the reason why i never tested shorturl local.
Today, in a test with shorturl3 and wb283 i can see only (except startpage and searchpage):
Not Found
The requested URL /short.php was not found on this server.
Apache/2.4.10 (Win32) OpenSSL/1.0.1h PHP/5.4.31 Server at localhost Port 4001


What can be the reason?
Logged
https://onkel-franky.de

  • Print
Pages: 1 ... 4 5 [6] 7   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • The solution for Short (SEO Friendly) URL's
 

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