Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: croboy on April 27, 2013, 07:13:15 AM

Title: Latest topics instead latest posts
Post by: croboy on April 27, 2013, 07:13:15 AM
Hello,

I googled but I can't find does SMF core has option to list recent topics instead recent posts.
I looked in forum otpion but I don't see it.

I learned about SSI function <?php ssi_recentTopics(); ?> but I don't know how to mod forum to use it instead default recent posts
http://www.simplemachines.org/community/ssi_examples.php

I placed <?php require("/home/public_html/dir1/dir2/forum/SSI.php"); ?> in index.php

Where I should put
<?php ssi_recentTopics($num_recent = 8, $exclude_boards = null, $include_boards = null, $output_method = 'echo'); ?>

I tried to put it in Recent.template.php
but I get
Fatal error: Call to undefined function ssi_recenttopics() in Recent.template.php on line 1

I appreciate any help.
Tnx in advance

Title: Re: Latest topics instead latest posts
Post by: croboy on April 27, 2013, 07:34:44 AM
OK. There was error in path. Now I fixed it but still don't know where to place this

<?php require("/home/name/public_html/dir1/dir/forum/SSI.php"); ?>
<?php ssi_recentTopics($num_recent = 8, $exclude_boards = null, $include_boards = null, $output_method = 'echo'); ?>

I placed those two lines in Recent.template.php in at the begining.
I don't know PHP and templating so I really don't know.
Title: Re: Latest topics instead latest posts
Post by: Kays on April 27, 2013, 07:47:54 AM
Hi, basically, you can't use ssi functions in the SMF files.  :-\

If that's for the info centre. There was something like you want posted many years ago in I think it was the Tips and Tricks (http://www.simplemachines.org/community/index.php?board=72.0) board. It was for 1.x, but someone might of updated it for 2.0. See if you can find that topic.
Title: Re: Latest topics instead latest posts
Post by: croboy on April 27, 2013, 08:17:47 AM
Tnx for the info. Yes it is for info centre.

I searched through Tips and Tricks board with words recent i latest but did't find any topic about that.
There is mod that lists latest topics in info centre but it is not working with 2.0
Title: Re: Latest topics instead latest posts
Post by: YogiBear on April 27, 2013, 09:13:06 AM
Maybe worth taking a look at...

http://custom.simplemachines.org/mods/index.php?mod=1314

http://custom.simplemachines.org/mods/index.php?mod=1414

http://custom.simplemachines.org/mods/index.php?mod=3288

:)
Title: Re: Latest topics instead latest posts
Post by: Kays on April 27, 2013, 09:19:10 AM
When I did it it was a manual edit and I got the info from a post. But that was one heck of a long time ago.

Do the links Yogi posted help any?
Title: Re: Latest topics instead latest posts
Post by: croboy on April 27, 2013, 09:46:50 AM
I tried first two mods few days ago and they didn't work on 2.0.4
I used Recent Topics On Board Index on 1.1.16 and it was great.
That is what I would like to have on forum.

I installed Show Recent Topics by 24h 48h 72h and it works but its just partial solution.
Guests don't see that option and even if it was there they would hardly see it.

It seems strange that core SMF does not have that option and there is SSI function.

Tnx anyway.
Title: Re: Latest topics instead latest posts
Post by: YogiBear on April 27, 2013, 10:19:11 AM
I see you've found the support thread for the first link but also worth trying...

http://wiki.simplemachines.org/smf/How_can_install_a_mod_that_doesn%27t_work_in_my_SMF_version
Title: Re: Latest topics instead latest posts
Post by: croboy on April 27, 2013, 10:42:51 AM
I tried to install once again  Recent Topics On Board Index

On top of all forum pages I get
//   Text for the Recent Topics On Board Index. $txt['RecentTopicsOnBoardIndex_recenttopics'] = 'Recently Updated Topics';
And all fonts of boards titles and descriptions are enlarged. It does not look good.

I get list of recent topics but those two things from above are not good.

It would be great if some who knows things could take a look at Recent Topics On Board Index what does things apperas.
Title: Re: Latest topics instead latest posts
Post by: Kays on April 27, 2013, 10:51:51 AM
Quote
On top of all forum pages I get
//   Text for the Recent Topics On Board Index. $txt['RecentTopicsOnBoardIndex_recenttopics'] = 'Recently Updated Topics';
And all fonts of boards titles and descriptions are enlarged. It does not look good.

That happens if the ?> isn't on the last line of the page. Go into the default theme => languages and open modifications.english.php and make sure that the ?> is the last item on that page.
Title: Re: Latest topics instead latest posts
Post by: croboy on April 27, 2013, 11:11:35 AM
Thank you so much. That was it.

I posted that solution to Recent Topics On Board Index topic
http://www.simplemachines.org/community/index.php?topic=253704.msg3534234#msg3534234

Tnx again
Title: Re: Latest topics instead latest posts
Post by: Kays on April 27, 2013, 11:14:38 AM
Great, glad you got that sorted out. :)