Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text and background

Status
Not open for further replies.

jstreich

Programmer
Apr 20, 2002
1,067
US
I have a page that has cryptograms on it, and the solutions to the cryptograms are the same color as background so that people who wish to solve the cryptograms can check their answers. Its not ranking as well as I'd think it should. I'm worried that this page might be penalized by search engines for having text the same color as the background. I don't care if the text that is the same color as the background is ignored, but the top of the page with the cryptogram explanation, how often and how the cryptograms are added, and such, are things I would like spiders to see.

My older riddle pages rate higher than the new cryptogram page for the word cryptogram, and that is why I think I might be being penalized.

[plug=shameless]
[/plug]
 
It's entirely possible.

Use a bit of DHTML to hide the answers by switching the visibilty
Code:
<script type="text/javascript">
function HideAnswer(AnsID) { 
	document.getElementById(AnsID).style.visibility = 'hidden'; 
}
function ShowAnswer(AnsID) { 
	document.getElementById(AnsID).style.visibility = 'visible'; 
}
</script>

Code:
<span onMouseOut="HideAnswer('ans_1')" onMouseOver="ShowAnswer('ans_1')" onClick="ShowAnswer('ans_1')">Reveal</span>
<span name="ans_1" id="ans_1" style="border:1px solid red;visibility:hidden;" onMouseOut="HideAnswer('ans_1')">Test Answer</span>

Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 

Would it be considered bad form to use an anchor tag and define a:hover color in css?

Code:
a:link{
color:white;
text-decoration:none;
}
a:hover{
color:black;
}

Code:
<a href="#">Answer</a>



Life would be so much easier if I only had the source code.
 
Definitely not!

Nothing! Absolutely Nothing is "bad form" when elements and attributes are used for their correct purpose.

The difference is in the intent, If you are using techniques to fool or "game" the search engines then you are on the greasy pole

Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 
It's not about form here... What I'm doing certianly isn't trying to deceive, but will the search engines think I am is the big question. I think putting the text in DHTML would be the way to go -- except the top cryptogram breaker that frequents my site hates JS and surf with it off, and may have trouble with DHTML.

I may just resort to linking the text files. Unfortunatly, I'll have to change the ones already created manually, and then change the scripts that I wrote so they generate links as opposed to the text the same color.

Now, all I need to do is finish adding new features to the CMS, and begin cleaning it up and making it standards compliant (unfortunatly most of the code uses id's for the CSS of repeated objects, so I'll be doing a lot of serch and replace id= to class= and then in the .css file . to # ... The joy).

[plug=shameless]
[/plug]
 
It's a good idea Chris, but there are a ton of them on a page. They are currently just included using php, I think it might be a better idea to something like a link after each one to the solution. The only problem is that each of these would have no navigation, as they are just text files.

Or I could have a variable to the page to toggle all solutions... That way when they get done with the new ones or give up on one they can turn solutions on. The only problem I see with this is that Google might look at the page without the solutions and think it is duplicate of the one with, and since the one with has more text/content, it'd likely drop the one without solutions... Thus people who are looking for cryptograms to solve would be more likely to find the one with solutions and lose the fun of doing them.

Maybe I'll copy the page locally and topy with it and see which version is best.

[plug=shameless]
[/plug]
 
They are currently just included using php
What, exactly, is getting included where?

If it was my site, I'd write a php program which you could include as a URL like this: crypto.php?q=Original+plain+text that would generate the cryptogram on the fly, and output the HTML to present it and the answer in whatever mode you think appropriate at the time. That would take out a lot of work!

Having looked, now, at the site in question, I don't think my solution is going to work on your current page - it'd be miles long for non JS-users. Mind you, your policy of showing all current cryptograms on one page is already making a pretty long page after less than months - maybe you should consider presenting one cryptogram per page with a richer (though Javascript-dependent) interface?

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
What, exactly, is getting included where?[/b]
The current system is actually quite a kludge. Prior to the current site, I created a cryptogram program (C++), and posting them occasionally on the site as the mood struck me. People would then solve them (and other riddles) for points. When the CMS my site uses moved to the next version my riddle page broke. I also stopped adding cryptograms as often as I'd have liked, because of other things I needed to do. The fix to both of these was to build a page that could be droped into any CMS that was updated in a regular basis. Already having a working cryptogram program of my own making, I wrote a simple sctipt that runs on a con job and dumps HTML/PHP into a file which includes the text files with the encrypted and decrypted versions of the quotes. This way I can page break when I feel a page is getting too long by simply moving the current included file to another name, and adding the new link (I suppose I could also cron this to happen at regular intervals).

If it was my site, I'd write a php program which you could include as a URL like this: crypto.php?q=Original+plain+text that would generate the cryptogram on the fly, and output the HTML to present it and the answer in whatever mode you think appropriate at the time. That would take out a lot of work!
I thought about having it done all done in PHP, but I'd have to recreate the cryptogram program in PHP and then I'd be temped to tie it into the CMS, which means that it would break if I changed CMS or upgraded.

Having looked, now, at the site in question, I don't think my solution is going to work on your current page - it'd be miles long for non JS-users. Mind you, your policy of showing all current cryptograms on one page is already making a pretty long page after less than months - maybe you should consider presenting one cryptogram per page with a richer (though Javascript-dependent) interface?
I don't want to force JS down the throughts of my users, espceially some of the old unix geezers I get. I do agree the page is getting long, but one per page does seem like an awful waste of space. I'm consider croning the splitting of pages.

[plug=shameless]
[/plug]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top