rwatkins
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: My 1.5 just stopped working???Hey,
Try clearing your cache (in Firefox). For some reason I think that might fix your problem (but equally, it might not).
Rob
Forum: Fixing WordPress
In reply to: pop-up, targets, and “submit”Hey,
It is
<base href="...">
that is causing you said grief. But are you sure you want to use the popup commenting? It seems more like you’d be after using comments_link() instead of the popup link.If you do still want the popup link then you’d need to change the function
comments_popup_script
in comment-functions.php so that it opened a window with scrollbars, titlebars, toolbars and stuffs like that. Some javascript reference will probably help you with that.Rob
Forum: Your WordPress
In reply to: Review PleaseHey,
I like that too. Good job ??
Rob
Forum: Themes and Templates
In reply to: Need some help please. FF and IE differences.Hey,
The reason you are seeing what you are seeing seems to be because of
height: 8px
to #header02.Try changing it to:
#header02 { margin: 0 !important; margin: 0 0 0 1px; padding: 1px; height: 32px; width: 758px; }
That displays the grey line on my Firefox (although it is still missing the border from the top –
height: 40px
displays that but with a bit of weirdness still in Firefox). The reason why IE displays it “correctly” is because it makes the boxes expand should their contents be larger, however firefox makes things overflow and thus you were only seeing an 8px high image instead of one that is 32px high.Something to work with, anyway.
Rob
Forum: Themes and Templates
In reply to: PHP strtoupper question…Hey,
Try using
get_the_time('M')
instead ofthe_time
Rob
Forum: Themes and Templates
In reply to: Sidebar Trouble in Search FormHey,
Looks great to me ;-). I like the site too – good job!
Rob
Forum: Themes and Templates
In reply to: Sidebar Trouble in Search FormHey,
You are correct. The standard index.php template seems to be OK (as it displays alright) but when it is displaying search results things seem a bit off. Do you have a search.php in your theme? Try adding the extra
</divs>
to that if you do.Rob
Forum: Themes and Templates
In reply to: Sidebar Trouble in Search FormHey,
Looks like you don’t have the closing </div> tags for the following elements:
<div id="maincol"><!-- The main content column begins -->
<div class="col">Try adding:
</div><!-- col ends -->
</div><!-- The main content column ends -->just before
<div id="navcol">
Rob
Forum: Themes and Templates
In reply to: What are your tips for starting a theme from scratch?Hey,
I would like to recommend Notepad2 as a good (free – open source!) text editor. It does syntax highlighting for PHP, HTML and CSS which is perfect for creating your own templates :).
When I first started out in CSS, the majority of my problems was getting a nice columular (is that a word?) layout that worked in both Firefox and internet explorer. Getting it to work in one (either) was easy enough but I had loads of problems with bits of CSS I didn’t know and didn’t want to know to get it to display OK in both. So I nuked that design and started over.
There are quite a few sites out there with completely free templates out there that you can base your site off of. A website called fu2k has some really good layouts – I based my old design off of their 3 col layout. After a bit of messing about, i’d removed the left column, done some other jiggery poker and set up fonts, backgrounds, images etc and had my design.
I found it a hell of a lot easier to base off a template than to start over, especially with the 10s of niggles that CSS seems to bring.
I just used fake entries (typed by hand..ish – I used the Lorem Ipsum generator to make me some nice long posts) and then once I had the site how I liked it, I WP-arised the templates and then tweaked it to look how I wanted and that was it!
I think trying to create your site and wordpressarise it at the same time is a bit tricky, as you never know if you’ve gone wrong because of dodgy use of the template tags or because your css/html was slightly off.
Rob
Forum: Everything else WordPress
In reply to: Your Sites Rank on TechnoratiOne of Those Days: 318,359
Forum: Fixing WordPress
In reply to: sidebar is messed upIt’s fine here too. Chances are you are viewing it in Internet Explorer and the page isn’t wide enough to render the sidebar next to the main content, so it’s kindly put beneath the rest of the page.
Forum: Fixing WordPress
In reply to: Not receiving comment notificationHey,
Not sure if this has been fixed or not in the version you download but have a look at this bug report and try changing what it says. That should make comment mails work :).
Rob
Forum: Fixing WordPress
In reply to: How to hide posts from 2 or 3 categories from index pageHey,
The reason the || doesn’t work is a little strange but it makes sense if you think about it.
<?php if ( !(in_category('8')) || !(in_category('7')) || !(in_category('9'))) { ?>
translates to: if it’s not in category 8 OR it’s not in category 7 OR it’s not in category 9.
For an statement using OR to be true, you need any part of it to be true:
True || Anything = True
False || False = FalseAnd so with the statement you gave, if it’s in, say, category 8, then you would end up with the following statement:
if ( false || true || true) which will always be true. (because in_category(‘8’) will be true, (which reversed is false) in_category(‘7’) will be false (which reversed is true)). And you only need one true for the whole thing to be true.
What you actually want is:
<?php if ( ! (in_category('8') || in_category('7') || in_category('9') )) { ?>
So if it’s in either of those categories, the expression will evaluate to true, which negated is false.
Rob
****
(DeMorgan’s Theorem states that NOT(a OR b OR c) is the same as (NOT a) AND (NOT b) AND (NOT c) which is how you can have the statement using ORs and the statement using ANDs doing exactly the same). My brain is all mushy but I think that’s right :).
Forum: Fixing WordPress
In reply to: Using ModRewriteHey,
Just had a bit more of a look at this. To do something like the second of your requests, you’d need a .htaccess inside the “album” directory containing something like this (it might not be totally correct but it works ;)).
RewriteEngine On
RewriteBase /album
RewriteRule ^([^/]+)/([^/]+)/?$ index.php?pp-album=$1&pp_cat=$2This would redirect anything in the form of https://www.yourdomain.tld/album/ducks/geese/ to /album/index.php?pp-album=ducks&pp_cat=geese.
Note that the [^/] (read: anything but a /) are there as it will match them otherwise – and you probably want /album/ducks/geese/ganders/ to give an error rather than try and redirect to pp-album=ducks/geese&pp_cat=ganders.
You are going to have to know bits of regex to do this, but it’s not *that* tricky.
So, to do the “picture.jpg” you would want a RewriteRule like:
RewriteRule ^([^/]+)/([^/]+\.jpg)$ index.php?pp-album=$1&picture=$2 [L]
this as the first rule. (the [L] stops the next rule being processed (which would mess things up a tad if it was processed))
Obviously you want different types of filenames and so it’s probably better to forward anything with a “.” in last part of the path to the album script as an image (rather than a category):
RewriteRule ^([^/]+)/([^/]+\.[^/]+)$ index.php?pp-album=$1&picture=$2 [L]
You can probably work out the album bit too.
None of this is particularly beautiful (nor is it totally correct) — I tend to just hack around with stuff like that until it works. It might be a start for you to have a go exploring what you can do, however.
Rob
Forum: Fixing WordPress
In reply to: Using ModRewriteHey,
The Apache Docs would be better than the codex for this.
There will be loads of examples on the net too, I reckon. Just google for RewriteRule or mod_rewrite.
Rob