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.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
hiding css source code
Old 02-17-2008, 12:09 PM hiding css source code
Junior Talker

Posts: 2
Name: Tiffany
Trades: 0
I don't normally care about hiding source code but I have a client that I want to show how their website will look and I don't want to give away the code...so being new at this I thought that I could create the css file on the fly and after the html has been output then write over the css file. It sounds good but isn't working. Is there some fundamental thing about css files and html pages that I am missing???
tiffbrink is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-17-2008, 03:24 PM Re: hiding css source code
xkaosx's Avatar
Experienced Talker

Posts: 31
Name: Junior
Location: East LA
Trades: 0
just get the style of the website and make a new .CSS and put the code then in your HTML template/website include the css file.
__________________

Please login or register to view this content. Registration is FREE

Great new Bux site!
xkaosx is offline
Reply With Quote
View Public Profile Visit xkaosx's homepage!
 
Old 02-17-2008, 03:24 PM Re: hiding css source code
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
A bit of DOM scripting to the rescue

HTML Code:
<script type="text/javascript" src="css.js"></script>
css.js
HTML Code:
var cssFile = document.createElement('link');
cssFile.type = 'text/css';
cssFile.rel = 'stylesheet';
cssFile.href = '/test.css';
cssFile.media = 'screen';
cssFile.title = 'dynamicLoadedSheet';
document.getElementsByTagName("head")[0].appendChild(cssFile); 
set the name of the stylesheet to suit. Maybe change the name of the js file as well.
It won't stop anybody who is determined to steal the design but it will stop the casual onlooker.
Or you could DOM script the entire style sheet though that would take a lot of work.
__________________
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 online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-17-2008, 04:21 PM Re: hiding css source code
Average Talker

Posts: 20
Trades: 0
continuing what xkaosx said, you could take the style, and then put it in a file called "style.css", continuing on and putting it in a URL which has hotlink protection enabled (via .htaccess) and then adding in the following code where the <style type> should be.
Quote:
<link rel="stylesheet" type="text/css" href="http://www.yoursite.com/style.css" />
__________________
MyPaidHost.com - Cheap Webhosting, Reliable Host, Convenient Setup and Friendly Customer Service.

Please login or register to view this content. Registration is FREE

Last edited by mypaidhost; 02-17-2008 at 04:21 PM.. Reason: Typo
mypaidhost is offline
Reply With Quote
View Public Profile
 
Old 02-17-2008, 05:30 PM Re: hiding css source code
Super Moderator

Posts: 1,576
Location: Kokkola, Finland
Trades: 1
how about just showing them a screenshot??
davemies is online now
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Old 02-18-2008, 07:56 AM Re: hiding css source code
Tixylix's Avatar
Super Talker

Posts: 110
Name: Steve
Location: Australia
Trades: 0
LOL!

Anyway, not sure why you'd want to do this, but I would have suggested the non hot-linking option, much easier if you have cPanel too, no matter how much some people hate it.
__________________
There's more to be discovered...

Please login or register to view this content. Registration is FREE

Tixylix is offline
Reply With Quote
View Public Profile Visit Tixylix's homepage!
 
Old 03-03-2008, 02:29 PM Re: hiding css source code
Junior Talker

Posts: 2
Name: Tiffany
Trades: 0
Thanks for the suggestions. I ended up getting what I was doing to work but it was much more work than what was suggested here so I think I will try a couple of your methods before I even think about using my method again.
tiffbrink is offline
Reply With Quote
View Public Profile
 
Old 03-06-2008, 05:33 PM Re: hiding css source code
Novice Talker

Posts: 6
Trades: 0
a full sized screen shot is the best way to show what a would page look like. It's always good to have your own "intranet" if you wanna show functionabilities of what you can do to customers. (like create a fake teacher/course/classroom manager with reports, add/edit/delete, etc.. and let them play with it.)
iliketocode is offline
Reply With Quote
View Public Profile
 
Old 03-06-2008, 05:40 PM Re: hiding css source code
Super Moderator

Posts: 1,576
Location: Kokkola, Finland
Trades: 1
if you're going to actually visit your client then take a local copy of the site on a laptop so they can see. if not then a screen shot should do
davemies is online now
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Reply     « Reply to hiding css source 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.29743 seconds with 12 queries