Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

SEO Tycoon


You are currently viewing our SEO Tycoon as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Optimal way to display program code...?
Old 10-05-2007, 10:29 PM Optimal way to display program code...?
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
Probably an odd question. But this really isn't very good by any measure; it's ugly, and a navigational dead end, but it's the code, the whole code, and nothing but the code. It needs syntax highlighting and better tabs, which anyone who's interested in has an ide that will take care of.

Google uses html to accomplish this on the page, and make the code look pretty. I'm thinking that might be the way to go. But it's one thing to display a snippet that shows how to do something particular, and another when it's 200 lines of code. Seo is mostly about usability, so what's the most convenient way to get code like this?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
 
Register now for full access!
Old 10-06-2007, 01:07 AM Re: Optimal way to display program code...?
vangogh's Avatar
Post Impressionist

Posts: 10,688
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
I think I'd bite the bullet and set up a stylesheet to display things the way you want. Have a class for variables and a class for functions, etc

Then when you set up the html you'll just have to add the class to the html, probably wrapping things in <span>s

It'll take awhile the first time out, but each time after will be quicker.

Having said that it wouldn't surprise me if someone has developed a script to do a lot of the work, but I'm not aware of one. If it doesn't exist and you're up for creating one it would probably generate a lot of links to the page.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 10-06-2007, 03:29 AM Re: Optimal way to display program code...?
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
I tend to agree with Steven. Use pre tags to preserve the spacing, and CSS to format those tags (it can be done). I use it on the layouts on the SEFL site, and then some regular expression stuff for the color coding. Feel free to steal my CSS, or even the colors if they appeal to you (it's not like the stuff isn't public domain anyway).

By the way...I tried opening up your .CS file after allowing the restricted content, and I made the discovery that it's a default extension for Color Schemer (I also discovered that I still had it installed on this machine, after using it once...I really have to uninstall stuff more often.) You may want to change that extension.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 10-06-2007, 07:25 AM Re: Optimal way to display program code...?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
One of my ongoing personal projects is a server side syntax highlighter for a code snippet site I'm working on in what is laughingly called "free time"

Have you looked at http://code.google.com/p/syntaxhighlighter/ ?

Google took up what used to be the DreamProjections syntax highlighter and developed it further.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-06-2007, 03:07 PM Re: Optimal way to display program code...?
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
That's fantastic! I've looked at ActiPro's code highlighter, which is free but only works on .net servers. My site runs on Apache, so javascript is a much better solution. And this saves me from a lot of manual work.

Thanks! I owe you some TP, but apparently I've been handing too much out lately. I'll have to come back soon and fix that.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Reply     « Reply to Optimal way to display program code...?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.53698 seconds with 12 queries