A A A

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
how to put most rated topic in widget?
Jan 4, 2010
3:52 pm
Rookie
Forum Posts: 3
Member Since:
Jan 4, 2010
Offline

Hi, many thanks for your nice work.

I would like to show the most rated topics of the forum in my blog.

I'm searching this support forum and I discovered the template tags.

I found in the wiki template tags list the most rated topics tag and this example:

<?php sf_highest_rated_posts(10, true, true, true, true); ?>

I think the next passage is so obvious that you didn't write it, but I can't imagine it.
I tried to use a text widget and insert the php string but it doesn't run.
I peeked in the sf-widgets.php but I don't understand what to change.

I'm using the Atahualpa theme that has not a sidebar.php page.

My site is here: http://www.cittadinirovereto.it/diario/

many thanks for your help

Jan 4, 2010
5:04 pm

SP Master
Forum Posts: 22131
Member Since:
Nov 9, 2008
Offline

I'm not that well acquainted with widgets but I'll give this a try! First up is a text widget OK for running php code in? if yes then let;s look at the settings.
Go to: Admin > Forum > Configuration > Query & Code Optimisation. Do you have the "Check if you ARE using any Listing Template Tags" option turned on?

Yellow Swordfish
Jan 4, 2010
11:35 pm
Rookie
Forum Posts: 3
Member Since:
Jan 4, 2010
Offline

Hi Yellow Swordfish!

"First up is a text widget OK for running php code in? "

I don't know if the text widget is ok for running php code in. How can I check? I just inserted the tag

<?php sf_highest_rated_posts(10, true, true, true, true); ?>
and nothing appear. Only the title.

"Go to: Admin > Forum > Configuration > Query & Code Optimisation. Do you have the "Check if you ARE using any Listing Template Tags" option turned on?"

This setting was as you asked.

I'm a beginner.
Maybe there is a widget made for php code?
Or there are others ways to put Most Rated Topic on a sidebar other than widget?

Jan 4, 2010
11:49 pm
Rookie
Forum Posts: 3
Member Since:
Jan 4, 2010
Offline

Hi, I found the solution. It was very easy.

I write here if someone has the same problem.

Thank to Yellow Fish I searched for a php widget. The text widget is not ok for php code.

I found this:

http://wordpress.org/extend/pl…..hp-widget/

I downloaded it, uploaded it in my website in the plugin folder.

I activated it as a normal plugin.

I just inserted inside:

<?php sf_highest_rated_posts(10, true, true, true, true); ?>

And the most rated posts appear in the position I want.

Now another question about it.
Is it possible to put the rating near the post? For example for a 4 star post
is possible to display 4 stars near it in the widget? Or a numeric value?

Jan 5, 2010
2:35 am

SP Master
Forum Posts: 23587
Member Since:
Dec 10, 2006
Offline

no, not currently without modifying the code of the template tag itself…

Jan 21, 2010
12:24 am
Member
Forum Posts: 263
Member Since:
Jun 1, 2009
Offline

paolo said:

Hi, I found the solution. It was very easy.

I write here if someone has the same problem.

 

Thank to Yellow Fish I searched for a php widget. The text widget is not ok for php code.

I found this:

http://wordpress.org/extend/pl…..hp-widget/

 

I downloaded it, uploaded it in my website in the plugin folder.

I activated it as a normal plugin.

 

I just inserted inside:

<?php sf_highest_rated_posts(10, true, true, true, true); ?>


 

Exactly what I was looking for. This works perfectly, thank you for the tip!

Jan 21, 2010
4:43 am

SP Master
Forum Posts: 22131
Member Since:
Nov 9, 2008
Offline

Glad to hear you found it.
I am starting to keep a list of good and worthwhile plugins that work with SPF and have added this one.

Yellow Swordfish
Jan 21, 2010
7:33 am

SP Master
Forum Posts: 23587
Member Since:
Dec 10, 2006
Offline

I actually prefer the samsarin php widget…  but there are lots that work just fine…  still neither directly helps the OP last question about adding the rating…

Forum Timezone: America/Chicago

Most Users Ever Online: 444

Currently Online: VikingBrent
57 Guest(s)

Currently Browsing this Page:
1 Guest(s)

See All Online Activity

Top Posters:

-Radio-: 1251

Lee H: 606

Luffer: 535

Conrad_Farlow: 485

jim: 478

neon: 263

ovizii: 240

Tal: 240

Member Stats:

Guest Posters: 2616

Members: 7328

Moderators: 1

Admins: 2

Forum Stats:

Groups: 5

Forums: 16

Topics: 10839

Posts: 79131

Moderators: Brandon C (158)

Administrators: Yellow Swordfish (22131), Mr Papa (23587)