iamchel
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to specify attachment locationAlright so I managed to get this working by using custom fields and a for each loop. Now my problem is that while it works its not exactly ideal in that the user has to always copy and paste the image url in. Is there some way to allow direct upload via custom fields or perhaps a more elegant approach besides forcing the user to copy and paste. Thanks.
Forum: Fixing WordPress
In reply to: User profile pagesAlso would it be best to create posts for the authors profiles instead and use a specific authors only category?
Forum: Fixing WordPress
In reply to: How to add flash to templateAnyone?
Forum: Fixing WordPress
In reply to: How to add flash to template<script language="javascript">AC_FL_RunContent = 0;</script> <script src="<?php bloginfo('template_directory'); ?>/AC_RunActiveContent.js" language="javascript"></script>
Header script enclosed in the code tags now. Sorry if theres an edit post button..I can’t seem to find it. Edit* I was having trouble earlier when I posted my first post where the Edit button would take me to the home page but its working now. Nevertheless Im still looking for help :p
Forum: Fixing WordPress
In reply to: How to create a very simple image galleryUpdate* I managed to find what I was looking for in the wp-includes/media.php file. In particular line 739 for the CSS and 688 for the HTML tags it uses.
Forum: Fixing WordPress
In reply to: How to create a very simple image galleryPerhaps I should clarify. Currently the thumbnails are given styling which makes them center aligned, as well as margins, and a border. Of course Im trying to remove all the default styling and use my own however when I specify the changes in my stylesheet they are overridden.
#gallery-1 { margin:auto; } #gallery-1 .gallery-item { float:left; margin-top:10px; text-align:center; width:33%; } #gallery-1 img { border:2px solid #CFCFCF; } #gallery-1 .gallery-caption { margin-left:0; }
While I can overcome most of them by simply using !important behind the attributes I want to change there are some that I can’t get around (at least I don’t know how to) such as the width of 33% which is causing my thumbnails to spread out evenly among its containing box, which is not what I’m trying to do (they should be side by side with no space). If anyone has a workaround or some way of altering the HTML/CSS please let me know.
Forum: Fixing WordPress
In reply to: How to create a very simple image galleryThank you for replying. Ive delved into the default wp gallery and it turns out I can achieve what I’m looking for. Now I have one question. Is it possible to modify the structure (HTML wise) of the way attached image thumbnails are set? Or can anyone tell me where I can find the code so I can just change it to my likings?
Thanks
Forum: Fixing WordPress
In reply to: How to create a very simple image galleryAnyone? I believe nextgen may do the trick however Im not sure what to do to actually achieve what Im going for.
Forum: Plugins
In reply to: Looking for an image functionit works in ff but in ie7 I get “error on page” on the bottom left corner of the browser and it doesn’t apply any of the styles from the script.
Forum: Plugins
In reply to: Looking for an image functionAlright its getting closer and closer to working ??
Only problem is that its not working in ie
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; Creative AutoUpdate v1.40.01)
Timestamp: Wed, 14 Oct 2009 18:01:16 UTCMessage: Invalid argument.
Line: 1061
Char: 4
Code: 0
URI: https://localhost/wordpress/jquery.jsNot sure what that means…
Forum: Plugins
In reply to: Looking for an image functionOddly enough I just noticed that t
he alternate stylesheet is being applied to the entire page.
I have this code below and its adding the border to everything including the gravatar’s I have in the sidebar…
.avatar { border: 4px solid #000; }
EDIT* heh I spoke to soon…the gravatars have the class avatar by default from this plugin lol
EDIT2* I removed the gravatars from the sidebar and its working perfectly now. I guess the code just looks for anything named avatar and not necessarily and alt of avatar?
Now I just need to find out how to get the image to the other div :p
This is the code generated by the gravatar plugin Im using in case you want to inspect it some more.
<img class="avatar avatar-42" height="42" width="42" src="https://www.gravatar.com/avatar/52e0fd687705f1f3ccbc97175953f14a?s=42&d=identicon&r=pg" alt=""/>
Forum: Plugins
In reply to: Looking for an image function<?php /** * @package WordPress * @subpackage Default_Theme */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="https://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> <head profile="https://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <title><?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?></title> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { $('.post img').each(function(index){ if ($(this).attr('alt') == 'avatar') { $(this).addClass('avatar'); } }) if ( $('.avatar').length > 0 ) { $('head').append('<link rel="stylesheet" href="./wp-content/themes/unveiled/alternate.css" type="text/css" />'); } }); </script> <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/mastersheet.css" type="text/css" media="screen" /> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <style type="text/css" media="screen"> <?php // Checks to see whether it needs a sidebar or not if ( empty($withcomments) && !is_single() ) { ?> #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/./wp-content/themes/unveiled/images/kubrickbg-<?php bloginfo('text_direction'); ?>.jpg") repeat-y top; border: none; } <?php } else { // No sidebar ?> #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/./wp-content/themes/unveiled/images/kubrickbgwide.jpg") repeat-y top; border: none; } <?php } ?> </style> <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?> <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <div id="content">
That is my head..its heavily modified (I admit, its pretty sloppy) to fit my needs.
If I understood correctly
$('.post img').each(function(index){
.post is the class of the container? If so would it be safe to say that its alright to change it to what Im using on my end?
I should note that it is loading the alternate stylesheet but its not working conditionally from what I can see..its just loading it for every page.
Forum: Plugins
In reply to: Looking for an image functionAlright absolute paths worked (well I had jquery.js in the wrong directory) but its still not adding the stylesheet. It is however, changing the body’s bg to #eed
*edit
I changed the code to the following (the stylesheet’s url)
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { $('.post img').each(function(index){ if ($(this).attr('alt') == 'avatar') { $(this).addClass('avatar'); } }) if ( $('.avatar').length > 0 ) { $('body').css({'background' : '#eed'}); // just for testing $('head').append('<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/alternate.css" type="text/css" />'); } }); </script>
and now its including the alternate stlyesheet on every page regardless if an image with the alt attribute of avatar is present.
Im not familiar with jquery at all so perhaps Im not understanding something..does the code above look for a specific image with the alt of avatar in a particular div? If so where is that div being specified? Thanks.
Forum: Plugins
In reply to: Looking for an image functionwhen I view the source there isnt any extra stylesheet being appended.
I am however getting this from firebug
$ is not defined wordpress?paged=2()wordpress?paged=2 (line 14) [Break on this error] $(document).ready(function() {\n
sorry I don’t have any working example to link to..I’m doing this all on my machine.
Forum: Plugins
In reply to: Looking for an image functionsorry that was a kind of dumb question..found that its javascript so I put it in between the head tags but its not doing anything.
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { $('.post img').each(function(index){ if ($(this).attr('alt') == 'avatar') { $(this).addClass('avatar'); } }) if ( $('.avatar').length > 0 ) { $('body').css({'background' : '#eed'}); // just for testing $('head').append('<link rel="stylesheet" href="alternate.css" type="text/css" />'); } }); </script>
so what did I do wrong? lol