Support Forum

I am interested in the spRecentPostsWidget

VK vkaryl
vkaryl
Member

which appears to be used on your forum and site here.  I’m not finding it in the plugin downloads section.  A google search did not turn it up.  Is this something you’ve privately coded for this forum only?

Prior to updating to the latest wordpress and forum plugin versions, I used a very old version, which allowed me to use this shorttag in the sidebar:  <?php sf_new_post_announce(); ?>

This no longer works.  I need something which approximates this functionality in the new forum version; sidebar-resident is the best option for the site theme I’m using.

34 Answers

New Answer

MP Mr Papa
Mr Papa
Member

the old announce tag is no longer supported or used…  it didnt work quite right and very few folks used it…

but the recent posts widget is alive and well… did you download the template tags plugin?  it is part of that…

VK vkaryl
vkaryl
Member

Ah.  No, I didn’t download that as it didn’t seem to be what I was looking for.  No one on my forum uses tags…. tags are not part of our “world”.  I will grab it; thank you.

[I should note that sf-announce worked perfectly for me for many years.  I had no issues with it at all.]

MP Mr Papa
Mr Papa
Member

just to be clear, I said template tags, not tags…  two different things…  here is the wp definition of template tags:  http://codex.wordpress.org/Template_Tags

ours is pretty much the same thing, but SP focused…

VK vkaryl
vkaryl
Member

Yes, I see that now.  My eye saw the word “tags” and slid right on by.  I’ve quit developing themes for wp in the last few years, so template tags are rather “out of my reckoning” now.  Sorry for the need to ask a silly question!

DO Dosenben
Dosenben
Member

Dear Simple:press team,

 

since it’s in the same vein, would it be possible – without a ton of hassle – to add some kind of “todays posts”, feature; listing all the posts since 00:00am of the current date? A customer asked for this feature…

and – altough this touches another plugin: would the same feature be possible for the users who have been online on the current day?

 

thx in advance and best regards,

 

Dosenben

YS Yellow Swordfish
Yellow Swordfish
Member

It could be done very easily actually just by changing the where clause in the sql query that is sent. Although the Latest Posts tag would be  better suited for this.

The online one is a bit more problematic and would require something new to be coded up.

DO Dosenben
Dosenben
Member

Thank you for the quick answer Andy!

Sorry if i’m getting on your nerves embarassed, but could you point me in the right direction? With a bit of spare time, i’d trust myself to get this right, but at the moment my clients are bombing me with absurd tasks; and i have some deep-seated fears of wrecking it up just because i rushed things. I’d be very obliged!

 

The second issue (who was online today) isn’t that important. Any chance to see something like that in the far future?

 

best regards, Dosenben

YS Yellow Swordfish
Yellow Swordfish
Member

Go to the forum plugins folder and take a look at the file  /template-tags/library/sp-LatestPosts-tag.php

Take a look at line 127. You should be able to replace this sql WHERE clause with your specific query. SFPOSTS is a constant that points to the forum posts table. I have not tried this of course!

Is your php and sql up to that?

Of course I would recommend you duplicate the whole function – give it a new name and make it accessible.

I think we could get interested in this so I might give it a whirl myself later when I have a moment.

DO Dosenben
Dosenben
Member

Yeah, i guess i am – will have a look at it tomorrow; and get back to you with the results!

many thanks!

YS Yellow Swordfish
Yellow Swordfish
Member

This ought to do it:

$midnight = date('Y-m-d', time()).' 00:00:00';
$where = SFPOSTS.".post_date >= '$midnight'", 'post_id DESC';
YS Yellow Swordfish
Yellow Swordfish
Member

I created a new template tag for this this morning so that will make an appearance with 5.1 due out next week. Note this is a template tag and optional shortcode. Not a widget.

MP Mr Papa
Mr Papa
Member

is the template tags plugin update requiring 5.1?  If not, no reason we couldnt push the release out now if you are happy with it…  LOL, already have a lot of plugins to update when 5.1 releases so not adding more would be good! wink

YS Yellow Swordfish
Yellow Swordfish
Member

yes – small change to the lost post class.