Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: stylesheet in JS or PHP file.  (Read 456 times)

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
stylesheet in JS or PHP file.
« on: April 02, 2012, 02:35:22 AM »

hi everyone, how do you do?
I have a request for you; how much it is possible to include stylesheet of my snews in one JS file or PHP file.
does someone did that before? and if yes does any danger exist if using that in our snews?

The reasons why i need for it:
- because some thieves (visitors for no reason) they had stolen  ??? my stylesheet, by displaying the source of the page.
and they added it to thier snews and wrote on it their copyrights  :-[ :-[.

if someone needs my stylesheet which i spent several years to develop it.. he/she just has to send me one message not 2 or 3 and i will be there for there.

thanks for the exchanging information about programing and designing snews cms.
« Last Edit: April 02, 2012, 03:16:56 AM by adminphp »
Logged
“Fifty years of programming language research, and we end up with C++?”

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: stylesheet in JS or PHP file.
« Reply #1 on: April 02, 2012, 05:28:47 AM »

I don't know anything about putting the stylesheet script in a PHP or JS file.
Maybe you can use the .htaccess file to forbid access to a file - or a folder and its files - on the server.
This might explain what you are looking for - http://www.webmasterworld.com/apache/3180546.htm
If not, then also have a look at these links:
http://www.htpasswdgenerator.com/apache/htaccess.html
http://httpd.apache.org/docs/current/sections.html
http://www.ducea.com/2006/08/11/apache-tips-tricks-deny-access-to-some-folders/
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
Re: stylesheet in JS or PHP file.
« Reply #2 on: April 03, 2012, 12:23:19 AM »

I appreciate it alot,
I found a solution for it.
Logged
“Fifty years of programming language research, and we end up with C++?”

nukpana

  • Hero Member
  • *****
  • Karma: 71
  • Posts: 663
Re: stylesheet in JS or PHP file.
« Reply #3 on: April 04, 2012, 01:20:02 PM »

What's the solution?  Perhaps someone may be looking for it...

Somewhat related, but funny...
http://xkcd.com/979/
Logged

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
Re: stylesheet in JS or PHP file.
« Reply #4 on: April 04, 2012, 03:19:04 PM »

What's the solution?  Perhaps someone may be looking for it...
Ok ok nukpana, i used to share what I find with people, but because of the factor of time, i couldn't post the solution. right? ;D
ok here is what i did to acheive what i wanted.
first create file called compress.php, put this line within it; this line says to server that the content of the file is stylesheet. and stylesheet you want to put.

Code: [Select]
<?php
    header
('content-type: text/css');
?>


// your stylesheet here.
   
second, in your index.php file post in head this declaration
Code: [Select]
<link rel="stylesheet" href="compress.php" type="text/css" />now it's done.
« Last Edit: April 04, 2012, 09:02:53 PM by adminphp »
Logged
“Fifty years of programming language research, and we end up with C++?”