Ganners
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Grave problem of aligning Header LogoIt uses Cufon so it’s harder to tell, but I’m guessing your looking for:
#tagline p
and it has 36px font size, so just change that number and hopefully it will do what you want, if not the p variable than look at others probably in the #tagline.
Forum: Fixing WordPress
In reply to: I'm new and having some image scaling issuesWell thankfully this script is pretty helpful and has a bool to turn it off or on. So currently your image url will look like this:
but at the end you see zc=1 (the variable described as zoom crop), if we change this in the url to 0, it gives the result you’re after:
So perhaps you are given the option to do this in the view file, however if not you could probably change this code slightly.
If you were to change the line
$zoom_crop = preg_replace("/[^0-9]+/", "", get_request("zc", 1));
with simply
$zoom_crop = 0;
I think that should work
Forum: Fixing WordPress
In reply to: I'm new and having some image scaling issuesWhat your theme is doing is resizing the image based with some php in timthumb.php, if you were to take a look in there in your theme file and change some variables (it might be nice and commented). Then if you don’t understand it you could maybe copy it to here and I’ll take a look.
Forum: Fixing WordPress
In reply to: Conditional Stylesheet (ie) for Child Theme of TwentyTenNo, only style.css requires this. It is what tells wordpress about your theme when you go into your theme chooser.
Forum: Fixing WordPress
In reply to: Need to get attachment ID by Image URLI’ve searched around this subject a lot and I’ve found there is no simpler way, a simple custom query works fine and isn’t so bad! Otherwise slash at the header script or make your own plugin.
I have modified it slightly and have this:
<img src="<?php header_image(); ?>" class="captify" style="border:1px solid #333;" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt=" <?php $HeaderImageURL = get_header_image(); $thepost = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_content = '$HeaderImageURL'" ) ); $theID = $thepost->ID; $theTitle = $thepost->post_title; $alt_text = get_post_meta($theID, '_wp_attachment_image_alt', true); if ($alt_text == NULL) { $alt_text = "Please add some Alternate Text to $theTitle in the 'Media > Library' section of your admin panel"; } if ($theID == NULL) { $alt_text = ""; bloginfo('name'); print " | "; bloginfo('description'); } print $alt_text; ?>" />
A nice way is to make a plugin for it, I’ll probably create it within the next month anyway.
Forum: Fixing WordPress
In reply to: Is it possible to use WordPress Authentication for non-WP pages ?The requires are in reverse if wordpress calls your page template. So for example if you wanted an admin page, the way one might go about it would be to make a new page template for the admin.
To do this you would put maybe create an adminPanel.php in your themes folder
<?php /* Template Name: Admin Panel */ ?> <?php global $user_ID, $user_identity, $user_level ?> <?php if ( $user_ID ) : ?> <?php if ( $user_level >= 1 ) : ?> //Put your full admin page in here <?php endif ?> <?php endif ?>
Then you would create a new page with this template, whether it display any content in it or not. Then that page will already have access without needing any includes. You could also manually include some files but would be more difficult I suppose.
There are a few ways to go about it though, just do whichever suits your needs more.
Forum: Fixing WordPress
In reply to: Is it possible to use WordPress Authentication for non-WP pages ?If you get the page to be called from wordpress it will load all the connections in for you rather than having a dashboard completely external to wordpress.
If you did want someething completely external then you will want to create your database connection, query username and password with user level and add session data and if a result is returned allow them the session data to log in or whatever way you want.
The first way will be the easiest though and will allow you to use the code I pasted above.
Forum: Fixing WordPress
In reply to: Is it possible to use WordPress Authentication for non-WP pages ?Put whatever you want to be hidden to normal users inside the if which determines user level, it will check if the logged in user is an admin (or change 1 to lower for different user levels, I don’t know which is which).
Forum: Fixing WordPress
In reply to: Is it possible to use WordPress Authentication for non-WP pages ?You can query user level with code like:
<?php global $user_ID, $user_identity, $user_level ?> <?php if ( $user_ID ) : ?> <?php if ( $user_level >= 1 ) : ?> <?php print $user_identity. "is an admin"; ?> <?php endif ?> <?php endif ?>
That should work I would think, It’s a common bit of code I use for admin widgets and such.
Forum: Fixing WordPress
In reply to: HeaderTo fix this, go into your style.css and find
#branding img {
border-bottom: 1px solid black;
border-top: 4px solid black;
clear: both;
display: block;
}That border-top: is why you have the black line. You can just take away that entire line or put border-top:none
Forum: Fixing WordPress
In reply to: HeaderLink to the site please?
Forum: Fixing WordPress
In reply to: How to display the date of the last commentOkay I’ve looked into it and I reckon now the best way is to use a custom query, perhaps there are other ways. This code works for me (tried and tested) so hopefully will work similarly for you.
$PostID = get_the_ID(); $GetCommentDateByPostID = mysql_fetch_array(mysql_query("SELECT comment_date FROM wp_comments WHERE comment_post_ID = $PostID ORDER BY comment_date DESC LIMIT 1")); echo $GetCommentDateByPostID['comment_date'];
Forum: Fixing WordPress
In reply to: How to display the date of the last commentOh yeah, wrote it really quickly so bound to be errors!
You want to change get_the_ID(); with I think it is $post->ID; then I think for what you want.
Forum: Fixing WordPress
In reply to: Posts now all over the placeWhat has happened is your third and fourth .post is out of #maincontent, move the close div for #maincontent below it all and it should solve your problem.
Forum: Hacks
In reply to: Fetch RSS problemNone of your news feed items have permalinks. You should maybe do a check if the permalink is NULL, and if so link directly to https://us.battle.net/wow/en/feed/news
Nice template by the way ??