Forum Replies Created

Viewing 15 replies - 421 through 435 (of 3,008 total)
  • Thread Starter Doodlebee

    (@doodlebee)

    Just a quick update, in case anyone was wanting to accomplish the same thing. 3.0 gave some fun things to use to pull this off – but I also got some compromises form the group. So instead of archiving the newsletters via WordPress, what we’re doing is archiving the newsletter *files* via WordPress. Every month, they do a “print preview” to save the online version as a PDF file,and that PDF is what gets emailed to the group, and printed for mail distribution. SO now we’re going to upload a monthly archive of the PDF files, and if you want to see an old newsletter, you download the PDF (uploaded in the media library). I’ve done some other custom coding to make a gallery from the media library (these are all unattached files – so this gallery pulls directly from the media library) and sort them on order by descending date. it’s working wonderfully. Now I don’t have to worry about the weird date offset, and all is well 🙂

    ..and actually, you *can* use wp-list_comments, if that helps. You can use a function to rewrite how it’s output. Here’s an example I use all the time (I separate my stuff for easier management, but you don’t have to):

    single.php

    <div id="comments_div">
             <?php include(TEMPLATEPATH . '/commentform.php');
                   comments_template(); ?>
           <!--/comments_div-->
           </div>

    commentform.php holds the “form” layout. the comments_template() (which is basically comments.php) looks like so:

    <?php // Do not delete these lines
    	  if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    		die ('Please do not load this page directly. Thanks!');
    
    	if ( post_password_required() ) {
    		 // message for notifying of password-protected posts
    		return;
    	}
    ?>
    
    <?php if (have_comments()) : ?>
        <h3 class="hot_topics">Add a Comment</h3>
        <div id="commentlist">
    	<?php wp_list_comments('type=comment&callback=format_comment&style=div'); ?>
    	<!--/commentlist-->
    	</div>
    
    	<div class="navigation">
    		<div class="alignleft"><?php previous_comments_link() ?></div>
    		<div class="alignright"><?php next_comments_link() ?></div>
    	</div>
    
    	<?php $postinfo = get_post($post->ID);
    	      if(comments_open()) : ?>
    		  <a class="comment-reply-link" href="#goto">Would you like to join the discussion?</a>
    
    	<?php else : ?>
    	      <small>Sorry - comments are closed on this subject. You can thank the spammers for that one.</small>
    	<?php endif;
    	      endif; ?>

    You’ll see at the top I’m using wp_list_comments, but I’m pulling in a callback function to mess with the layout and add classes as I see fit. This section of my functions.php file looks like so:

    function list_pings($comment, $args, $depth) {
           $GLOBALS['comment'] = $comment;
    ?>
            <li id="comment-<?php comment_ID(); ?>"><?php comment_author_link(); ?>
    <?php }
    
    add_filter('get_comments_number', 'comment_count', 0);
    function comment_count( $count ) {
    	global $id;
    	$get_comments= get_comments('post_id=' . $id);
    	$comments_by_type = &separate_comments($get_comments);
    	return count($comments_by_type['comment']);
    }
    
    function format_comment($comment, $args, $depth) {
       $GLOBALS['comment'] = $comment; ?>
    
       <div id="comment-<?php comment_ID(); ?>" <?php comment_class(); ?>>
       <?php if ($comment->comment_approved == '0') : ?>
       <em><?php _e('Your comment is awaiting moderation.') ?></em><br />
       <?php endif; ?>
    
         <?php echo get_avatar($comment,$size='50' ); ?>
         <?php comment_text(); ?>
    
       <div class="comment-author vcard clear">
       <?php $from = $comment->extra_town;
             if($from !='') $mytown = ' (from ' . $from . ') '; ?>
         <span class="authorinfo">by <?php printf(__('<cite class="fn">%s</cite>'), get_comment_author_link()) ?><?php echo $mytown; ?>
         on <a class="date" href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(),  get_comment_time()) ?></a>
         <?php edit_comment_link(__('e'),'  | ','') ?></span>
         <?php comment_reply_link(array_merge( $args, array('add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
       <!--/comment-author-->
       </div>
    
    <?php
    }

    Would that help you at all? You should be able to use your own classes and functions, and rearrange things as needed with this callback method.

    Hi Jesse! I saw your “call for help” on Twitter, so I’m going to give it a go. A warning: I didn’t get much sleep last night, so I might have jibberish – so please bear with me, and forgive any weirdness 🙂

    Okay so what I gather is you want a custom layout for your comments, with comment replies. It would help to see your comments_rating_list() (and our get_average_comment_rating())function – is that a plugin? From what I see here, there isn’t a whole lot that’s wrong, but without actually seeing the functions (to check for conflicts/errors), there’s not much to go by.

    Thread Starter Doodlebee

    (@doodlebee)

    Thanks again, Michael 🙂 I’ll give that plugin a shot too.

    And I see what you’re saying about the post-types – so there’s no “archive” of post types then? I’m not shy about writing plugins – so perhaps that’s an idea that might be helpful….

    but anyway, you’ve given me some good starting points, and I really appreciate it 🙂 Thanks!

    Thread Starter Doodlebee

    (@doodlebee)

    Actually, now that I think of it, custom post types just might be the way to go. I can set the “Archive” to just pull the most recent post from each author. That would even clear up a secondary issue I’ve been having (recurring posts)…but I’m wondering how the “Archives” would work for that. I’ll have to investigate further 🙂

    Thread Starter Doodlebee

    (@doodlebee)

    Thanks Michael. Yeah, it *does* seem like a bunch of gunk. WHich is why I’m thinking there has to be a better way to pull it off.

    Basically, it’s for a newsletter. They put it out *before* the first of the current month (it actually gets sent out on the 20th of each month) which is why the offset is needed. Currently, I’m pulling it off by using tags – which is working, but it’s still a nightmare. I keep thinking if I can just offset it to start the month on the 20th of 2 months prior, it would just automagically do it. Perhaps custom fields would be a better way to go.

    I’m also using the 3.0 Beta 2, so I’m thinking maybe one of the new functions (*maybe* custom post types?) provided might pull it off better as well.

    But thanks for the tip on #1 🙂 At the moment, I’m using userextra/usermeta for this, and it’s also proving to be a mess because i have to change data in three different places to make it work. So I’ll check that out and see what I can work with that.

    Thanks again! 🙂

    Forum: Plugins
    In reply to: Customize Look of Nav items
    Thread Starter Doodlebee

    (@doodlebee)

    Okay – nevermind. I managed it 🙂

    I found the easiest method was simply to copy the wp_pagenavi() function from the plugin file, rename it, and stick it into my functions.php file – then I called in the renamed function into my theme file. I also cleaned up code I didn’t need. All I had to do at that point was find the sections I needed moved, and moved them. made a few other minor edits, and bam – it’s now laid out perfectly, and I don’t have to worry about it being overwritten when I upgrade. Thanks anyway!

    Thread Starter Doodlebee

    (@doodlebee)

    I should note – the above does work, but only if you have a setup like mine (where it uses one post per page). It does *not* work on single.php – because it’s not paginated 😉 I still have to figure something out for that – but for now I’m letting it go.

    Sorry – I was out of town last week.

    What I meant by the Twitter widget was I’m using the “Firebug” add-on for Firefox, and it tells me what things make the site “hang”. Your Twitter widget makes the site slow – but then again, you’re using a 3rd party app (Twitter) and that’s to be expected.

    There’s something called “ga.js” (ah – Google Analytics) that’s *still* trying to load – and it’s been a good 5 minutes since I brought up your site. Your timthumb script is also doing a funky dance.

    otherwise, it looks fine. Showing up just fine for me in FF 3.5, Opera, Safari and Chrome – so maybe yougot it all fixed while I was gone last week 🙂

    Nice site, BTW!

    I want to be able to have blog posts and pages on other parts of the website completely separate from the blog page. The website page is not going to have any blog navigation, the fact that I’m using pages, posts and categories to display the information on these parts of the website should be transparent to the user. Only the blog part should actually look like a blog.

    Yep, I understand this completely. This is totally doable with a single installation, and you can manage the single theme from the one installation.

    1. Including or excluding, no matter which method I use, it is still adding code to my theme that is hardcoded to my “blog” category. I have to update every single page in the theme to accomplish this. And should the design at any point change, I will have to change that hardcode.

    uhh… no. This is *completely* untrue. IF you choose to hardcode, then again, you’re making things more difficult for yourself, and what you’re saying might be true. but you don’t need to do that.

    2. It requires the small maintenance of making sure every blog post is in a category parented under the “blog.” Uncategorized blog posts will mysteriously disappear from my website.

    Again, no. You can set a category for your blog posts, and make it the default in your “settings” area.

    3. I’m not sure why you mentioned having a pagination problem with including an entirely separate page,

    Because when you create a static Page, and create theme ile to call in a category of posts to that page, you *will* have pagination issues (i.e. if your blog is set to show the most recent 10 posts, it’ll paginate when it hits post “11”. If you use a query – which you will within the page.php template to call in your posts – you have to use a special query so this pagination will not break. So if you’re keeping your blog and your site “separate”, then you might as well just use the category and forget about it – just link to the category rather than the page.

    next_posts_link and previous_posts_link weren’t built to search categories.

    Agian, you’re wrong. You can even remain in the same category if you so desire, so you can paginate through a single category – there’s a setting for that.

    Good luck with your project.

    Thread Starter Doodlebee

    (@doodlebee)

    Thank you both! I don’t know how this got marked “resolved” before today – ’cause I just saw your responses today – but it’s resolved now! I used both of your suggestions, messed with it a bit, and came up with the solution (thank you SO much for pointing me in the right direction!)

    t31os_, yous gave the the *current* page I was on, but I needed one page up and one below. So my code now looks like this:

    <?php if(!is_page()) {
    	  	$thispage = get_query_var('paged');
    	  	if($thispage == '0') $thispage = 1; // because the most recent post is given a value of "0", we need to reset it to "1"
    	  	    $next_page = $thispage - 1;
    	  	    $prev_page = $thispage + 1;
    	  	    $tot_pages = $wp_query->max_num_pages;?>
    	  <p class="postmetadata clear">
    	    <span class="left"><?php next_posts_link('&laquo; Previous Post (' . $prev_page . ' of ' . $tot_pages . ')') ?></span>
            <span class="right"><?php previous_posts_link('(' . $next_page . ' of ' . $tot_pages . ') Next Post &raquo;') ?></span>
    	  </p>
    	  <?php } ?>

    Thanks again!

    Sorry – I was away!

    Alright, so one of my “static” pages, actually points to a category so I can dynamically add extra posts to that static page as needed and have them formatted nicely for me.

    This is really unnecessary. You can simply create a category (say “blog”) that will hold all of your blog posts. Then create categories for your blog posts as children of “blog”. You can style “blog” however you like. There’s no need to use a query to pull in your posts – the method ias already set up for you quite simply, and using the method you have now can lead to troubleshooting issues (a big one I can think of is the issue with pagination – which gets munged when you use query_posts(); You can fix it, but if you just set it up as a category to being with, you don’t have to repair what doesn’t need fixin’ in the first place.)

    How would I exclude this category from the blog nav-bar, while keeping all the blog-related categories?

    Just don’t include it. Conditionals will allow you to display things based on what section of the site you’re on. And when WP 3.0 comes out (it’s in Beta testing right now, so this’ll happen probably by July or thereabouts) it’s made even easier to create your navigational systems.

    I have a feeling you’re going to mention some way to exclude pages and categories from the navbar.

    Yes, it’s called a conditional. You write 2 different navigational bars in your header or sidebar, which *include* (not exclude – exclude means every time you add something, you have to edit the theme to keep it from showing up) and based on the conditional, it’ll show or hide what you want. Takes literally five seconds (okay, it’ll take as long as it does to type it – so if you’re not a fast typist, it’ll take a little longer.)

    since it meant I didn’t have to try to write custom excludes for categories all over the place. Excludes that most likely involve mucking around in the wordpress theme php. Logging into my blog to update my blog, and my website to update my website seemed much more headache-free in the long run if I can get it set up correctly just once.

    But setting up two separate installations to accomplish something WP already does by default in a single installation is what will give you the headaches. The method I’m referring to up there is the fastest, easiest and most maintenance-free method.

    Now, if you still want to set up 2 different installations, and try to use a single theme to make everything look the same, feel free. But you’re asking for the headaches you’re trying to avoid – and I doubt you’ll receive much help on it, since WP already does what you want by default. I don’t think anyone will bother to try it because what you’re asking to do is basically make twice as much work for yourself unnecessarily. I suppose it’s *possible* to pull off, but the real end question is “why?”

    As the saying goes, if it ain’t broke, don’t fix it. If you want to customize your site, you *will* have to mess with the theme files – there’s simply no way around that no matter what you do. but the method I’m describing will get you going in minutes. What you’re trying to do will take days, and then you’ll be troubleshooting bugs all over the place for months and end up with a “WordPress sucks” attitude – which isn’t fair if you’re not using it correctly 😉

    I think we’re having some sort of communication issue here, because I still don’t understand (sorry!)

    You can run WordPress as a CMS just fine. You can also run it as a blog – in the same installation, at the same time. I don’t know of anything that would allow you to run a single set of theme files from one installation on another – and really I wouldn’t want to anyway because it would open up a ton of headaches. Truly, you are making *way* more work for yourself than you need to, and making things a lot harder than they should be.

    You don’t *have* to have blog stuff show up on the “CMS side” – and you can keep “CMS stuff” from appearing on the “blog side”. That’s not an issue at all. if you want to have the blog match the CMS, and only edit in one spot, then you only need a single installation and use WordPress properly instead of trying to rewrite it.

    Just use the static Pages for your static pages (that’s what they are for), and use the categories for the “blog” section. You can even intersperse these and have the areas seem separated. it’ll make it a LOT easier on yourself if you just take WP as it is, and use it how you like, and make those divisions within your theme editing. It’s *really* easy to do, actually.

    I just checked it out in both Chrome and FF 3.5 on Mac. In FF, your top content is being pushed down by the bug adspace there, and is overlapping the main section. In Chrome, it actually does appear – and after the page fully loads it disappears, leaving only three small thumbnail images.

    You might start by fixing your validation errors. That’s get you started on your way to debugging the issue. Many times, just validating fixes the issue on it’s own.

    Also, your Twitter widget is having troubles (especially the search thing), and there’s something from lijit.com that is still trying to load after 10 minutes of waiting.

    So I would recommend you first deactivate your plugins and temporarily dispose of your third-party functions/plugins/code, and validate your site. See if that helps. if it does, then start re-activating your plugins one at a time and see what effect they have. Somewhere in there, I bet you’ll find the culprit.

    I’m using one wordpress installation as a cms for my website, and I’m using a second as a blog.

    Why?

    I’m trying to more or less just get the header from the website cms wordpress installation included into the wordpress blog.

    You can just use the one installation for the CMS and blog, and it’ll all use the same theme. There’s really no need for *two*.

    I’m trying to do this so that the website navigation, which is included in the header php, is universal for the website and is easily maintained through a single cms.

    Again, can be done with a single installation.

    I haven’t read the rest of your attempts, because it’s really unclear as to why you’re doing it this way. You can use WP as the CMS for the site *and* have it run the blog all at the same time – there’s no problem with doing this at all (I should know, I do it all the time!)

Viewing 15 replies - 421 through 435 (of 3,008 total)