Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 27, 2012, 05:15:45 AM
1 Hour
1 Day
1 Week
1 Month
Forever
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
.
155555
Posts in
21715
Topics by
7737
Members
Latest Member:
gx-world
WebsiteBaker Community Forum
English
WebsiteBaker 2.x discussion
(Moderator:
Argos
)
Nofollow pages
Pages: [
1
]
Go Down
Author
Topic: Nofollow pages (Read 4778 times)
inventric
Offline
Posts: 3
Nofollow pages
«
on:
April 29, 2005, 02:28:15 AM »
Website baker is so great at search engine optimization, it would also be a great thing in its bag of tricks if it could create pages that won't be spidered.
One way of doing this I was thinking is if there was yet another page type like "nofollow", and its a descendant in a way of public. Meaning, like public the page shows up in the menu and anyone can get it (i.e. like a privacy policy, etc.) but the menu links is an anchor with a rel="nofollow" attribute (Google's way of knowing not to give value to this link).
-Nate
Logged
fienieg
Guest
Nofollow pages
«
Reply #1 on:
April 29, 2005, 03:04:36 PM »
A no flow, should be included in a robots.txt file
Logged
Ryan
Offline
Posts: 2048
Nofollow pages
«
Reply #2 on:
April 30, 2005, 01:08:10 AM »
Yes, please use robots.txt - adding these kinds of features to WB will just make things confusing.
Logged
Website Baker Project Founder
www.websitebaker.or
g
To contact me via email, visit:
www.ryandjurovich.c
om
cmlawson
Offline
Posts: 43
Re: Nofollow pages
«
Reply #3 on:
May 02, 2007, 10:33:58 PM »
It's too bad you feel this way because using the 'nofollow' tag on links actually helps you build your search rank, if done right. Maybe you could have a little checkbox attribute in the 'Change Settings' part of the page?
Logged
marathoner
Offline
Posts: 495
Re: Nofollow pages
«
Reply #4 on:
May 23, 2007, 11:00:53 PM »
I simply added a line of code to my template to do this. I didn't want robots following my photo gallery since that's a lot of bandwidth. My Photo Gallery page starts at page=14 so I added this to my template:
Code:
<?php
if (
is_parent
(
$page_id
) ==
14
) { echo
"<meta name=\"robots\" content=\"nofollow\" />\n"
;}
?>
Logged
cmlawson
Offline
Posts: 43
Re: Nofollow pages
«
Reply #5 on:
May 24, 2007, 10:36:42 PM »
That's a great solution! Thanks for sharing.
I'd still like mod something so I can have the nofollow attribute on some of my links in the menu bar. I wonder if I could use what you have there to come up with something. If you have any ideas, please feel free to suggest. I'm coming from VB.NET and asp so I trip on PHP language stuff a lot.
~cml
Logged
Argos
Moderator
Offline
Posts: 2161
Re: Nofollow pages
«
Reply #6 on:
July 23, 2008, 02:54:17 PM »
Quote from: marathoner on May 23, 2007, 11:00:53 PM
I simply added a line of code to my template to do this. I didn't want robots following my photo gallery since that's a lot of bandwidth. My Photo Gallery page starts at page=14 so I added this to my template:
Code:
<?php
if (
is_parent
(
$page_id
) ==
14
) { echo
"<meta name=\"robots\" content=\"nofollow\" />\n"
;}
?>
Great, I was looking for this. Thanks! Would be nice to have this in the page settings admin though.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Argos
Moderator
Offline
Posts: 2161
Re: Nofollow pages
«
Reply #7 on:
July 25, 2008, 03:30:55 PM »
Well, I tried this, but the browser stops showing the page right before this piece of code. So the php must be wrong somehow.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
aldus
Offline
Posts: 1238
Re: Nofollow pages
«
Reply #8 on:
July 25, 2008, 03:41:41 PM »
Looks to me like the function "is_parent" isn't declared at all ...
What errors are shown if you set the errorlevel to E_ALL in the options?
Regards
Aldus
«
Last Edit: July 25, 2008, 03:45:59 PM by aldus
»
Logged
Argos
Moderator
Offline
Posts: 2161
Re: Nofollow pages
«
Reply #9 on:
July 25, 2008, 03:49:13 PM »
Quote from: aldus on July 25, 2008, 03:41:41 PM
Could it be that the function "is_parent" not declared?
What errors are shown if you set the errorlevel to E_ALL in the options?
Fatal error: Call to undefined function: is_parent() in /home/httpd/vhosts/my_domainname_here/httpdocs/wb/templates/custom/index.php on line 41
What to do? I'm no coder, so I'm afraid I need copy&paste instructions
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
aldus
Offline
Posts: 1238
Re: Nofollow pages
«
Reply #10 on:
July 25, 2008, 04:08:26 PM »
Code:
<?php
/**
* simple first hack
*/
if (
$page_id
>=
14
) echo
"<meta name=\"robots\" content=\"nofollow\" />\n"
;
?>
Maybe you are in the need to change the 14 (page_number). As i don't know
how you will use it; as for one or more pages ...
Regards
Aldus
Logged
Argos
Moderator
Offline
Posts: 2161
Re: Nofollow pages
«
Reply #11 on:
July 25, 2008, 04:18:34 PM »
Of course I had replaced the ID with the one I want to use it for. So I have 34 instead of 14. But you asked if the "is_parent" was declared, and it seems it wasn't. So, how to do that?
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
aldus
Offline
Posts: 1238
Re: Nofollow pages
«
Reply #12 on:
July 25, 2008, 04:23:21 PM »
As you can see in the code-snip you are not in the need of this function right here.
Copy n' paste - tell me what's happend.
Code:
<?php
/**
* simple first hack
*/
if (
$page_id
==
34
) echo
"<meta name=\"robots\" content=\"nofollow\" />\n"
;
?>
Regards
Aldus
Logged
Argos
Moderator
Offline
Posts: 2161
Re: Nofollow pages
«
Reply #13 on:
July 25, 2008, 04:41:20 PM »
Ah! I'm sorry, now I see... I didn't understand you gave me an alternative
Yes, this works fine. Thank you!
Two follow-up questions:
1. How can I add more ID's?
2. And how can I combine these two lines?
<meta name="robots" content="nofollow,noindex">
<meta name="googlebot" content="nofollow,noindex,nocache,nosnippet">
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Stefek
WebsiteBaker Org e.V.
Offline
Posts: 4884
Re: Nofollow pages
«
Reply #14 on:
July 25, 2008, 04:55:15 PM »
Hello.
This is a helpful snippet!
I think it's a missing feature in the WebsiteBaker CMS.
Isn't it possible to create a "Admin Module" for this (I'm no coder at all
)
I have a idea of a list of all the pages created, where you could select either you want the robots to follow this page or not.
And it were a good thing for the next release of wb 2.7.x (where you could select the robots thing from inside the "Page-Settings")
Best Regards,
Stefek
Logged
"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
Argos
Moderator
Offline
Posts: 2161
Re: Nofollow pages
«
Reply #15 on:
July 25, 2008, 04:59:00 PM »
I agree, admin module or page settings option would be great!
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
aldus
Offline
Posts: 1238
Re: Nofollow pages
«
Reply #16 on:
July 25, 2008, 05:08:11 PM »
Edit: remove buggy code
Now you can add more ID's in the $ids - array and also add more metatags ..
Regards
Aldus
«
Last Edit: July 25, 2008, 06:32:20 PM by aldus
»
Logged
Argos
Moderator
Offline
Posts: 2161
Re: Nofollow pages
«
Reply #17 on:
July 25, 2008, 05:54:28 PM »
Not yet
Parse error: parse error, unexpected '}', expecting ')' in /home/httpd/vhosts/my_domainname_here/httpdocs/wb/templates/custom/index.php on line 48
«
Last Edit: July 25, 2008, 05:56:54 PM by Argos
»
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
aldus
Offline
Posts: 1238
Re: Nofollow pages
«
Reply #18 on:
July 25, 2008, 06:26:41 PM »
Code:
<?php
/**
* @version 0.1.2
* @build 4
* @date 2008-07-25
* @author aldus *
* @package webside-baker
* @state @dev
* @require WB2.7
*
*/
$ids
= Array (
34
,
55
,
66
,
723
);
$meta_tags
= Array (
"<meta name=\"robots\" content=\"nofollow\" />\n"
,
"<meta name=\"googlebot\" content=\"nofollow,noindex,nocache,nosnippet\" />\n"
);
if (
true
===
in_array
(
$page_id
,
$ids
) ) echo
implode
(
""
,
$meta_tags
) ;
?>
Apologize for that -
i know: first test - then post ...
Regards
Aldus
«
Last Edit: July 25, 2008, 07:32:15 PM by aldus
»
Logged
Argos
Moderator
Offline
Posts: 2161
Re: Nofollow pages
«
Reply #19 on:
July 25, 2008, 11:47:42 PM »
Nice, it's working like a charm now! I added one line just before the closing php-tag:
Code:
else echo "<meta name=\"robots\" content=\"index,follow\" />\n", "<meta name=\"googlebot\" content=\"index,follow\" />\n";
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
aldus
Offline
Posts: 1238
Re: Nofollow pages
«
Reply #20 on:
July 26, 2008, 08:08:43 AM »
Code:
<?php
/**
* @version 0.2.0
* @build 5
* @date 2008-07-26
* @author aldus *
* @package webside-baker
* @state @dev
* @require WB2.7
*
*/
$ids
= Array (
34
,
55
,
66
,
723
);
$meta_tags
= Array (
"<meta name=\"robots\" content=\"nofollow\" />\n"
,
"<meta name=\"googlebot\" content=\"nofollow,noindex,nocache,nosnippet\" />\n"
);
echo (
in_array
(
$page_id
,
$ids
) ) ?
implode
(
""
,
$meta_tags
) :
"<meta name=\"robots\" content=\"index,follow\" />\n<meta name=\"googlebot\" content=\"index,follow\" />\n"
;
?>
To get rid of the "if-then-else" at this point and the unnecessary "," in the "else"-echo.
Regards
Aldus
Logged
Argos
Moderator
Offline
Posts: 2161
Re: Nofollow pages
«
Reply #21 on:
July 26, 2008, 11:05:53 AM »
Wonderful, Aldus!
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
wbaker
Offline
Posts: 46
Re: Nofollow pages
«
Reply #22 on:
September 07, 2008, 04:24:39 PM »
solved:
http://www.websitebaker2.org/forum/index.php/topic,10965.0.html
Logged
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...