Increase number of characters displayed in a forum post

    • 28 posts
    March 25, 2018 3:04 PM EDT

    My site has a number of discussion forums. These are an important part of the activity of my site. On my Members Homepage, I use Forum Posts to show what the latest discussions are are. However, this only displays at most 64 characters. That's way too few to give members an idea of what is being discussed. I want to increase that number. (Blog posts show around 230 characters)

    Any ideas how I increase the number of characters?

    Also, each reply in any discussion shows up as a separate post in the Forum discussion list on the Member's homepage. This makes for an overload of separate posts and can drive other topics off the main page when a particular discussion is very popular.

    Is there any way to make the displayed posts threaded?

  • gs
    • 857 posts
    March 25, 2018 8:25 PM EDT

    http://community.socialengine.com/forums/topic/28/where-are-issues-now-supposed-to-be-posted/view/post_id/186

    According to that link, 64 is hard coded.  According to a 3PD Adv Forum I have, they use 64 as per the SE database structure.  Hopefully someone will know where to change this because as you wrote, 64 is far too short (even in this forum).

     

    • 28 posts
    March 26, 2018 5:11 PM EDT

    Hi gs,

    Is what you're saying is that it is hard-coded and there is nothing we can do about it, so we're SOL?

    Or that it's hard-coded and someone is looking into doing something about it, so there's hope? 

    Or that it's hard-coded and you hope someone is looking into doing something about it, and we should not hold our collective breath? 

     

    If we're SOL, is there a way to take legacy forum posts and turn them into blog posts? (Change a setting, re-write some code, ??)

  • gs
    • 857 posts
    March 26, 2018 6:19 PM EDT

    re: hard-coded

    The linked post doesn't state what they mean by that, so I can't answer.  I decided to live with it since my only interaction was in this Forum, but as of yesterday realized the Adv Forums Plugin I purchased hasn't improved that 64 limit either.  Hopefully @Donna will hop in here to further explain, since the other topic just mentions moving on to more improvements and new features after 4.09.03, but nothing specific about this particular issue being incuded.

    • 28 posts
    March 26, 2018 6:36 PM EDT

    Does anyone from the actual developer monitor these discussions, or do we have to contact someone directly? 

    It's puzzling why they have the blog posts show so much of the post (just the right amount) and discussion forums are so restricted that the bit they show is for the most part meaningless.

  • gs
    • 857 posts
    March 26, 2018 8:03 PM EDT

    ==> '...Does anyone from the actual developer monitor these discussions, or do we have to contact someone directly?...'

    Yes.  @Donna (SE staff) typically responds, so hopefully she has better info than last July.

    • Moderator
    • 6923 posts
    March 27, 2018 4:50 AM EDT

    Is this just for the widget? Most likely, it's in the widget code and can easily be adjusted. You can see in my free widgets by ScriptTechs that I've included a way to choose how many characters to show in those widgets. Which exact widget are you talking about and when I get time (lol, I don't have much of that) I'll have a look at the code. Currently working on bug fixes for another release but I can try to fit this in to look at and respond here. If I forget, please pm me (might have to send a friend request first) and remind me of this thread.

    • Moderator
    • 6923 posts
    March 27, 2018 4:52 AM EDT

    I recall reformatting a forum posts widget for my own site as I didn't like the current ones. I didn't release it (as a freebie) as I didn't think anyone would want it. It's just formatted to look better (IMO) to remove some spacing and add something (forgot what) to it.

    • 28 posts
    March 27, 2018 1:03 PM EDT

    Withing the SocialEngine admin area it's simply called "Recent Forum Posts". I have no idea whether or not that's a Widget. I have no idea how to identify what "block" is a widget or isn't.

    I believe it shows up under PlugIns. Is a PlugIn a Widget?


    This post was edited by OPAS at March 27, 2018 1:05 PM EDT
    • 28 posts
    March 27, 2018 1:21 PM EDT

    I've looked at the ScriptTechs site and can see your free widgets. I have no idea what to so with them. I cannot even see how to download one so that I can inspect its code. Not sure I would recognize what part of the code relates to my issue. A "Coding Widgets for Dummies" is needed here.

    • Moderator
    • 6923 posts
    March 27, 2018 1:28 PM EDT

    All of my free widgets are in the certified marketplace. Log in to your account at socialengine.com/login and you can get them there by going to each listing in the se market and Get It. You can download and install. They are tested and certified by other SE staff in order to keep everything kosher.

    Yeah the recent forum posts block. A widget is a block. It's just called a widget to sound more special lol.

    • Moderator
    • 6923 posts
    March 27, 2018 1:30 PM EDT

    I already have a coding widgets for dummies in my kb. http://kb.scripttechs.com/creating-a-socialengine-widget/ I do like the For Dummies books. Very well done. That little plugin of mine is good to learn with if you want to learn. I hadn't checked the forum widget yet to see the characters. Will try to now.

    • Moderator
    • 6923 posts
    March 27, 2018 1:43 PM EDT

    Ok following is a source edit. I suggest making your own and using that as this will be overwritten on upgrades and you will have to re-edit.

    NOTE!! SocialEngine does not support source edits. Modify the files at your own risk. You assume all responsibility for editing source files. 

    Backup the following file (make a copy) so that you can restore it in case you need support from SE for something.

    go to application/modules/forum/widgets/list-recent-posts and open the index.tpl file in your favorite code editor such as notepad++, netbeans, sublime.

    find around line 39

    <div class='description'> <?php echo $this->viewMore(strip_tags($post->getDescription()), 64) ?> </div>

     

    edit that 64 to be what you want. Save. Clear cache.

    • 28 posts
    March 27, 2018 1:59 PM EDT

    By "go to application/modules/..." I assume you mean to download that file using an ftp program and edit in a text editor and upload it back into the same place?

    • Moderator
    • 6923 posts
    March 28, 2018 4:58 AM EDT

    Yes but make a copy of it first.

    • 28 posts
    March 29, 2018 8:40 AM EDT

    This worked. Fantastic! If only all my other issues with this software were as easily solved.

    • Moderator
    • 6923 posts
    March 29, 2018 9:19 AM EDT

    Glad it worked. Feel free to post another forum topic for another issue. This way, anyone looking for that same issue can find it. It's good to keep issues separated for that reason.

    • Moderator
    • 6923 posts
    March 29, 2018 9:19 AM EDT

    Glad it worked. Feel free to post another forum topic for another issue. This way, anyone looking for that same issue can find it. It's good to keep issues separated for that reason.