Advertisement:

Author Topic: Latest topics instead latest posts  (Read 2596 times)

Offline croboy

  • Semi-Newbie
  • *
  • Posts: 41
Latest topics instead latest posts
« 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


Offline croboy

  • Semi-Newbie
  • *
  • Posts: 41
Re: Latest topics instead latest posts
« Reply #1 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.

Offline Kays

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,973
  • Gender: Male
    • Kayssplace
Re: Latest topics instead latest posts
« Reply #2 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 board. It was for 1.x, but someone might of updated it for 2.0. See if you can find that topic.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Offline croboy

  • Semi-Newbie
  • *
  • Posts: 41
Re: Latest topics instead latest posts
« Reply #3 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

Offline YogiBear

  • SMF Hero
  • ******
  • Posts: 1,924
SMF v2.0.15  Mods : Ohara YouTube Embed v1.2.9,  Custom Tab v1.2 , Bakers' Dozen Pages v1.2 , SMFPacks Shoutbox v1.1,  Board Color & Icons v1.1

Offline Kays

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,973
  • Gender: Male
    • Kayssplace
Re: Latest topics instead latest posts
« Reply #5 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?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Offline croboy

  • Semi-Newbie
  • *
  • Posts: 41
Re: Latest topics instead latest posts
« Reply #6 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.

Offline YogiBear

  • SMF Hero
  • ******
  • Posts: 1,924
Re: Latest topics instead latest posts
« Reply #7 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
SMF v2.0.15  Mods : Ohara YouTube Embed v1.2.9,  Custom Tab v1.2 , Bakers' Dozen Pages v1.2 , SMFPacks Shoutbox v1.1,  Board Color & Icons v1.1

Offline croboy

  • Semi-Newbie
  • *
  • Posts: 41
Re: Latest topics instead latest posts
« Reply #8 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.

Offline Kays

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,973
  • Gender: Male
    • Kayssplace
Re: Latest topics instead latest posts
« Reply #9 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.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Offline croboy

  • Semi-Newbie
  • *
  • Posts: 41
Re: Latest topics instead latest posts
« Reply #10 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

Offline Kays

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,973
  • Gender: Male
    • Kayssplace
Re: Latest topics instead latest posts
« Reply #11 on: April 27, 2013, 11:14:38 AM »
Great, glad you got that sorted out. :)

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods