Advertisement:

Author Topic: Topic Summary  (Read 30981 times)

Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,117
  • Gender: Male
    • Verbtest.com
Topic Summary
« on: August 26, 2008, 07:52:41 PM »
Link to Mod

Topic Summary Mod 1.3.1 by Nathaniel
Overview
This mod adds a "Topic Summary" column to the MessageIndex. The page where you view a list of topics for a particular board. It allows your users to get a better idea of what the topic is about before they view the actual topic itself. It basically takes the first x characters from the last or first post of a topic, strips any HTML, whitespace, newlines or BBC, and then displays it.

Settings are found in the Admin panel:
For SMF 1.1.x: "Features and Options" -> "Layout and Options".
For SMF 2: "Configuration" -> "Features and Options" -> "Layout".

Setting Explanations:
  • Post To Summarize:  The 'Topic Summary' column can either summarize the first or the last post of the topic, this setting allows you to choose which.
  • Summary Length: This setting allows you to set how many characters will be shown from the post that is being summarized.
  • Max Word Length in Summary: This setting allows you to limit the size of the words which will be summarized, so that the summary will not take up too much room on the page. If a word from the summary is too large then it will be broken up. The default is 20 letters.
  • Column Width: This setting allows you to specify a width for the 'Topic Summary' Column.
SMF Version Support
This mod is officially supported for SMF 2.0 and above only. Below is a list of available versions of this mod and the previous versions of SMF that they supported. Use them at your own risk. The mod author will not be supporting or upgrading this mod in any way for versions of SMF below 2.0.

Version 1.02:  SMF 1.1.x and SMF 2 RC2 or below.
Version 1.3.1: SMF 2 RC4 and above.

Donate
If this mod has helped you, then feel free to support the developer by Donating. Any amount of money is welcome.

Themes/Templates
This mod only edits a single template file - MessageIndex.template.php - which is only used in a few Custom Themes. If your custom theme doesn't contain this file then it should work automatically. Otherwise you can use the 'Manual Install Instructions for SMF' function above to get a list of edits that you will need to make to your custom themes 'MessageIndex.template.php' for your relevant SMF version.

If you need any help with edits for custom themes, then you can ask for it in the support topic for this mod, remember that you will have to post the 'MessageIndex.template.php' file from your custom theme, otherwise I will not be able to perform the edits.

Version Changes
v1.3 - 5 November 2010
Updated for SMF 2 RC4.

v1.02 - 20 November 2009
Updated for SMF 2 RC2.

v1.01 - 15 September 2008
Updated for SMF 1.1.6 and SMF 2 Beta.

v1.0 - 24 August 2008
Original Mod release.
« Last Edit: June 16, 2011, 02:11:58 AM by Nathaniel »
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Offline K3TK3TK3T

  • Semi-Newbie
  • *
  • Posts: 76
Re: Topic Summary
« Reply #1 on: August 26, 2008, 08:27:51 PM »
screenie/demo please?

Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,117
  • Gender: Male
    • Verbtest.com
Re: Topic Summary
« Reply #2 on: August 26, 2008, 08:34:37 PM »
Download page is now updated to include a screenshot.

I will try to add a little tutorial that shows you how to do the template edits for custom themes, sometime today. ;)
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Offline jossanaijr

  • SMF Hero
  • ******
  • Posts: 2,131
  • Gender: Male
    • Netbook Forum
Re: Topic Summary
« Reply #3 on: August 27, 2008, 11:56:49 AM »
Great idea.

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: Topic Summary
« Reply #4 on: August 28, 2008, 01:19:32 AM »
yes grat mod thank you just what im looking for
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,117
  • Gender: Male
    • Verbtest.com
Re: Topic Summary
« Reply #5 on: August 28, 2008, 04:39:29 AM »
I am glad that you guys like it. :D

Actually it was ccbtimewiz's idea, I just made it. ;)

I have updated the Mod download page so that it includes instructions for manual edits to custom themes. ;)
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,117
  • Gender: Male
    • Verbtest.com
Re: Topic Summary
« Reply #6 on: September 15, 2008, 03:01:25 AM »
Version 1.01:
Updated for SMF 1.1.6 and SMF 2 Beta.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Offline Hoochie Coochie Man

  • SMF Hero
  • ******
  • Posts: 5,135
  • Gender: Male
    • İstanblues.org
Re: Topic Summary
« Reply #7 on: October 16, 2008, 08:14:32 AM »
Thanks for this beautiful mod.

I want to show only first post's summary, not reply's summary.

Can you do that please?

another question:
Can you make this code with work in index.template.php too

Code: [Select]
', $topic[!empty($modSettings['TopicSummary_message']) ? $modSettings['TopicSummary_message'] : 'last_post']['summary'], '
Thanks.
« Last Edit: October 16, 2008, 08:17:13 AM by *erhan »
İnadına SMF 1.1.X

Offline Hoochie Coochie Man

  • SMF Hero
  • ******
  • Posts: 5,135
  • Gender: Male
    • İstanblues.org
Re: Topic Summary
« Reply #8 on: October 17, 2008, 08:41:43 AM »
Bump This is important.
Please..  :-[
İnadına SMF 1.1.X

Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,117
  • Gender: Male
    • Verbtest.com
Re: Topic Summary
« Reply #9 on: October 17, 2008, 09:08:37 AM »
Ah, sorry I didn't notice this *erhan. ;)

1) You should already be able to choose if the last or first post is used for the summary, there is a setting for it. The setting locations are in the first post of this topic.
2) That should be possible, are you referring to the 'Last post' part for each board?
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Offline Hoochie Coochie Man

  • SMF Hero
  • ******
  • Posts: 5,135
  • Gender: Male
    • İstanblues.org
Re: Topic Summary
« Reply #10 on: October 17, 2008, 09:12:35 AM »
Ah, sorry I didn't notice this *erhan. ;)

1) You should already be able to choose if the last or first post is used for the summary, there is a setting for it. The setting locations are in the first post of this topic.

Ohh sorry, I will look.

2) That should be possible, are you referring to the 'Last post' part for each board?

nope, first post of the topic, as I said above.

and thanks for your reply.
İnadına SMF 1.1.X

Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,117
  • Gender: Male
    • Verbtest.com
Re: Topic Summary
« Reply #11 on: October 17, 2008, 09:15:08 AM »
2) That should be possible, are you referring to the 'Last post' part for each board?

nope, first post of the topic, as I said above.

and thanks for your reply.

So which topics/posts do you want to be summarized? And in which exact areas?
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Offline Hoochie Coochie Man

  • SMF Hero
  • ******
  • Posts: 5,135
  • Gender: Male
    • İstanblues.org
Re: Topic Summary
« Reply #12 on: October 17, 2008, 09:25:36 AM »
LHVWB

Actually, I was trying something.

Your mod is awesome, but I'm trying to put that topics' descriptions to meta area

I mean this area:

<meta name="description" content="THIS AREA" />

So, Topics descriptions will looks great on google or yahoo search results.

What do you think?  :-\
İnadına SMF 1.1.X

Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,117
  • Gender: Male
    • Verbtest.com
Re: Topic Summary
« Reply #13 on: October 17, 2008, 08:45:44 PM »
@*erhan,
Hmm, I'm not sure about that. I haven't really worked with meta description tags at all, which page are you referring to? The MessageIndex or Topic Display pages?
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Offline Hoochie Coochie Man

  • SMF Hero
  • ******
  • Posts: 5,135
  • Gender: Male
    • İstanblues.org
Re: Topic Summary
« Reply #14 on: October 18, 2008, 04:21:44 AM »
Topic Display pages  :-\
İnadına SMF 1.1.X

Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,117
  • Gender: Male
    • Verbtest.com
Re: Topic Summary
« Reply #15 on: October 18, 2008, 05:36:19 AM »
It should be fairly easy to do, you will have to add a database query to the Display.php file to get the body of the first post, and then you can run it through the 'generate_summary' function which is added by this mod. I have make up some code for that, although I can't really do the database query unless I know which version of SMF you have.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Offline Hoochie Coochie Man

  • SMF Hero
  • ******
  • Posts: 5,135
  • Gender: Male
    • İstanblues.org
Re: Topic Summary
« Reply #16 on: October 18, 2008, 05:39:30 AM »
I'm using 1.1.6

This is very cool and important for SMF I think.
If you make this as a mod, I know a lot of people love it.
İnadına SMF 1.1.X

Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,117
  • Gender: Male
    • Verbtest.com
Re: Topic Summary
« Reply #17 on: October 18, 2008, 05:48:22 AM »
I'm using 1.1.6

This is very cool and important for SMF I think.
If you make this as a mod, I know a lot of people love it.

I could make it into a mod (and it would have to be a separate mod), although the mod below sort of already does this by showing a description for the 'Message Display'.
http://custom.simplemachines.org/mods/index.php?mod=1138

You might prefer an option that is more specific to producing good meta data. ;)

I can still create that code if you want, although I probably won't make it into a mod, because the mod above already does this.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Offline Hoochie Coochie Man

  • SMF Hero
  • ******
  • Posts: 5,135
  • Gender: Male
    • İstanblues.org
Re: Topic Summary
« Reply #18 on: October 18, 2008, 06:57:15 AM »
I can still create that code if you want, although I probably won't make it into a mod, because the mod above already does this.

Wow, that's right :D
But it's Compatible With: 2.0 Beta 3 Public  :(  :'(

Edit: ohh wait, I think i found
http://www.simplemachines.org/community/index.php?topic=230321.msg1557714#msg1557714

Edit2: Thank you very much dude :D I installed it, and works great. Thank you :)
« Last Edit: October 18, 2008, 07:16:25 AM by *erhan »
İnadına SMF 1.1.X

Offline zaarin

  • Newbie
  • *
  • Posts: 3
Re: Topic Summary
« Reply #19 on: October 22, 2008, 07:02:04 AM »
Disclaimer: I'm new to both SMF and PHP in general.  O:)

This seems like exactly what I want to achieve as an SSI as part of SSI.php. Can this mod be used in this manner?

Basically, I've got a static, not part of SMF,  index page (site homepage), that uses various SSI calls to display the latest posts, newest member and so on.

What I would like is for the "ssi_recentTopics" and "ssi_topTopicsViews" functions to be able to display a summary of the topic in addition to the title.

If this is possible, could I please get some instructions, suitable for a beginner, on how to implement it?

Thank you very much.