justin01
Forum Replies Created
-
Forum: Themes and Templates
In reply to: How do I allow non-wordpress people to post on p2 themed blog?Make them a user account and set the role as “Author”.
Forum: Themes and Templates
In reply to: P2 Theme – Comment Threads broken on IE8The following code applies for when your comments are hidden by default.
And as for making the “Toggle comments” link for each entry work in IE8, go into p2/js/p2.js, line 538 (the
$(".show_comments").click
function), and change the whole function for:$(".show_comments").click(function(){ var id = $(this).attr('id'); var threadentry = jQuery('#' + id + ' ul.commentlist'); if(threadentry.css('display') == 'none'){ $(threadentry).show(); }else{ $(threadentry).hide(); } return false; });
Forum: Themes and Templates
In reply to: P2 Theme – Comment Threads broken on IE8The following code applies for when your comments are hidden by default.
If it is not your case, you’ll have to simply add/remove some “
jQuery('.commentlist').show()
;” and “jQuery('.discussion').show();
“. So please keep that in mind, I didn’t test it for when your comment appears by default. You’ll just have to test and change the code.To make the “Toggle comments” link work in IE8, take this following code (in p2/inc/js.php):
jQuery("#togglecomments").click( function(){ jQuery('.discussion').toggle(); jQuery('.commentlist').toggle(); return false; });
…and change it to…
jQuery("#togglecomments").click( function(){ var elem = jQuery('.commentlist:first'); if(elem.css('display') == 'none'){ jQuery('.commentlist').show(); }else{ jQuery('.commentlist').hide(); } return false; });
That’s it for now. I learned JQuery as I was doing this, so it may not be perfect. But on my site, this made the comments toggle on both Firefox and IE8.
Forum: Fixing WordPress
In reply to: if file_exists / get_theme_dataI wanted to do an “unlink()” (delete a file), so while “@fopen” worked for the “file_exists()” function, it didn’t for “unlink()” because of the absolute path.
After messing around for quite some time, I found a solution. Even if it’s a small tip, I took the time to write a little “tutorial” about it on my Blog.
Here it is:
Have you ever wanted to use the file_exists function inside of WordPress? For example, last night I wanted to delete a file that was at the third level of my folders’ tree (/public_html/wordpress/imagefolder) from a custom PHP page in my WP theme’s folder.
Sounds easy, right? If you know a little about relative and absolute paths inside of WordPress, you’d write : ../imagefolder/image.jpg (where “..” represents “wordpress” if you did a standard install).
Putting “../imagefolder /image.jpg” in the SRC attribute of an IMG tag would work perfectly. So with that logic, would file_exists(“../imagefolder /image.jpg”) also work (inside WordPress)? Don’t ask me why, but no.
After testing a bunch of different functions and looking on how to change file permissions on WordPress for a long period of time, I found the solution and it was surprisingly easy.
Instead of putting 2 periods before the file path, put only 1. Like so:
file_exists(“./imagefolder/image.jpg”);
Now you can check if a file exists and/or unlink() it from anywhere.
Hope this helps and saves you time.
Forum: Fixing WordPress
In reply to: How to do thumbnails?The src=”” property of your <img/> tag isn’t defined. Go look in your theme’s index.php file and look at what’s in the “src” of the loop (in the “postcontent” <div>).
Forum: Your WordPress
In reply to: Ninjas > PiratesHey thanks!
I haven’t really thought of the forum’s design since 2.5, so thanks! I’ll definitively take a look at it.
Forum: Fixing WordPress
In reply to: Bullet points hide behind pictureYes, you can do this by changing the “list-style-position:inside;” to “list-style-position:outside” in the “ul”, but this would require some other changes/tweaks and sadly, I don’t have the time for this.
I would recommand you pay someone or wait for someone else on this forum to correct this problem for you.
Good luck.
Forum: Fixing WordPress
In reply to: How do I remove these 2 images?Delete these lines:
<div class="sidebaradbox"> <?php echo get_theme_option('ad_sidebar1_bottom'); ?> </div>
Please, next time, go look in the website’s source (CTRL+U) or get the Firebug addon for Firefox. This is pretty easy…
Forum: Fixing WordPress
In reply to: Using an image on the comment submit buttonWebsite’s address please.
Or go look on W3C’s website, if I remember correctly, you can disable the border with some property.
Forum: Fixing WordPress
In reply to: Bullet points hide behind pictureGo in your CSS stylesheet (style.css).
Look for this and delete line 2 and 3…:
.Post ul li { padding:0px 0 0px 11px; background-image: url('images/PostBullets.png'); /* !!! DELETE THIS LINE !!! */ background-repeat:no-repeat; /* !!! DELETE THIS LINE !!! */ margin:0.5em 0 0.5em 0; line-height:1.2em; }
Always in your stylesheet, look and add line 2 and 3…:
ul { list-style-type: none; list-style-image:url(images/PostBullets.png); /* !!! ADD THIS LINE !!! */ list-style-position:inside; /* !!! ADD THIS LINE !!! */ color: #403A3F; margin:0; padding:0; }
Forum: Fixing WordPress
In reply to: New Page template almost working but…..Go in your CSS stylesheet (style.css).
Look/find:
/* begin LayoutCell */ .art-contentLayout .art-content { position: relative; margin: 0; padding: 0; border: 0; float: left; overflow: hidden; width: 685px; /* - - - REMOVE THIS LINE - - - */ }
Remove “width:685px;”.
Forum: Fixing WordPress
In reply to: New Page template almost working but…..Shoot your website’s address.
Forum: Fixing WordPress
In reply to: How do I remove these 2 images?Looks like it has to do with this line:
<?php if(is_home()) { include (TEMPLATEPATH . '/featured.php'); } ?>
I think you could just remove this line or take a look at the featured.php file and then delete the unnecessary Javascript files in the “jdgallery” folder.
Forum: Fixing WordPress
In reply to: How do I remove these 2 images?Open index.php, find those, delete them.
Good luck.
I think it’s fixed now.