Author |
Message |
Susann
Moderator
![](modules/Forums/images/avatars/4e3210db4efb891870d79.gif)
Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support
|
Posted:
Fri Jul 06, 2007 10:35 am |
|
I would like to hide 2 buttons in my forum like Post reply and New topic.
The buttons should only not be visible for searchengines but visible for all other quests.
I´m using theme fisubice.
Any ideas how to hide this ? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Gremmie
Former Moderator in Good Standing
![](modules/Forums/images/avatars/0cd76dcf45da5de2cf864.jpg)
Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA
|
Posted:
Fri Jul 06, 2007 12:06 pm |
|
That would be kind of difficult I think. I think you would have to check the user agent string and then somehow decide if the user is a bot crawling your site or a real person. That could be error prone also, as some bots probably don't behave and use user agent string values that make them look like normal users. |
_________________ Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Susann
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jul 06, 2007 1:36 pm |
|
Its possible I think by using Java SCR. because bots don´t follow usally such links. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Gremmie
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jul 06, 2007 2:38 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Susann
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jul 06, 2007 3:47 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Fri Jul 06, 2007 5:55 pm |
|
Actually, check out kguske's code in the nuke_WYSIWYG function within mainfile.php. I think he checks to see that cookies are enabled? |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Gremmie
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jul 06, 2007 10:28 pm |
|
But do guests have cookies? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jul 07, 2007 7:22 am |
|
Well, this works. Try enabling Submit News module to All Visitors and then make sure you are not logged in. When you go to Submit News as anonymous (and the advanced editor is turned on), you still see the editor right? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Gremmie
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jul 07, 2007 10:30 am |
|
Yes I see and I agree that is a cool trick , but she wants no links for search engine bots but links for human non-member guests. That's why the user agent string came to my mind, but I don't think that is very reliable. Maybe there is a robots.txt setting that nice bots will behave? Probably not reliable either...
I'm not familiar with this javascript link idea you mentioned Susann. Do you have a link to an article describing this technique or more explanation? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mars
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jul 08, 2006
Posts: 123
Location: Bloomsburg,Pennsylvania
|
Posted:
Sat Jul 07, 2007 11:59 am |
|
A quick fix for that would be to add the rel="nofollow" to the link on the buttons in viewtopic_body.tpl
Code:
<a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" alt="{L_POST_NEW_TOPIC}" title="{L_POST_NEW_TOPIC}" /></a><a href="{U_POST_REPLY_TOPIC}" rel="nofollow"><img src="{REPLY_IMG}" alt="{L_POST_REPLY_TOPIC}" hspace="8" title="{L_POST_REPLY_TOPIC}" /></a>
|
This tells googlebot and most of the major search engine bots to not follow that link. |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jul 07, 2007 1:10 pm |
|
mars, that is an excellent suggestion! Thanks.
Gremmie, regarding this:
Quote: |
but she wants no links for search engine bots but links for human non-member guests
|
Unless I am missing something, that is exactly the same use model that kguske employed within the nukeW functions referenced. Susann basically just wants to make sure that search engines (only) cannot crawl those links. It is actually an age-old SEO problem with forum type tools. There are way too many ways to reference the exact same page.
However, to be honest, that is less of an issue these days at least with the more commonly used forum tools. I have read that Google's algorithms are now smart enough to recognize these few very popular tools and does not penalize the web site.
However, I still see why Susann wants to not show the other buttons. They are completely unnecessary and also why make these links "findable" within the SE's so that automated attacks can be taken up... ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mars
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jul 07, 2007 1:52 pm |
|
Thanks!
Also for the robots.txt idea, you can use wildcards to stop bots from accessing pages and directories for example if you put the following at the bottom of robots.txt in your root folder
Disallow: /admin
Disallow: *memberlist*
Disallow: *Private_Messages*
Disallow: *profile*
It will block COMPLIANT bots like Google,MSN and Yahoo from accessing the admin folder, the memberlist module, private messages and profiles. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Gremmie
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jul 07, 2007 3:07 pm |
|
montego, sorry to beat a dead horse, but the wysiwyg editor checks for a cookie and either displays the new editor or the old textarea.
But neither bots nor non-member guests have cookies, so they would not see any links. But she said she still wanted guests to see the links. Without a cookie you only have a few things left to tell if they are human: IP address, user agent string, and....? And none of those are really very good indicators.
I like the rel="nofollow" idea, but I see it isn't standard. Still if google obeys it that should be a big plus. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Susann
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jul 07, 2007 3:54 pm |
|
Gremmie, I know how tho hide those buttons for all but Montego hit the nail on the head. He gave me an idea. I also know that Java Script doesn´t work always and therefore that wouldn´t be an optimal solution.
Mars can you confirm that rel=nofollow works did you checked your logs for a certain time ? I think that doesn´t work. But who knows |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mars
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jul 07, 2007 4:54 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Susann
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jul 07, 2007 5:31 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Sun Jul 08, 2007 6:50 am |
|
Surely you could use the standard nuke is_user function?
Thanks for bring this up again Susann, it is also something I have been meaning to look at for some time.
As all my forums are set so that only registered users can post, relpay and quote I do not want those links picking up my search engines anyway. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mars
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jul 08, 2007 8:50 am |
|
You can wrap the buttons in the phpbb is user functions, you need to make sure that the BEGIN and END lines are on seperate lines in the code.
The code below is the top set of buttons in viewtopic_body.tpl
Code:
<!-- BEGIN switch_user_logged_in -->
<a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" alt="{L_POST_NEW_TOPIC}" title="{L_POST_NEW_TOPIC}" /></a><a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" alt="{L_POST_REPLY_TOPIC}" hspace="8" title="{L_POST_REPLY_TOPIC}" /></a>
<!-- END switch_user_logged_in -->
|
You would need to do this for the post and reply buttons, along with any quote buttons as well. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jul 08, 2007 10:29 am |
|
Thats a great idea.
Susann - I'm working on this now and should have the files for you very soon. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Susann
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jul 08, 2007 10:45 am |
|
Cool Guardian !
User-friendly would be to show this button "post reply" and "new topic" because it can confuse site visitors and the result is that you loose potential new members. Ever thought about this ?
However, the most of my forums links are not visible for all but I lost 40.000 indexed pages a year ago and they never came back therefore I´m very careful with optimation within in the forum. |
Last edited by Susann on Sun Jul 08, 2007 10:55 am; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jul 08, 2007 10:52 am |
|
The two files in the download link below will hide the buttons and links for;
New Post
Reply Post
Quote
from all anonymous users
http://www.code-authors.com/download-file-21.html
These files are modified from the RN 2.10 fisubice theme.
If you are using a different theme you can use them as a guide. If you are using a theme that does not have forum files, use these as a guide for modifying the forum subSilver template files. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jul 08, 2007 10:59 am |
|
Actually, they will also hide the PM and Profile buttons too ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jul 09, 2007 5:56 am |
|
I am confused. Susann, I thought that you ONLY want to exclude search engines from seeing these buttons? The is_user function checks to see that you have a registered |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jul 09, 2007 5:58 am |
|
Gremmie
I hear what you are saying, but try it in practice. It works! All I can say is that when I come to my site as an anonymous user (after clearing ALL cookies even), and then go to Submit News, the editor shows. This means that this check in mainfile is also checking to see that cookies are enable or not. That was the whole point of kguske putting that in there so that the editor would not be "crawled" and therefore bandwidth possibly wasted for no good reason.
That is the behavior that I thought Susann was after. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Gremmie
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jul 09, 2007 7:17 am |
|
montego, ah cool, I will try it. I'm curious now how this is working. Thanks. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|