News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Latest topics instead latest posts

Started by croboy, April 27, 2013, 07:13:15 AM

Previous topic - Next topic

croboy

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


croboy

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.

Kays

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

croboy

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


Kays

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

croboy

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.

YogiBear

SMF v2.1.3  Mods : Snow & Garland v1.4,  PHP  v.7.4.33

croboy

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.

Kays

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

croboy

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

Kays

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

Advertisement: