Advice Articles

  • Beginners
    Just getting started? Loads of powerful advice here for beginners.
  • Intermediate
    Got a handle on the basics? Find more advanced topics covered here.
  • Advanced
    Warning! Advanced topics covered here.
  • Affiliate resources
    Affiliate marketing resources for affiliates and affiliate program managers tools, websites, books and articles.
  • Product reviews
    Candid reviews of the latest products to take you to the next level.


 

Affiliate Marketing Forum

FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups   RegisterRegister ProfileProfile  Log in to check your private messagesPrivate Messages Log inLog in  
<br> or <p> tags
Goto page Previous  1, 2
Affiliate Marketing Forum Index -> Do-It-Your-Selfers
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
edburdo



Joined: 14 Jul 2003
Posts: 1734
Location: Bangor, Maine

PostPosted: Mon Mar 14, 2005 3:41 pm    Post subject: Reply with quote

By forcing the case to be the same, it makes validation easier. Less checking you have to do to ensure that something is valid.

As to the validation itself, there are many levels, and you can pick what you want. I always validate to XHTML Transitional, since XHTML Strict is too picky for me.

My biggest complaint with most of the CSS stuff out there, is people try and rely too much on CSS hacks to make the site look good on all browsers... when you can design a simple, clean CSS driven site that looks good on all browsers, fully validates and doesn't use any hacks. My drop ship site (link in sig) is an example. It looks the same in all browsers, fully validates and uses no hacks. The CSS for it is extremely simple... yet I keep finding dozens of sites showing how to apply hacks to make things work... they aren't needed.
_________________
Eric D. Burdo
Back to top View user's profile Send private message Visit poster's website
Charlie



Joined: 22 Aug 2003
Posts: 3305
Location: UK

PostPosted: Tue Mar 15, 2005 12:08 pm    Post subject: Reply with quote

edburdo wrote:
My drop ship site (link in sig) is an example. It looks the same in all browsers, fully validates and uses no hacks. The CSS for it is extremely simple...

I like the crisp look of your site, but what intrigued me was the way you seem to be using PHP files (including query string) as the external CSS file.

Maybe I live a sheltered life, but I can't remember seeing this before. What's the thinking behind it?

Cheers,
Charlie.
_________________
"Before I speak, I have something important to say."
- Groucho Marx
Back to top View user's profile Send private message
edburdo



Joined: 14 Jul 2003
Posts: 1734
Location: Bangor, Maine

PostPosted: Tue Mar 15, 2005 12:24 pm    Post subject: Reply with quote

SHHH! It's a secret!

Razz Actually, I use a content management system called TextPattern. That is how they link the CSS dynamically. In theory, you can have a PHP page produce a proper CSS sheet. And even have it do smart things before returning the completed CSS. You just have to return the proper headers in the PHP script.
_________________
Eric D. Burdo
Back to top View user's profile Send private message Visit poster's website
Charlie



Joined: 22 Aug 2003
Posts: 3305
Location: UK

PostPosted: Tue Mar 15, 2005 1:52 pm    Post subject: Reply with quote

edburdo wrote:
Actually, I use a content management system called TextPattern. That is how they link the CSS dynamically.

I remember you mentioning TextPattern before...

Are you saying that is how it does things by default, or have you had to set anything up?

Quote:
In theory, you can have a PHP page produce a proper CSS sheet.

Yes, but it was "why" I was interested in...

Can the spiders access the CSS via the PHP file or are they blocked?

Quote:
And even have it do smart things before returning the completed CSS. You just have to return the proper headers in the PHP script.

Fascinating stuff...

Would it be too much for you to let us see the code of the PHP file that creates the CSS?

Cheers,
Charlie.
_________________
"Before I speak, I have something important to say."
- Groucho Marx
Back to top View user's profile Send private message
edburdo



Joined: 14 Jul 2003
Posts: 1734
Location: Bangor, Maine

PostPosted: Tue Mar 15, 2005 5:44 pm    Post subject: Reply with quote

I haven't dug into the code for TextPattern, but I did find a tutorial on dynamic CSS with PHP.

http://codewalkers.com/tutorials.php?show=75

TXP does that by default. Everything is database driven, and you have a simple interface. You past your CSS into one "window", and it gets stored in a table. Then it is called at the proper spot in your HTML.

Spiders can read the CSS (and so can people) just like a static CSS file. One nice advantage is that you can offer custom CSS sheets for people, so they can customize the look. Instead of using JavaScript to switch the CSS, you just make a few changes in the PHP and reload the page.
_________________
Eric D. Burdo
Back to top View user's profile Send private message Visit poster's website
Charlie



Joined: 22 Aug 2003
Posts: 3305
Location: UK

PostPosted: Wed Mar 16, 2005 12:35 pm    Post subject: Reply with quote

Thanks for the tutorial, Eric.

edburdo wrote:
Spiders can read the CSS (and so can people) just like a static CSS file.

I tried this with your site yesterday and couldn't get to the source of the PHP file. I just tried it again and the downloads worked (they crashed yesterday).

It looks as though one PHP file is being used to create two different external style sheets (for size and colour) by passing a different query. Is this right?

Could you let us see the code for...

"http://www.the-drop-ship-guide.com/textpattern/css.php"

..?

Thanks,
Charlie.
_________________
"Before I speak, I have something important to say."
- Groucho Marx
Back to top View user's profile Send private message
edburdo



Joined: 14 Jul 2003
Posts: 1734
Location: Bangor, Maine

PostPosted: Wed Mar 16, 2005 2:45 pm    Post subject: Reply with quote

You want to see the regular CSS, or the PHP code that displays the CSS?

The regular CSS can be seen here:

http://www.the-drop-ship-guide.com/textpattern/css.php?s=default
http://www.the-drop-ship-guide.com/textpattern/css.php?n=colors

The actual PHP is this:
Code:

<?php

header('Content-type: text/css');

include './config.php';
$nolog = 1;
include $txpcfg['txpath'].'/publish.php';
$s = gps('s');
$n = gps('n');
output_css($s,$n);
?>


The header() portion is the important bit. The rest just pulls the CSS from the table... using TXP's code. A regular MySQL Select statement would work.
_________________
Eric D. Burdo
Back to top View user's profile Send private message Visit poster's website
Charlie



Joined: 22 Aug 2003
Posts: 3305
Location: UK

PostPosted: Thu Mar 17, 2005 12:05 pm    Post subject: Reply with quote

edburdo wrote:
You want to see the regular CSS, or the PHP code that displays the CSS?

The PHP code that dsiplays the CSS...

Quote:
The actual PHP is this:
Code:

<?php

header('Content-type: text/css');

include './config.php';
$nolog = 1;
include $txpcfg['txpath'].'/publish.php';
$s = gps('s');
$n = gps('n');
output_css($s,$n);
?>


Quote:
The header() portion is the important bit.

Yes, I remember that part (and was reminded in the tutorial).

Quote:
The rest just pulls the CSS from the table... using TXP's code. A regular MySQL Select statement would work.

How do those query strings "s" and "n" come into play?

The code from the include files is the interesting bit, by the look of it.

Thanks,
Charlie.
_________________
"Before I speak, I have something important to say."
- Groucho Marx
Back to top View user's profile Send private message
edburdo



Joined: 14 Jul 2003
Posts: 1734
Location: Bangor, Maine

PostPosted: Thu Mar 17, 2005 2:07 pm    Post subject: Reply with quote

That is all part of the TXP codebase... You can dig through it here:

http://dev.textpattern.com/file/current/textpattern/publish.php

The config.php file just contains the information to access the MySQL database (password, DB name, username, server, etc).

I am not sure how s and n work. I do know they are variables and take in values from the CSS Link in the page... but that is the extent of my knowledge there.

BTW, TXP is fully open source. The above link is for the repository where the source code sits, freely viewable. TXP's main website is: http://www.textpattern.com/
_________________
Eric D. Burdo
Back to top View user's profile Send private message Visit poster's website
Charlie



Joined: 22 Aug 2003
Posts: 3305
Location: UK

PostPosted: Fri Mar 18, 2005 11:13 am    Post subject: Reply with quote

edburdo wrote:
That is all part of the TXP codebase... You can dig through it here:

http://dev.textpattern.com/file/current/textpattern/publish.php

Thanks. I think that's dampened my curiosity, somewhat. Wink

Any idea how they are building the path for the second include? Surely that must be in the config include, too. The source of that second include?

Quote:
I am not sure how s and n work. I do know they are variables and take in values from the CSS Link in the page... but that is the extent of my knowledge there.

Blimey - this is beginning to remind me of SBI... Rolling Eyes

Am I the only person on this earth that cares how these things actually do what they do?

Cheers,
Charlie.
_________________
"Before I speak, I have something important to say."
- Groucho Marx
Back to top View user's profile Send private message
edburdo



Joined: 14 Jul 2003
Posts: 1734
Location: Bangor, Maine

PostPosted: Fri Mar 18, 2005 3:05 pm    Post subject: Reply with quote

I don't care as much anymore... as long as it works. I kept finding myself digging to much into the technical aspect, and I never created content... so I finally had to break myself of that mindset. I started using a CMS for my sites. While I don't generate as much content as I should be at this point, I generate more now than I did...
_________________
Eric D. Burdo
Back to top View user's profile Send private message Visit poster's website
John Lenaghan



Joined: 09 Nov 2003
Posts: 86
Location: Langley, BC, Canada

PostPosted: Sun Mar 20, 2005 2:17 am    Post subject: Reply with quote

Eric,

Thanks very much for pointing out TXP. From my brief look, it looks like it does a lot of what I've been looking for in a CMS - at a price I can't argue with Very Happy

Do you write all your content yourself or do you hire some of it out? I'm intrigued by the various security levels that can be granted to authors and I'm wondering if you've had any experience - good or bad - with letting writers upload their own content.
Back to top View user's profile Send private message
edburdo



Joined: 14 Jul 2003
Posts: 1734
Location: Bangor, Maine

PostPosted: Sun Mar 20, 2005 3:29 am    Post subject: Reply with quote

I am in the process of hiring out some of my content. When I do, I don't give the writers access to my site. I have them email me the content and I publish it myself.

I have heard on the TXP forums that having logins for people (with different permissions) works very well. Currently, I just have two. Me and my wife, both have full permissions.

TXP is hitting RC3 right now... so if you don't mind waiting a bit, that should become v 1.0 and it has a LOT of nice new features. Although installing RC1 and then upgrading is pretty easy, and would give you a chance to play with the system some.
_________________
Eric D. Burdo
Back to top View user's profile Send private message Visit poster's website
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Affiliate Marketing Forum Index -> Do-It-Your-Selfers All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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





Your host: Allan Gardyne.
Earning a good living from affiliate programs since 1998.