mcmartin
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Future events category & anotated calendar working!Hmm … are you using the FuturePosts plugin with $future_single_only=false; ? That should make all future posts available for showing.
Forum: Fixing WordPress
In reply to: Future events category & anotated calendar working!zarastudios, the calendar plugin just generates the calendar and that’s all. Glad to hear that much is working for you. To get the entries below, you can just leave The Loop executing as normal, or change it to get the entries below something like I did, only future entries first, and in chronological order instead of the last-entry-first as is the default for WP.
This is the main part of the PHP code for what I did on my calendar page:
<?php get_event_calendar(2,'sun',6,True,1); ?><h2>Upcoming Events:</h2>
<?php $now = gmdate('U'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php /* if this is a future post: */ if ($now <= get_the_time('U')) : ?>
<div class="post">
<h3 id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></h3>
<small><?php the_time('l, F jS, Y') ?></small><div class="entry">
<?php the_excerpt() ?>
</div><?php trackback_rdf(); ?>
</div>
<?php endif; ?>
<?php endwhile; ?><div class="navigation">
<div class="alignright"><?php posts_nav_link('','','Next Entries »') ?></div>
<div class="alignleft"><?php posts_nav_link('','« Previous Entries','') ?></div>
</div><h2 align="center">* * * *</h2>
<h2>Past Events:</h2><?php $now = gmdate('U'); ?>
<?php rewind_posts(); ?>
<?php while (have_posts()) : the_post(); ?>
<?php /* if this is a past post: */ if ($now > get_the_time('U')) : ?>
<div class="post">
<h3 id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></h3>
<small><?php the_time('F jS, Y') ?></small><?php trackback_rdf(); ?>
</div>
<?php endif; ?>
<?php endwhile; ?><div class="navigation">
<div class="alignright"><?php posts_nav_link('','','Next Entries »') ?></div>
<div class="alignleft"><?php posts_nav_link('','« Previous Entries','') ?></div>
</div>So you see I run The Loop twice. The first time it only outputs future dates, and the second time it only outputs past dates. That way I can make the past dates show up in a more condensed format (no excerpt) to save space.
I hope that helps some! -Mike
Forum: Fixing WordPress
In reply to: Giving users a very restricted post pageThanks for the tip! I actually ran across your quick-post plugin, but hadn’t looked carefully enough at it. I like what you’ve done and I think I’ll first try just making a special page that uses your quick-post plugin so that registered users can submit their own simple posting, and perhaps I’ll add a couple more fields and helpful text so people know what they should post. I like how you have the rest of the fields hidden, but it still uses all the built-in posting codes.
Thanks! -Mike
Forum: Fixing WordPress
In reply to: Future events category & anotated calendar working!Hi Markus,
Sorry for being out of touch for a few days. It sounds like you’ve figured out most things! Good job!Let me try to answer your questions:
category-2.php this is a a file you can put in your themes folder to give the main page for category 2 a different type of look or code. So in your case, if you copy achive.php to category-13.php, then now whenver anyone requests the archive page for category 13, then they’ll see whatever you’ve put into that new category-13.php code, instead of the default category archive look. This lets you set up just that page to have whatever calendar you like instead of putting it on the main page. Of course if you want to put the calendar on the main page, that’s fine!Yes, the “future posts” plugin when you have $futuresingleonly set to false will show all future posts anywhere (calendar, the dates you click on, and the main home page). What I did was change the main home page so that each category is shown separately instead of just all posts by most recent date. You can customize the main page by copying index.php to main.php and then editing main.php to whatever you want. I’ve been using calls like
<?php query_posts('category_name=news&showposts=3'); ?>to show only the most recent 3 ‘news’, etc.Depending on what you’d like to do, you could also just make your main home page not show all posts from category 13:
http://codex.wordpress.org/The_Loop#Exclude_Posts_From_Some_CategoryOr you could exclude only posts from the future on the main page even though the future posts plug-in would normally show them.
<?php /* if this is a future post: */ if ($now <= get_the_time('U')) : ?>
then_do_something
<? php else: ?>
show_the_post_or_whatever
<? php endif; ?>As to why I did it for 6 months on my page, I figured that for upcoming conferences you really want to know a fair ways out what’s coming up (usually you have to register for conferences several months in advance), so six months seemed reasonable since more would start pushing the page down too far to see it all easily.
The other question you had was about how to make this like a ‘normal’ calendar with the next and previous month buttons at the top. Actually the plug-in will automatically put links to the next month that has a posting, and the previous month that has a posting. So if you fill up your calendar with enough entries, then I think this will work something like you’re thinking.
Hope that all helps! And glad to hear you’re getting it to work! -Mike
Forum: Fixing WordPress
In reply to: Giving users a very restricted post pageOK, four days and time for a bump. I haven’t come up with any better ideas than the one above. Any other ideas or suggestions?
Forum: Fixing WordPress
In reply to: Future events category & anotated calendar working!Hmm … whenever I’ve seen errors of that nature it was always something minor wrong in the PHP codes. Since it goes away when you disable Futureposts, let’s see if there is something with that plugin. What do you have the two options in futurepost.php set to? I have mine
$future_min_level=0;
and
$future_single_only=false;
The first means everyone can see future posts, and the second means that future posts will show up in all the pages (category pages, date pages, as well as single post pages). Even with this set to false I still don’t see future posts listed in the sidebar ‘archives’, so perhaps it’s not as universal a setting as was intended, or perhaps the sidebar code isn’t changed by the futureposts plugin.Anyway, after setting both of these variables in the futureposts plugin, see if you still get the error. If so, try putting the call to get_event_calendar in one of the other template pages (like the archives template, archive.php and see if it works there instead of the sidebar.
-Mike
Forum: Fixing WordPress
In reply to: Future events category & anotated calendar working!Hi Markus,
So it seems the problem is the plugin is not activating. Since I’ve never actually made a plugin, perhaps I’ve done something wrong. Or perhaps it doesn’t like the changed filename (+MCM) or that filename doesn’t match the name listed inside the plugin file. So try changing the filename of the plugin to eventcalendar2.php and then see if that will activate. Also, to show future events, you should also install the View Future Posts plugin as I linked to in the first message here.The call you make to get_calendar should still return just one month. So have multiple months, use a call something like what I do:
<?php get_event_calendar(2,'sun',6,True,1); ?>
This gets events for category 2, starting the week on Sunday, for 6 months, True shows all posts in this category, and 1 uses one letter day abbreviations. The changes I made to the plugin make it automatically go to a new table line after three months. So if you specify 3 or less months, they will all be side by side, then for 4-6 you’ll get three on top and then the next up to three below, etc. I stopped checking after 15 months, so this will only work for that many months. As such, this output won’t fit in the sidebar, which is why I put the call to generate the calenar in the main page for the specific category (category-2.php in my case).
-MikeForum: Fixing WordPress
In reply to: Future events category & anotated calendar working!Hi Markus,
Sorry if I’m confused … the modified php file I linked to had an extension of .txt … you copied this to your plugins folder and then named it with .php extension right? Then what does the plugin manager show? Does it have the link to activate it? I think if it’s not activated, it won’t work at all.Like I tried to say, I haven’t worked on making this a full-blown plugin, and perhaps there is some error I’ve made that’s preventing it from being a ‘real’ plugin. Can you describe more what you mean when you say you can’t activate it?
-MikeForum: Fixing WordPress
In reply to: Future events category & anotated calendar working!Thanks for the kind replies. I continue to tweak and like the page.
Oh, and that IE error I noted is now fixed (or at least I found a good enough work-around).
I haven’t yet tried to make the changes to eventcalendar2 all foolproof, but I wouldn’t think it’s be too hard to pass another variable to a new version of this plugin which would allow muiltiple months to be displayed wide (like I’ve done), or an a collum (like the default for putting a calendar in the sidebar). You can look at the modified plug-in code here:
http://thznetwork.org/wordpress/wp-content/plugins/eventcalendar2+MCM.php.txt
but I have not fully commented the changes or tried to make the changes universally use-able. I guess if there was sufficient interest it wouldn’t be too hard to make a modified version of this plug-in with a little more robust descriptions and codings.I of course also made a custom category-2.php file to give it the correct look and separate out future from past events in the list at the bottom. And changed the colors for the table entries to better highlight the event days in the styles.css file.
Forum: Themes and Templates
In reply to: Howto: multiple loops in 1.5In this case I’m just doing a rewind_posts() and then running The Loop again. Since it’s top category page, only posts from that category come out. If either the first or second running of the loop generates a second page, then BOTH the first and second calls to next/prev navigation return a next link. I don’t yet know why, but if I try a query_posts from within this category page I get a database error (it works fine on my home.php page).
Forum: Themes and Templates
In reply to: Howto: multiple loops in 1.5This multiple loop hack is great, but it breaks prev/next navigation. Is there any way to have prev/next work, and for each loop?
This is my question exactly. I’m running The Loop twice so I can show future postings in a group, and then past postings in a group.
See the page I’m talking about here.
The problem is when I reach the 10 post limit in total (both past & present), the prev/next stuff comes up. For the moment I’ve just made the limit larger, but I’d like to find a way to get this to work more cleanly instead of changing the global limit setting.Since I’m sorting by date after the loop gives the postings, is there anyway to tell the loop that I’d like x more please?
Forum: Themes and Templates
In reply to: kubrickheader.jpg in wrong place with IEWell, after many hours of playing, I’ve finally found one way to fix this problem. I don’t think I fully understand why this in needed, but this is what I did.
In the header.php file, I changed the #headerimg line to now read:
#headerimg { position: absolute; top: 20px; left: 50%; margin: 7px 9px 0 -370px; height: 191px; width: 740px; }
As you see this now puts the headerimg div at an absolute position from the top, and 1/2 way back from the middle. By doing this the header image and other text now shows up in the correct place. By making a border visible on this div, I could see that there was an extra space above the stuff I want. With this work-around, now there is an extra space below, but this doesn’t push any of the elements around so all looks fine. Still haven’t figured out where that extra space is coming from, but glad to have this finally render correctly in IE.
Once again here’s the link to see my WP site.
Forum: Plugins
In reply to: Future events on calendar with futureposts.php?This is deffinately possible … I use EventCalendar2 to show future events (as well as past ones). I then tweaked this plugin to display a multi-month version in my main window. See this thread to read more and see it in action.
-MikeForum: Themes and Templates
In reply to: kubrickheader.jpg in wrong place with IEThanks for the replies! I first commented out the supernav stuff, but that didnt’ change the positioning of everything else.
I then went through and tried adding margin: 0px; to many places in the CSS header image stuff, the style.css file, under any section that I thought might be remotely related, but I haven’t ever seen it move at all in Explorer.Anyone else have any other ideas??
Forum: Themes and Templates
In reply to: kubrickheader.jpg in wrong place with IEHmm, any ideas? Bump. I can’t seem to find why in IE there is some extra space at the top of the page which is pushing the header image (and everything else not at an absolute position) down.
Thanks.