On these pages are my WordPress plugins, the odd article and my Support Forum.

For my random rantings on everything else please visit my blog at Yellow Swordfish

WP Plugins


Articles

If you find any of my plugins useful, please comsider a donation towards my running costs.

Thank you

In preparation for the release of Simple:Press Version 4.0, the Support Forum has moved to a new site dedicated to the plugin. This will also be the future home for Simple:Press Forum.


Version 3.1.4 will still be available for download here in the short term.


For the support forum - and to visit our new site and to get details of version 4.0, click on the logo to take you to simplepressforum.com

This forum is currently locked - access is read only
Current User: Guest
Please consider registering

 
Search Forums:


 




Recent Forum Posts on Side Bar

UserPost

12:58 am
19 Feb 2007


Desi

Member

posts 44

1

As you know, I am running the Minimalist theme and it has a side bar that is displayed all the pages.  The side bar includes a recent posts section.  I would like to include a Recent Forum Post section that just says Who Posted the on what topic… So for instance: "Desi on Simple Forum is Great."  The html for the normal recent post section is pasted in below.  Don't suppose you could assist in changing this to pull up the right information from the sf portion of the database?

 Thanks!

Desi

//–<?php

$today = current_time('mysql', 1);

if ( $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' AND post_date_gmt AND post_type='post'< '$today' ORDER BY post_date DESC LIMIT 5")):

?>

//<h2><?php _e("Recent Posts"); ?></h2>
//<div class="box">
//<ul>

//<?php

foreach ($recentposts as $post) {

if ($post->post_title == '')

$post->post_title = sprintf(__('Post #%s'), $post->ID);

echo "<li><a href='".get_permalink($post->ID)."'>";

the_title();

echo '</a></li>';

}

?>

//</ul> 

1:13 am
19 Feb 2007


Desi

Member

posts 44

2

Just downloaded 1.6 and saw the Recent Post tags.  I'll mess with it and see if I can figure it out on my own.  Thanks for this addition!

2:25 am
19 Feb 2007


Desi

Member

posts 44

3

I like the new tags and have it working great.  Just out of curiosity though, is there any way to make it work in the format I noted above.  I would just like it to match the way recent comments are set up.  And I noticed I included the wrong code above — the above code is for posts which do not note the author.  Here is the current code for recent comments…

//<?php
    global $comment;
    if ( $comments = $wpdb->get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_ID FROM $wpdb->comments WHERE comment_approved='1' ORDER BY comment_date_gmt DESC LIMIT 5") ) :
  ?>

 //<h2><?php _e('Recent Comments'); ?></h2>
 //<div class="box">
 //<ul>
 //<?php
        foreach ($comments as $comment) {
          echo '<li>' . sprintf('%s <span style="text-transform: lowercase;">on</span><br />%s', get_comment_author(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . get_the_title($comment->comment_post_ID) . '</a>');
          echo '</li>';
        }
      ?>

Also, any way to just have it say the Topic name without the "Topic:" in front?

Thanks!

9:18 am
19 Feb 2007


Yellow Swordfish

Admin

Peterborough, England

posts 5252

4

Save me hunting can you give me a link again so I can take a look at the output… then I'll come back to you on the rest?

Update: OK - I found it. More useful, actually to look at the theme original. This can ber coded very easily but not really through a standard template tag. I can knock up a bit of code for you that you can include in your sidebar and if anything useful comes out of that I can include it in the tags code for the future.

1:17 pm
19 Feb 2007


Desi

Member

posts 44

5

Excellent thanks!

3:22 pm
19 Feb 2007


Yellow Swordfish

Admin

Peterborough, England

posts 5252

6

I've sent you an email package to try out.

5:52 pm
19 Feb 2007


Desi

Member

posts 44

7

Looks great.  Thanks so much!

1:11 am
20 Feb 2007


maxpouliot

Guest

8

I wnat to do this on my site also. What's the easiest way?

1:19 am
20 Feb 2007


Yellow Swordfish

Admin

Peterborough, England

posts 5252

9

What, exactly, is it you are after?

1:43 am
20 Feb 2007


maxpouliot

Guest

10

putting recent post on the sidebar

9:55 am
20 Feb 2007


Yellow Swordfish

Admin

Peterborough, England

posts 5252

11

Well - using the supplied template tag as detailed in the guide. Is that what you mean?

3:48 pm
28 Feb 2007


Rich

Guest

12

First off, I love this pugin!

I am also trying to put recent forum posts in my navigation. I have been sucessfull in getting the posts in the sidebar, but am having trouble formatting them. I sthsi possible?

here are 4 things I woud like to do:

1.Match the font size to the rest of the navigation items.

2. Match the link color to the rest of the site

3. Insert a line break before each value (ie before By:, on:, etc)

4. Make font size of user, forum, date smaller that topic.


here is a link to the current site http://governmentfutures-dev.com/talk&nbsp;

Thanks in advvnce.


4:54 pm
28 Feb 2007


Yellow Swordfish

Admin

Peterborough, England

posts 5252

13

Well I specifically didn't put classes in so that you can style the list from your themes stylesheet. It will pick up whatever list styles and paragraph styles you have in place for whatever area (i.e., div) that you place it. So that is where you have to look.

The line breaks you want would currently involve editing the tag code itself (in sf-tags.php). It will probaqbly be best if in the next release I try and add some more formatting options in the tag parameters. The problem, as usual, is that everyone wants it to look different! Which is why I just allowed it to pick up the current theme styles. 



Reply to Topic: Recent Forum Posts on Side Bar

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 2 + 10        (Required)

Topic Reply:


 
 

About the Stuff at Yellow Swordfish forum

Currently Online:

11 Guests

Maximum Online: 71

Forums:

Groups: 3

Forums: 16

Topics: 2068

Posts: 14091

Members:

There are 1003 members

There are 837 guests


Yellow Swordfish has made 5252 posts

Top Posters:

Mr Papa - 1602

-Radio- - 558

ovizii - 114

jfv - 82

angelic007 - 72

Administrator: Yellow Swordfish | Moderators: Yellow Swordfish, Mr Papa, -Radio-


© Simple:Press Forum - Version 3.1.4 (Build 357)