PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Susann
Moderator


Joined: Dec 19, 2004
Posts: 3143
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Fri Jul 06, 2007 10:35 am Reply with quote Back to top

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 ?
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Fri Jul 06, 2007 12:06 pm Reply with quote Back to top

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.
View user's profile Send private message
Susann
Moderator


Joined: Dec 19, 2004
Posts: 3143
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Fri Jul 06, 2007 1:36 pm Reply with quote Back to top

Its possible I think by using Java SCR. because bots don´t follow usally such links.
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Fri Jul 06, 2007 2:38 pm Reply with quote Back to top

What is Java SCR?
View user's profile Send private message
Susann
Moderator


Joined: Dec 19, 2004
Posts: 3143
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Fri Jul 06, 2007 3:47 pm Reply with quote Back to top

With Javascrip-t
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Fri Jul 06, 2007 5:55 pm Reply with quote Back to top

Actually, check out kguske's code in the nuke_WYSIWYG function within mainfile.php. I think he checks to see that cookies are enabled?
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Fri Jul 06, 2007 10:28 pm Reply with quote Back to top

But do guests have cookies?
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Sat Jul 07, 2007 7:22 am Reply with quote Back to top

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?
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Sat Jul 07, 2007 10:30 am Reply with quote Back to top

Yes I see and I agree that is a cool trick Smile Exclamation, 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?
View user's profile Send private message
mars
Worker
Worker


Joined: Jul 08, 2006
Posts: 123
Location: Bloomsburg,Pennsylvania

PostPosted: Sat Jul 07, 2007 11:59 am Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Sat Jul 07, 2007 1:10 pm Reply with quote Back to top

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
View user's profile Send private message Visit poster's website
mars
Worker
Worker


Joined: Jul 08, 2006
Posts: 123
Location: Bloomsburg,Pennsylvania

PostPosted: Sat Jul 07, 2007 1:52 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Sat Jul 07, 2007 3:07 pm Reply with quote Back to top

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.
View user's profile Send private message
Susann
Moderator


Joined: Dec 19, 2004
Posts: 3143
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Sat Jul 07, 2007 3:54 pm Reply with quote Back to top

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
View user's profile Send private message Visit poster's website
mars
Worker
Worker


Joined: Jul 08, 2006
Posts: 123
Location: Bloomsburg,Pennsylvania

PostPosted: Sat Jul 07, 2007 4:54 pm Reply with quote Back to top

It is a standard that google has adopted for just this purpose, and you can use the robots.txt file for all other things as well.
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Visit poster's website
Susann
Moderator


Joined: Dec 19, 2004
Posts: 3143
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Sat Jul 07, 2007 5:31 pm Reply with quote Back to top

Maybe it works for those button maybe not.
I should try it out but I know form different guys that this didn´t worked like it should.

Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

PostPosted: Sun Jul 08, 2007 6:50 am Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website
mars
Worker
Worker


Joined: Jul 08, 2006
Posts: 123
Location: Bloomsburg,Pennsylvania

PostPosted: Sun Jul 08, 2007 8:50 am Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

PostPosted: Sun Jul 08, 2007 10:29 am Reply with quote Back to top

Thats a great idea.
Susann - I'm working on this now and should have the files for you very soon.
View user's profile Send private message Send e-mail Visit poster's website
Susann
Moderator


Joined: Dec 19, 2004
Posts: 3143
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Sun Jul 08, 2007 10:45 am Reply with quote Back to top

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
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

PostPosted: Sun Jul 08, 2007 10:52 am Reply with quote Back to top

The two files in the download link below will hide the buttons and links for;
New Post
Reply Post
Quote
from all anonymous users
Only registered users can see links on this board!
Get registered or login to the forums!


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.
View user's profile Send private message Send e-mail Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

PostPosted: Sun Jul 08, 2007 10:59 am Reply with quote Back to top

Actually, they will also hide the PM and Profile buttons too Smile
View user's profile Send private message Send e-mail Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Mon Jul 09, 2007 5:56 am Reply with quote Back to top

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
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Mon Jul 09, 2007 5:58 am Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Mon Jul 09, 2007 7:17 am Reply with quote Back to top

montego, ah cool, I will try it. I'm curious now how this is working. Thanks.
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum