Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
AlexWebsites Posted November 23, 2016 Posted November 23, 2016 Does anyone know if in 4.1 there is a way or a plugin available that will allow you to show only the first post to guests and the additional would be hidden. I have been using Wolfie's mod for version 3, and have not upgraded the site yet to version 4 that I'm using it on.
sweethoney Posted November 23, 2016 Posted November 23, 2016 try this class css and add diplay: none;
sweethoney Posted November 23, 2016 Posted November 23, 2016 got to from setting and edit you can also set Permissions Minimum content count to see forum
Andrew Matia Posted November 23, 2016 Posted November 23, 2016 37 minutes ago, sweethoney said: got to from setting and edit you can also set Permissions Minimum content count to see forum I have never check this. Seems useful!
AlexWebsites Posted November 23, 2016 Author Posted November 23, 2016 Thanks for posting this. I want to be able to show the first post only to guests and search engines. The remainder hidden unless logged in. Using the permission settings will hide all posts to guests I believe.
sweethoney Posted November 23, 2016 Posted November 23, 2016 you can try it less someone here can show u other wise
AlexWebsites Posted November 24, 2016 Author Posted November 24, 2016 8 hours ago, sweethoney said: you can try it less someone here can show u other wise I just looked and I don't see any way but to shut off all posts for guests, unless I'm missing something.
sweethoney Posted November 24, 2016 Posted November 24, 2016 got to one of your forums and just edit the permission guest so they can see the forum if that's what you mean..so if you want the guest to only see a forum that you want and the others they can intill they sing up
Nathan Explosion Posted November 24, 2016 Posted November 24, 2016 7 hours ago, sweethoney said: got to one of your forums and just edit the permission guest so they can see the forum if that's what you mean..so if you want the guest to only see a forum that you want and the others they can intill they sing up The requirement is that he allows guests to view the forum, and its topics.....but within the topic the guest can only read the first post. All other posts cannot be read by the guest....so they have to login. Like so: It can't be done with the IPS software 'out of the box' and would need a plugin, or a theme edit, to achieve this (just like with IPB 3.4.x, which is where the above screenshot is taken...uses a hook called HidePost) and none of your suggestions will make it work like that.
Nathan Explosion Posted November 24, 2016 Posted November 24, 2016 Edit your theme, specifically forums -> front -> topics -> post Locate: {$comment->content()|raw} {{if $comment->editLine()}} {$comment->editLine()|raw} {{endif}} Enclose it with an if/else/endif that checks for group membership and to see if the post is NOT the first in the topic: {{if \IPS\Member::loggedIn()->member_id === NULL and !$comment->mapped('first')}} NOPE!!!! You're a guest so you're not reading this!!! {{else}} {$comment->content()|raw} {{if $comment->editLine()}} {$comment->editLine()|raw} {{endif}} {{endif}} and save.
AlexWebsites Posted November 24, 2016 Author Posted November 24, 2016 Yes exactly! Thank you so much for posting this.
sweethoney Posted November 24, 2016 Posted November 24, 2016 ight thanks for that i was trying to do the same so sorry for all my post!we got the right answer
Nathan Explosion Posted November 25, 2016 Posted November 25, 2016 @ajmboy would you be interested in helping with testing out a plugin I'm developing for this one?
AlexWebsites Posted November 25, 2016 Author Posted November 25, 2016 38 minutes ago, Nathan Explosion said: @ajmboy would you be interested in helping with testing out a plugin I'm developing for this one? Sure!
Nathan Explosion Posted November 25, 2016 Posted November 25, 2016 Cool - will send over an xml file for you to try, once I'm done with my testing. It's pretty basic, just following the dev docs guide on creating one...but at least you'll be able to modify the message without having to edit the theme each time (and obviously, won't need to put the theme edit in there in the first place)
AlexWebsites Posted November 25, 2016 Author Posted November 25, 2016 3 hours ago, Nathan Explosion said: Cool - will send over an xml file for you to try, once I'm done with my testing. It's pretty basic, just following the dev docs guide on creating one...but at least you'll be able to modify the message without having to edit the theme each time (and obviously, won't need to put the theme edit in there in the first place) Sounds great!
Nathan Explosion Posted November 28, 2016 Posted November 28, 2016 Plugin submitted and pending approval:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.