Support Forum

Hottest Forum Topics

UN underthegun
underthegun
Member

So I’m still getting use to the latest version and admittedly I haven’t used Simple:Press in some time. I realized that in order to get many of the advanced features I wanted I was going to have to shell out some money, so I did.

I really enjoy this board and this is coming from someone who was using vB2.x, WBB2.x and so on. I love making forums.

ANYWAY… one feature I was looking for has gotten past me. I’m wondering how do I make a “hottest forum topics” widget similar to the one they have on this site.

Thank you

15 Answers

New Answer

MP Mr Papa
Mr Papa
Member

the hottest topics is in the template tags plugin… grab it from the download page… its not a widget, but a template tag or a shortcode…

UN underthegun
underthegun
Member

That explains why it wasn’t just “obvious” to me, haha thank you 🙂

UN underthegun
underthegun
Member

Yeah but it’s much more user-friendly than pretty much any other board I’ve used, too. The WP integration and the fact that I can more or less customize the look in a similar fashion makes it much more appealing, to me at least.

So my next dumb question… where can I find a list of the template tags I can use?

I only ask because I’ve looked around (briefly anyway) and didn’t see any.

edited:::
I’m still a bit of a newb at coding so I know I’m doing this. I got to looking around in the plugin’s main file and added this to my widget (I’m using exec php to run php code in a text widget).

sp_hot_topics (wrapped in php)

But it’s not doing anything so what am I missing?

MP Mr Papa
Mr Papa
Member

the start of codex help:  http://codex.simple-press.com/codex/plugins/template-tags/

really needs more work… we are working the codex but slow going…

but best place to look is at the bottom of the template tags plugin main file… everything after:

# ==========================================================
# Simple Links
# ==========================================================

is a template tag or shortcode…

if you have exec php, then template tags are fine.. or shortcodes if you dont want to use php…

then when you find an interesting tag, look in the library at the specific file for the options…

and dont hesitate to ask here either…

what did you add??? seems stripped out… when pasting code, paste in the code, highlight it and then use the code button and select php… code button is the one that looks like ${}

UN underthegun
underthegun
Member

I don’t see the code button you had mentioned.

sp_HotTopicsTag (this wrtapped in PHP)

and I tried

sp_hot_topics

edited:

now I’m trying something like this:

sf_latest_posts(5);

and getting this:

Fatal error: Call to undefined function sf_latest_posts() in /problem-with-post-edit-buttonome/username/public_html/addondomain.com/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 1

But I partly wonder if I’m using depreciated code?

MP Mr Papa
Mr Papa
Member

as I said, the code button looks has the text ${} on it…

code.png
MP Mr Papa
Mr Papa
Member

whoops… hit submit too quick…

you want:

<?php sp_HotTopicsTag(); ?>

to use the default options

UN underthegun
underthegun
Member

ah you’re using a different editor than me, that’s why.

UN underthegun
underthegun
Member

Ok I changed my editor to HTML and see a lot more options!

So I’m trying something like this:

<?php sp_hot_topics ?>

Comes up blank.

<?php sp_hot_topics(); ?>

Returns an error.

But even something that should work like:

<?php sf_recent_posts_alt_tag(5, false, true, true, 0, true, true, 50); ?>

Returns this error:

Fatal error: Call to undefined function sf_recent_posts_alt_tag() in /problem-with-post-edit-buttonome/pilecrap/public_html/problem-with-post-edit-buttonauntedpaulding.com/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 1

MP Mr Papa
Mr Papa
Member

oh sorry… the code button – the fancy one anyway, is only available in tinymce, the rich text… html does have a button too just not as fancy output… wink

all three of those are wrong and from version 4…  they wont work in version 5… you have to use the template tags or shortcodes that are in the template tags plugin main file…

for hottest topics:

<?php sp_HotTopicsTag(); ?>

or the shortcode

[sp_HotTopicsTag]

if you were using template tags in v4, they all need to be changed to equivalent 5.0 tag…

UN underthegun
underthegun
Member

THAT WORKED! And I assume I can input options the same as in the last example I posted?

Also Rich text – TinyMCE was selected by default for me and it didn’t show any of the options.

I can tell I’m going to have to play with my theme code some. It creates a separate box from the widget I’ve made for it. So like

WIDGET TITLE
empty space
HOTTEST TOPICS

instead of
WIDGET TITLE
HOTTEST TOPICS.

Anyway, I’ll figure that part out I’m sure. Thank you a lot!

MP Mr Papa
Mr Papa
Member

no, options are entered differently…  there is a single argument to the template tags now

<?php sp_HotTopicsTag($args); ?>

the args are a classic php arg list…  so to change number of topics shown

<?php sp_HotTopicsTag('limit=10'); ?>

to go back 60 days,

<?php sp_HotTopicsTag('limit=10&days=60'); ?>

for example…  see the actual template tag file in the library of the plugin for the possible arguments…

UN underthegun
underthegun
Member

Ok that makes more sense. Like your template tags page says, refer to the tags page for WP. So I don’t know why I expected these to be different. Good stuff! Thanks again!