NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
file associations in PhpED


Joined: 09 Nov 2006
Posts: 12
Reply with quote
I have a project that requires some CSS files to be PHP parsed.

I'd think the magic for recognizing a .css.php file as CSS rather than PHP would be to go to file associations and change the CSS entry from "*.css" to "*.css;*.css.php"...

But it's not. The file never gets recognized as CSS and after restarting PhpEd the file association has changed from "*.css;*.css.php" to "*.css;*.css*.php"

This is a pain.
View user's profileFind all posts by jsorensenSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
There is nothing wrong in PhpED's file associations.
According to Wikipedia:
Quote:
most times the extension is the substring which follows the last occurrence, if any, of the dot character (e.g. "txt" is the extension of the filename "readme.txt", "html" the extension of "mysite.index.html").

(see http://en.wikipedia.org/wiki/Filename_extension for full text)

BTW, phped recognizes php in css and js files.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 09 Nov 2006
Posts: 12
Reply with quote
Ok, you got me on semantics.

However, recognizing PHP in CSS doesn't help, nor does recognizing CSS in PHP - since a linked stylesheet doesn't have
Code:
<style ...>
tags, PhpEd doesn't recognize that it's CSS when it's not named .css
View user's profileFind all posts by jsorensenSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
well, as I said it recognizes PHP in CSS files. In other words if the files have an extension listed for the CSS type. So all .css files with php will be recognized correctly. What you probably want is to add .css for your web server to serve them as php.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 09 Nov 2006
Posts: 12
Reply with quote
dmitri wrote:
well, as I said it recognizes PHP in CSS files. In other words if the files have an extension listed for the CSS type. So all .css files with php will be recognized correctly. What you probably want is to add .css for your web server to serve them as php.


yeah, not really - don't want all css parsed as php. guess i'll just live without the syntax highlighting. sucks but oh well.
View user's profileFind all posts by jsorensenSend private message


Joined: 09 Nov 2006
Posts: 12
Reply with quote
dmitri wrote:
There is nothing wrong in PhpED's file associations.
According to Wikipedia:
Quote:
most times the extension is the substring which follows the last occurrence, if any, of the dot character (e.g. "txt" is the extension of the filename "readme.txt", "html" the extension of "mysite.index.html").

(see http://en.wikipedia.org/wiki/Filename_extension for full text)

BTW, phped recognizes php in css and js files.



incidentally, that only applies if you're just specifying file extensions. the dialogue allows you to specify a file mask, not just an extension, and thus should match *.css.php, much like 'dir', 'ls', etc will match it. just as you have pointed out above, an extension is "txt" or "php", not "*.txt" or "*.php", so yes i would say the file associations are broken by your own definition.
View user's profileFind all posts by jsorensenSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
feel free to submit it as a feature request

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
file associations in PhpED
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic