Support Forum

Pre-forum agreement, and User Photo uploads

FO Focus97
Focus97
Member

Hi guys – two questions (sorry for lumping them into one topic).

1.) Wondering if it’s possible to require users to accept terms before they can post in the forum?

The use-case currently is that visitors will be able to see the forum (once it goes live), but will have to register in order to post. Once registered, they would ideally be prompted with a user-agreement to accept (guidelines for supporting a friendly community, essentially). Is this possible with the forum? If not, I was envisioning a simple jQuery-based modal, where the ‘acceptance’ is stored in a cookie. Not as ideal as storing the result in the database for that user, though. We can also put the terms to accept in registration, but since we have some other terms to accept there, we wanted to see if this second step was possible.

2.) Second question is related to user profiles. Users can upload an avatar via the profile area, but we’d like to enable another area of their profile for photo uploads they can share with other members (such that viewing a user’s profile would show other photos they’ve chosen to share on the site). I see the attachment-upload functionality via plupload – is it possible to extend this to their profile for uploading/sharing photos?

19 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

1 – Install the Policy Docs SP plugin. This can do what you want. It doesn’t store the result of terms acceptance but it doesn’t really need to as if they register they have accepted. It is implicit.

2 – Got to the forum admin > Profiles > Options and turn on user photos. But the form in the profile just accepts a URL to the image files. Mostly we expect people to point these to remote urls.

FO Focus97
Focus97
Member

Part of the issue is that we’re not using SP for registering on the site, but WordPress itself with extra registration fields. But I’ll grab the policy docs plugin to see if it can work.

As for the Profiles – I’ve enabled those for user photos, but the problem is the url path to enter. I think it’s more intuitive to upload a photo from the computer. The url seems a bit harder for non-techy folks who’ve been testing on our end.

I see the plupload feature elsewhere in the forum – is there a way to enable this for profile-photo uploads? Certainly open to working with core files to achieve it, if it’s possible (with the caveat that I’m a novice with respect to PHP).

MP Mr Papa
Mr Papa
Member

the policy docs works with the wp registration… sp does not have its own registration…

its possible using our hooks and api to replace the photo url entry with an uploader but it would take some php to accomplish… sorry, but probably more than you would want to try at a novice level…  but I can point you in the direction if you want to give it a try…

you could also edit the core code itself to change, which would be slightly easier, but still require some php knowledge…  of course, you would then have to make those same changes on every update to sp…

we can add it to our list to consider changing how the photo stuff works…  biggest issue would be that the profiles are in core and the file uploader is a plugn and wont be available in many users set ups who dont allow uploads…

FO Focus97
Focus97
Member

To be sure, I’m game to make changes with PHP and core files. While most of our dev changes are limited to theme template files, I’ve made a couple changes to core files. Just keeping track of them for when we do SP updates.

In SP V4 versions, about two years ago, I ended up making some significant changes to allow users (logged in to a private site) to post anonymously to topics. Then ran conditionals to check if they entered something in the “anonymous” text field (such as entering an alias or something else other than their username), to return what they entered as the post-author (sans the hyperlink to their profile). Quite a lot of work, and many files were changed to make sure the ‘anonymous’ name appeared in topics/groups/posts/etc.

The basic thing we want to achieve is to allow users to upload, so I’m open to trying any method you think will achieve that within their profile. Core changes will be tracked by me as well. As of now, I’m the only one controlling updates to WP or SP, so core mods are fine on our end.

Any directions you can point me to would be lovely. Thanks in advance, of course.

MP Mr Papa
Mr Papa
Member

Well, need to figure out which way you want to go…

to edit core, take a look at simple-press/forum/profile/forms/sp-form-photos.php…  there is where we currently put out the form for entering the urls for the photos…  you can change that up however you like with html and/or php…  you can try to get an uploader form to show by calling

sp_plupload_do_uploader_form(”, 0, false);

now, I dont know if that will work… its backwards trying to make something load the uploader since its all done with hooks normally…

if you change the form, you will also need to change the saving stuff at simple-press/forum/profile/ahah/sp-ahah-profile-save.php…  there will be a section of a switch statement for photos…

or do it all with hooks…  this is personally how I would do it…  start by reading how hooks, filters and actions work…  http://codex.wordpress.org/Plugin_API

then look at the same photos form file… you will see a filter used on the display stuff before its output… using that filter you can replace the photo form with whatever you want…  and you will see a similar filter on the saving stuff so you can not save it the old way and then save it your way…

to make the file uploader appear, with a similar call mentioned above…  I think… wink

anyways, take a look at those and see if you can follow what I am saying…  ask any questions you might have…

MP Mr Papa
Mr Papa
Member

actually, I needed something interesting to do this morning, so I whipped this up in the file uploader plugin…  will make it an option…  needs testing, but if all goes well, should get it in the file uploader update we plan for this weekend…

FO Focus97
Focus97
Member

First, I’ll take a look at the links above. Second, I’m *slightly* (read “very”) curious to see what you whipped up! The forum we’re developing is, well, in dev mode. So if you need me to beta test, happy to oblige. 🙂 

MP Mr Papa
Mr Papa
Member

its being tested now… so looks good for the update we will push out this weekend…

FO Focus97
Focus97
Member

Just following up – wanted to see if I can try out the photo-upload feature. I have the latest Forum build but wondering if I need a special plugin for the Profile photo-upload? (I also have the Profile Display Control, Custom Profile Fields, and File Uploader plugins installed).

YS Yellow Swordfish
Yellow Swordfish
Member

It was in the 5.0.5 update… Did you turn photos on in the profile options?

FO Focus97
Focus97
Member

I must be missing something. I feel I’m pretty adept at the forum and its functions, but I can’t see anything other than under Profiles -> Profile Options -> Max number of photos allowed. I’ve set it to 5, but this only gives the option to include a url to a photo, not a user-friendly photo-upload function using plupload or something akin to it.

Definitely running 5.05 – can you point me to where I should go?

YS Yellow Swordfish
Yellow Swordfish
Member

Wow that threw me as well.
You need to visit the uploader admin panel and turn it on there. This was for backward compatibility as using the uploader removes the old profile url fields and if people were already using them then it would throw things out.

FO Focus97
Focus97
Member

Um, you guys rock. Seriously. The photo upload feature is terrific and it’s working elegantly now. Much cheers!