Discussion Form Images

TiG
TiG
@tig
6 years ago
184 posts
The following code in jrDiscussion:

function view_jrDiscussion_create_topic_save($_post, &$_user, &$_conf)
{ ... // $id will be the INSERT_ID (_item_id) of the created item $id = jrCore_db_create_item('jrDiscussion', $_rt, $_core); if (!$id) { jrCore_set_form_notice('error', 'An error was encountered creating this discussion - please try again.'); jrCore_form_result(); } ...

... would be brilliant if it included this after the db_create_item:

   jrCore_save_all_media_files('jrDiscussion', 'create', $_rt['discussion_profile_id'], $id);

... similar to jrBlog:

    // $bid will be the INSERT_ID (_item_id) of the created item
    $bid = jrCore_db_create_item('jrBlog', $_rt);
    if (!$bid) {
        jrCore_set_form_notice('error', 12);
        jrCore_form_result();
    }

    // Save any uploaded media files added in by our
    jrCore_save_all_media_files('jrBlog', 'create', $_user['user_active_profile_id'], $bid);

As you might surmise, I have included support for images in discussions. Updates are no problem since the id is provided, but for creates I cannot seem to find a way to get the new id for a created discussion at the right time to issue the jrCore_save_all_media_files.

The obvious choice (at least given the logic of the function) of tagging off of the jrAction listener fails because of embedded logic that ignores admins making changes.

Any ideas?



--
TiG

updated by @tig: 04/04/18 04:39:47AM
paul
@paul
6 years ago
4,332 posts
I'll check that out - Thanks


--
Paul Asher - JR Developer and System Import Specialist
paul
@paul
6 years ago
4,332 posts
Actually, we are no longer maintaining the Discussion module for reasons discussed elsewhere (mainly no other users and poor performance) and it has been removed from the marketplace.
What I suggest is that you add these updates to the module scripts yourself. Open a ticket if you run into any issues.
Thanks


--
Paul Asher - JR Developer and System Import Specialist
TiG
TiG
@tig
6 years ago
184 posts
@paul

I can certainly do that. :)

On a related point, given jrDiscussion is now officially declared obsolete don't you think NT should migrate away from it? I asked this question of Brian and he was not very encouraging. At that time he did not express jrDiscussion being obsolete - more like a road less traveled. Obsolescence should mean that we migrate over to where JR is actively caring for and feeding its functionality. So, asking the same question I asked of Brian, why would NT not migrate to jrForum (or some other choice)?


--
TiG
TiG
TiG
@tig
6 years ago
184 posts
@paul

I just reread past comments. Your suggestion was indeed for us to use jrForum but Brian thinks we should just continue with jrDiscussion with an archive solution to reduce the db size.

I prefer going with a supported solution so it probably is good for me to investigate jrForum and see how it works. If you have any words of wisdom I am happy to take them.

Thanks for your support.


--
TiG
paul
@paul
6 years ago
4,332 posts
Maybe saying that the module is 'obsolete' is not strictly true, its just that we are no longer promoting it and any updates to it are going to be a low priority.
I've reread your other thread as well and what Brian advised was that adding threading to the Forum module would be more difficult that customising the Discussion/Comment modules to your own ends, so for that reason, as threading is important to your site, stick with the latter.
Maybe one option is for you to take over the development/responsibility for the Discussion module, Perrie did sponsor its initial development after all. You'll then be free to customise it (and even market it) as you wish?


--
Paul Asher - JR Developer and System Import Specialist
TiG
TiG
@tig
6 years ago
184 posts
@paul

Right now we have the beginning of a uniform abstraction (ntArticle) that covers blogs, discussions and group discussions. I will investigate using jrForum as a functional base for ntArticle going forward. If Brian is correct that adding threading to jrForum is not realistic then I will abandon the idea. As you can tell, I consider it a priority to keep NT as close to JR primary supported functionality as possible. So when making choices I will tend to favor the actively supported side (big picture considerations).

Not really interested in taking on support for a module on the general market. :)

Again, thanks much for your advice.


--
TiG
TiG
TiG
@tig
6 years ago
184 posts
One closing question. NT has the ability to install jrForum on the production site, but the alpha site (development area) does not have the option. The Marketplace is asking for payment. Shouldn't the test (staging) areas have the means to install modules according to the master license?

I can install this into production and then copy to the alpha site but I would rather not include modules in production that are not currently being used if at all possible.


--
TiG
michael
@michael
6 years ago
7,746 posts
If the master site is on Jamroom Hosting and the Dev site is somewhere else, that could setup the buy now button to be active.

For Jamroom Hosting customers, they can install as many jamroom installs as they like on the server and all the modules will come with the site, but the license is just for jamroom install on that server so if the license key was in a local install then the buy now buttons would show.

You could sync your files via FTP and they would work on your dev site if its local.
TiG
TiG
@tig
6 years ago
184 posts
@michael

This is all on the JR hosting site. The site hosts NT production, Alpha and Beta.

I suspect this might have something to do with the changes we made to allow me to package 3rd party modules on Alpha. I copied my user credentials to ACP -> MODULES -> CORE -> MARKETPLACE -> TOOLS -> MARKETPLACE SYSTEMS -> MODIFY. That of course worked and I have been packaging without problems. When I go to that page I see Alpha is listed (but not Beta or Newstalkers). The correlates with my access problem. I can access NT marketplace items from Beta or Newstalkers production but not from Alpha.

At this point, I can just use our Beta site to access jrForum since I am doing my packaging work in Alpha at the moment (temporary). But in the future when I set Beta up to allow me to package modules and skins for migration to production, Beta will be isolated from the NewsTalkers marketplace license too.

Hopefully there is an easy workaround. If not, I can survive.


--
TiG

updated by @tig: 01/03/18 02:53:25PM

Tags