Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
Pre-forum agreement, and User Photo uploads
Avatar
Focus97
Member
Free Members
sp_UserOfflineSmall Offline
Apr 5, 2012 - 12:59 pm

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?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 5, 2012 - 2:02 pm

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Focus97
Member
Free Members
sp_UserOfflineSmall Offline
Apr 6, 2012 - 10:02 am

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).

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 6, 2012 - 10:12 am

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...

Avatar
Focus97
Member
Free Members
sp_UserOfflineSmall Offline
Apr 6, 2012 - 10:21 am

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.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 6, 2012 - 10:38 am

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...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 6, 2012 - 1:44 pm

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...

Avatar
Focus97
Member
Free Members
sp_UserOfflineSmall Offline
Apr 6, 2012 - 2:15 pm

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. 🙂 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 6, 2012 - 3:47 pm

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

Avatar
Focus97
Member
Free Members
sp_UserOfflineSmall Offline
Apr 25, 2012 - 10:45 am

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).

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620