Jump to content


Photo

php with css


  • Please log in to reply
4 replies to this topic

#1 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 20 October 2006 - 08:06 PM

I have been working on a framework of my own for a little while now.  I actually loved building it, I am working to improve it everytime I get itme, and I try to deploy it everytime I build a new site.
Now i have come to the anme,a nd call it master framework.  That is what I call my framework.  What I am doing now, is using it with pre-made javascript, ajax, css, files.  So far I just have blank global.css, and global.js in the ajax, javascript, css folder.  I am going to be building on these, eventually adding functions I can reuse(I also have a php config.php file in there, that handles a lot of things.  What I am thinking  now, most people might think this is a stupid idea.

If it was used for browser detection or to pick a style based on the brower I would think so as well.  but the more I think of the idea behind a framework, it's meant to make it easier, and faster on me to be able to create sites faster.

A lot of things with php is repeating the same stuff.
If I made a css file using a lot of php functions I would be able to create entire css pages in less than a few minutes just by calling a few functions.  Like for instance have 1 function for each basic page layout.  For instance to be able to center the page, I have a function called center.  I specify a height and widht, to decide that.  Then I call the function in the php page later when I am building it.
I just call the function in the middle of the body tag, that automatically make's it center.
THen I might notice that I sometimes have a specific style, like for isntance a 2 column centered with header and footer.  With this, I can have a specific folder for each layout type.
I can input 2 pages.
I can have my html page, and just call a function to get the basic layout.
THen on the css just call a function to get hte basic css setup.  Then put in an external stylesheet to make further modifications to the file.  I can set the content area's up as variabels and just call those where needed.

Any ideas on this?

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 20 October 2006 - 08:32 PM

Sounds a bit like de-inventing the wheel.
Legend has it that reading the manual never killed anyone.
My site

#3 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 20 October 2006 - 08:35 PM

Even if it does, it's about custom programming.

I have to rebuild a total css file everytime I recreate a website, I was thinking about a way to have that time cut.  Maybe instead just having the css, and commenting out certain ones.  Like have all the styles in body, one set to center, one set to right align, and left align.
THen i cna uncomment the one's I want, just little things like that to speed up time sometimes.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 20 October 2006 - 08:38 PM

I didn't mis-type "re-inventing", I meant "de-inventing" - a sort of undesirable enhancement.
Legend has it that reading the manual never killed anyone.
My site

#5 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 20 October 2006 - 09:43 PM

You mean like redesigning the concept behind CSS.  if that's what you mean, I guess your right.  There is a time and place for everything.  On the other hand I might go with sometimes commenting out some stuff in a global.css file that will allow me to uncomment needed style's on stuff I find myself using quite regularly or something.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users