Important Notice: Effective immediately, all support will be handled through Discord. Read more about the changes coming to Anodyne's services.

[MOD] - Make Joint Posts Public

A place to show off (and others to download) completed MODs. Note: support for MODs is handled by third parties, not Anodyne Productions.

Williams Sun Jul 19, 2015 4:29 am

[MOD] - Make Joint Posts Public

Note: v1 of the mod has been completed. Download can be found at http://xtras.anodyne-productions.com/it ... posts-list

I run two sims at the moment - one entirely on Nova (with an attached forum for OOC discussions) and one that uses Nova to drive the content parts of the website, but uses an attached forum for mission posting. The second one I started as a bit of an experiment to see which works better for various things.

One thing that I have found that I like about the forum setup is that it allows joint posts in progress to be publically viewable, since we simply have a JPs forum set up, where each post is a topic and we updated it by replying and quoting the previous post, make our changes to fill in our tag, and keep going like that before copying the completed post into the main mission thread. It means that those from outside the sim can at a glance see what we're up to, even if we're stuck working on a number of JPs and none of them are yet ready for going up in the main mission thread.

I was wondering how we could go about making the necessary changes in Nova to achieve this same effect? I imagine that this would need some modification of the access roles around 'all mission posts' to allow users who are not logged in to be able to view (but not modify) all saved posts. I'm not sure if that would be something that you could configure in the access management system in the site, or whether it would need code changes, but I imagine that you would need to make a distinction between being able to view saved posts versus moderated posts. Then a new page would likely have to be constructed under the sim controller so that users can view it without going to the admin section of the site.

Am I thinking along the right lines here? Or is it likely to be more complicated?

I'm also thinking of adding an 'embargoed' check-box on the mission post and joint post page so that whatever page is created to make the JPs public will hide those with this 'embargoed' field checked (meaning that the CO can hide posts from the list if they wanted to; for example something that they have written in preparation for other posts going out, but they want to keep private until the right time). I imagine that once the other changes are made though, that should be a simple enough thing to include.
Last edited by Williams on Tue Jul 21, 2015 4:27 am, edited 1 time in total.
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 288


AgentPhoenix Sun Jul 19, 2015 10:38 am

Re: Make Joint Posts Public?

It's not that simple actually. There are 2 items for managing missions posts. Level 1 allows a user to see and edit their own posts, level 2 allows a user to see and edit all posts. So simply upping everyone to level 2 will allow anyone in the system to edit anything. You may be okay with that, but in general, it's not a good idea. So really, the right way to do what you're talking about is to actually modify the post management page so that level 1 people can view everything, not just their own stuff. (That page is in the manage controller. When you look through it, you'll see where it starts taking access level into account.)

You're also talking about quite a bit of work to add essentially a private option (like news items) to mission posts. You'd need to modify the database to add the field, the manage controller (to make sure that things are hidden properly), and the post view method to make sure people can't get directly to it.
User avatar

Posts: 7596


Williams Sun Jul 19, 2015 10:42 am

Re: Make Joint Posts Public?

Yeah, the embargo option is less of a want for me, and probably something I'll dip in and out of trying to sort out. I'll give modifying the level 1 access a go tonight. Will that give non-logged-in users access to view all saved posts as well, or just all logged in users?
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 288


AgentPhoenix Sun Jul 19, 2015 10:49 am

Re: Make Joint Posts Public?

The entire admin section is hidden from non-authenticated users, so those changes will only impact the users who are logged in to the system. Just make sure you trust all your users not to do anything malicious!
User avatar

Posts: 7596


Williams Mon Jul 20, 2015 8:21 am

Re: Make Joint Posts Public?

So I've started looking into this this morning, and it seems that joint posts are already public, so long as you know the post ID.

For example, this post is currently a saved JP that hasn't been posted to the site yet: http://highlander.pegasusfleet.net/nova ... iewpost/71

So with that being the case, all I should need to do to achieve what I was aiming for is construct a page that will search the list of posts for anything marked as 'saved', and generate a list with links.
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 288


Williams Mon Jul 20, 2015 8:30 am

Re: Make Joint Posts Public?

Quite easily done. I just coped the function from the controller for the listposts page which already exists, changed the page URL and changed 'activated' to 'saved', and then copied the relevant view files and renamed to match the new URL. It is still paginating based on the activated posts, but that shouldn't be too difficult to track down:

http://highlander.pegasusfleet.net/nova ... savedposts
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 288


Williams Mon Jul 20, 2015 9:06 am

Re: Make Joint Posts Public?

And I've sorted it :) Managed to track down the 'count_all_posts' function in the posts model and copy it to create a 'count_saved_posts' function.

Going to tidy it up a bit and then stick on on Xtras for anyone else who wants a public list of saved posts.
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 288


Williams Mon Jul 20, 2015 9:32 am

Re: Make Joint Posts Public?

So here's the basic version of the Mod: http://xtras.anodyne-productions.com/it ... posts-list

I'll probably start working the embargoed version at some point and upload as a version 2 if I manage it. (Don't know if you want to move this to the mods forum now since it's developed from a 'how do I')
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 288


AgentPhoenix Mon Jul 20, 2015 9:57 am

Re: Make Joint Posts Public?

Glad you got it sorted out!
User avatar

Posts: 7596



Return to Nova MODs

Who is online

Users browsing this forum: No registered users and 1 guest