11Tami Posted October 20, 2007 Share Posted October 20, 2007 Hello, need help with this, not sure how to do it. I need a text link on my page so that if it is clicked on a few other text links will appear, then if they are clicked on others will appear and so on. But the tricky part is I also need the links to be followed like normal links are, by search engines. I know I could do some php that if such and such link on is clicked then do this and show the other text link. But how can they be listed so search engines will follow them, even if they aren't clicked on yet? Please let me know, thank you. Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted October 20, 2007 Share Posted October 20, 2007 I don't fully understand what you are asking could you please rephrase your question? Quote Link to comment Share on other sites More sharing options...
11Tami Posted October 20, 2007 Author Share Posted October 20, 2007 Thanks I'll try. Maybe doing it visually will help. The first text link on a page: I am text link 1 that leads to another page. When I am clicked on two other text links appear  I am text link 2 that appears only when the first one was clicked on I am text link 3 that appears only when the first one was clicked on  I am text link 4 that appears only when 2 was clicked on I am text link 5 that appears only when 2 was clicked on  I am text link 6 that appears only when 3 was clicked on I am text link 7 that appears only when 3 was clicked on  on it goes.  As shown certain next links only appear when some links are clicked on. All that I can pretty easily set up with php. Since I would probably need php "if" statements for example: <?php $1=<a href='http://thewebpageforthislinkhere'>I am text link 1 that leads to another page. When I am clicked on two other text links appear</a>; if ($1) { echo "<a href='http://thewebpageforthelinkhere'>I am text link 2 that appears only when the first one was clicked on</a>"; echo "<a href='http://thewebpageforthelinkhere'>I am text link 3 that appears only when the first one was clicked on</a>"; } ?>  All that should work. But the part I am stuck on is how to get the big search engines to follow all these links? How to get the big search engines to read them all like regular links on any page and to follow them? Because it doesn't do a whole lot of good for me to set up a bunch of links if the biggest search engines can't even find their pages.  Please let me know, thanks. Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted October 20, 2007 Share Posted October 20, 2007 What you are trying to do will throw syntax errors. <?php echo "<a href='http://thewebpageforthislinkhere'>I am text link 1 that leads to another page. When I am clicked on two other text links appear</a>"; if (<a href='http://thewebpageforthislinkhere'>I am text link 1 that leads to another page. When I am clicked on two other text links appear</a>) { echo "<a href='http://thewebpageforthelinkhere'> I am text link 2 that appears only when the first one was clicked on</a>"; echo "<a href='http://thewebpageforthelinkhere'> I am text link 3 that appears only when the first one was clicked on</a>";} ?> this whole thing is messed up. Create your links like normal and use php around htem as needed. Now you need to restructure the code as that's nothing that is going to run. Now as far as google, it's going to follow them just as standard links. Whether they are echo'd/printed in php doesn't matter. They still are given to the end user the same (as xhtml/css output only). The php is server side and does not affect search engines.  Quote Link to comment Share on other sites More sharing options...
11Tami Posted October 20, 2007 Author Share Posted October 20, 2007 Thanks I was adjusting that when you posted and I know it needs a bit of tweaking. Are you absolutely positive about that? I'm pretty sure the search engines won't follow them if the echos aren't pulled onto the page yet. The echos won't show on the page until one of the links is clicked on. Are you sure the search engines will follow a text link that is only in an "if" statement? Please let me know, thanks. Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted October 20, 2007 Share Posted October 20, 2007 If you do <a href="http://www.phpfreaks.com" title="Freaks">The PHP Freaks</a> and <?php echo '<a href="http://www.phpfreaks.com" title="Freaks">The PHP Freaks</a>'; ?> the search engines look at both of those exactly the same. However with javascript (if you were building link with javascript for example) they are ignored by search engines. As well as flash (to an extent). Quote Link to comment Share on other sites More sharing options...
11Tami Posted October 20, 2007 Author Share Posted October 20, 2007 Yes you're right and why php should be the best way. I agree with your echo, I'm just not sure if they will still do it if its wrapped into an "if."Â I can also try it as a last resort but the search engines take months before they include the pages, only to have this not work. Anyone know? Â Please let me know, thanks. Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted October 20, 2007 Share Posted October 20, 2007 Bottom line, fact, unchangeable - Search engines do not care in any way shape or form whether it's standard xhtml spitting out the links or php. If you had a use conditional statement spitting out hundreds of links based on specific criteria, every link that is spit out, is picked up by search engines as it was a standard link. Quote Link to comment Share on other sites More sharing options...
11Tami Posted October 20, 2007 Author Share Posted October 20, 2007 OK, I appreciate your conviction in thinking it will work. If no one disagrees I guess I'll nervously give it a go. Thank you for your help. Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted October 20, 2007 Share Posted October 20, 2007 Anytime. Quote Link to comment Share on other sites More sharing options...
11Tami Posted October 20, 2007 Author Share Posted October 20, 2007 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.