PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Classifieds Bug Reports (http://www.photopost.com/forum/classifieds-bug-reports/)
-   -   Query: Place An Add requires "Allow edit own ads?" permission. (http://www.photopost.com/forum/classifieds-bug-reports/114576-query-place-add-requires-allow-edit-own-ads-permission.html)

mawby June 25th, 2005 04:47 AM

Query: Place An Add requires "Allow edit own ads?" permission.
 
Hi again. I've not checked the code on this one, but the reports I've got back from my users is that the "Place An Ad" menu option only apprears if the usergroup has been granted "Allow edit own ads?" permission. I would have thought "Allow posting?" is the only permission they would need to create an ad? Why have a separate edit permission if it has to be turned on for the posting permission to work?

Chuck S June 25th, 2005 07:09 AM

Allow posting allows placement of ads

Allow edit own ads allows whether or not they can edit them after placing them

I surely see place an ad if the only permission I set is allow posting.

mawby June 26th, 2005 02:44 PM

Quote:

Originally Posted by omegatron
I surely see place an ad if the only permission I set is allow posting.

That is what I thought, but it was not the case on my site. If edit ad was not enabled (or admin/mod rights) then the place an add didn't appear.

Chuck S June 26th, 2005 03:17 PM

I would make sure you download the distribution and reupload all files incase you have anything corrupt or out of whack.

The place an ad link appears if useruploads is equal to 1 which means allow uploads for that specific usergroup. Telling me it only appears for admins or mods tells me you only have mods and admins set to upload.

You have a link to your install

mawby June 27th, 2005 05:15 AM

OK, I've found out the real problem. You are correct that only "Allow posting?" permission is needed for the user to be able to place an ad. However, the problem lies with chaning the "Allow edit own ads?" permission. To explain, I originally had it so both of these permissions were true for my users. I then disabled the editing permission. However, when the page reloads after saving it has actually disabled the posting permission and left the edit permission enabled. If I reselect no for the edit permission now the posting permission is no, then the save works. As per the other thread, I will PM you login details and instructions on how to replicate this problem.

Chuck S June 27th, 2005 07:18 AM

Your saying in edit usergroups the select boxes are off?

mawby June 27th, 2005 07:30 AM

Off? The dropdowns provide only "Yes" and "No" as options. What I'm saying is...

a) I originally set both "Allowing Posting" and "Allow edit own ads" to be "Yes" and everything was working.

b) I then changed "Allow edit own ads" to be "No", and pressed the "Save Changes" button.

c) Immediately after the save it reloads the page for you, and it can be seen that "Allowing Posting" is now "No" and "Allow edit own ads" is still "Yes"

I didn't spot c the first, so when my test users complained they could no longer add ads I assumed it was because I had turned off the edit permission, hence the title of the thread.

Chuck S June 27th, 2005 07:37 AM

Have you properly set permissions now as you want them?

mawby June 27th, 2005 07:47 AM

Yes. We decided to allow our members to edit their adverts.

Chuck S June 27th, 2005 09:25 AM

Okay in editproduct.php find this

$phoedit = intval($phoedit);

above it add this

if ( isset($sold) ) $phoedit = intval($sold);
if ( isset($resell) ) $phoedit = intval($resell);

mawby June 27th, 2005 09:37 AM

lol, that's just a simplier (ok much simplier) version of what I posted up! :)

One query though, you say to change the code to...
Code:

Content visible to verified customers only.
...but shouldn't the original line appear before the two news lines otherwise it will wipe out the value that's just been set by the two new lines?

Chuck S June 27th, 2005 09:49 AM

No the order is right although It wont matter which way you do it ;) as phoedit is phoedit and only set to sold or resell if they exist which means are clicked

mawby June 27th, 2005 09:59 AM

Quote:

Originally Posted by omegatron
No the order is right although It wont matter which way you do it ;) as phoedit is phoedit and only set to sold or resell if they exist which means are clicked

Quite right. :) That works nicely now cheers.


All times are GMT -5. The time now is 10:28 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97