News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Upload at groupmembership request page

Started by ahmadziairfan, May 13, 2014, 10:20:11 PM

Previous topic - Next topic

ahmadziairfan

Hi everyone,
I hope i am posting my question in the correct section.

Actually it is an urgent question. I need an "upload file" field at the group membership request page. When some one needs to join a group they need to provide their student card photo or scan. This upload should show at the group moderate page where the reason for group membership is displayed.

I have a university forum where different universities communities have their sections. Communities have their own groups and these groups can post only in their corresponding section. There is one group moderator for each group.

So this way group membership moderators would know that this person is actually a student  at their university.

Arantor

There is really no good way to do that, short of doing it all manually and it's a huge amount of work to do with any kind of security.

On a simpler note, isn't there some kind of id number that could be used instead?
Holder of controversial views, all of which my own.


ahmadziairfan

Yes i know i have found the two files which need to be changed. One is the "profile-modify.php" this has the two functions which log the group membership request and do a db query. 

The other one is "profile.template.php" which had the html form for the group membership reason box. I tried the simple php upload there but i am a nobo with php.  I got the upload box but it doesnt work.

Arantor

No, it won't do. Adding the upload box itself is easy, it's one line of code. It's many, many more lines of code to actually process the upload, not to mention displaying that to someone.

And doing it securely to prevent you being able to be hacked with it just makes it even more complicated. I am intimately familiar with SMF's codebase. Especially the group request code which would have to have significant rewrites for your needs. Once a request is approved or refused, the request is deleted in its entirety, there is no tracking in 2.0 for who approved or refused a request, nor anywhere to store anything beyond the person, the group they are joining and the reason they're giving. So you'd probably want to rewrite that to keep a log of requests and their outcomes - even before you get into the difficulties of handling file uploads, which are more difficult than most people realise.
Holder of controversial views, all of which my own.


ahmadziairfan

You are right about everything. But this is what i need to do. There is another thing which might be simpler. Can we upload and send the upload as an attachment to  the group moderator and admin?

Arantor

Actually, the simplest solution is the one I already asked you about.

But failing that, going the much more complex route of a user posting a topic with their ID as an attachment and then linking to the topic, yes, that would work if it weren't for the fact that every user will be able to see every other user's ID too...
Holder of controversial views, all of which my own.


ahmadziairfan

I cant use an id number since i have no way to verify that id number from the university database.

The topic method i did try. I set the permission in a way that everyone had to upload their identity in a section. Posts in That section had to be approved by group moderators but no body actually understood it and dropped out.

Now i want it to be stream lined and easy.

Arantor

Which means finding - probably paying - someone to custom build this for you since there's no existing way even close to what you're trying to do.
Holder of controversial views, all of which my own.


ahmadziairfan

Yes, but i dont know who could customize this.

Advertisement: