Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2   Go Down

Author Topic: XP Publish Admin OK - Users (Only personal gallery not public)  (Read 9527 times)

0 Members and 1 Guest are viewing this topic.

mskarl

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
XP Publish Admin OK - Users (Only personal gallery not public)
« on: February 24, 2006, 05:17:13 pm »

My host is http://www.websitesource.com/

MySQL 4.0.26
PHP Version 4.4.1


http://www.familytracks.org/gallery
Username (NON ADMIN): testing
Password: test

Ok all I've tried many many different searches to try and figure this out please any help would be greatly appreciated!

XP  Publish as an user is only allowed to publish to user gallery now.  They were able to publish into public galleries previousely.  When I upload through http on the web it works perfectly as a user and as ADMIN.  But the XP Publish donsn't work for user!  Did I discover a bug?  Or did I create the bug?

What I changed when I noticed this problem was the following.

I moved user galleries to public galleries by changing the “category” in the “cpg14x_albums” table.  Then I wanted to setup the users so they could publish anywhere but approval was needed.  So I marked them at approval required in users.  Then I noticed the problem and tried to move everything back except the user albums back to user albums.  Still no luck.

Any admin account works perfectly still but as an user you aren’t allowed to post to any public galleries.

P.S.  I’ve searched and searched and read documentation and can’t find anything.  If I’m missing something I’m very sorry but I defiantly tried to make an effort to read up before posting.  Thanks A LOT!
« Last Edit: February 24, 2006, 07:21:36 pm by mskarl »
Logged

lamer

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #1 on: April 14, 2006, 03:13:46 pm »

I've got the same annoying problem, and i found the folloing in the xp_publish.php:

Code: [Select]
{
    global $CONFIG;

     if (USER_IS_ADMIN) {
        $public_albums = cpg_db_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category < " . FIRST_USER_CAT . " ORDER BY title");
        if (mysql_num_rows($public_albums)) {
            $public_albums_list = cpg_db_fetch_rowset($public_albums);
        } else {
            $public_albums_list = array();
        }
    } else {
        $public_albums_list = array();
    }

    if (USER_ID) {
        $user_albums = cpg_db_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category='" . (FIRST_USER_CAT + USER_ID) . "' ORDER BY title");
        if (mysql_num_rows($user_albums)) {
            $user_albums_list = cpg_db_fetch_rowset($user_albums);
        } else {
            $user_albums_list = array();
        }
    } else {
        $user_albums_list = array();
    }

Is it possible to let not only admins retrieve the public album list but also a special group (eg. "resident")?
How and where do i have to define it? (my php is very bad...as bad as my english..even worse  ;)


Thank you for answering!

@gaugau: warum jeht dat net`? :(
« Last Edit: April 14, 2006, 04:01:51 pm by lamer »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #2 on: April 14, 2006, 06:29:37 pm »

I have no idea - I don't have Windows XP
Logged

lamer

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #3 on: April 14, 2006, 07:42:44 pm »

i don't have xp neither, it's win2k3. but it's not the OS that makes the problem, i'm searching for a way to modify the php skript.

(für die deutschen unter uns, ich werds wahrscheinlich auf englisch nicht hinbekommen zu erklären: es muss doch möglich sein, dass das php skriPt (ich glaube die richtige stelle ja schon gefunden zu haben) nicht nur abfragt, ob der user ein admin ist, sondern dass man fragt ob es ein admin ODER aber ein mitglied einer bestimmten gruppe ist. wäre eine schöne sache, und scheinbar haben sich schon viele damit rumgeschlagen?)

english translation will follow
Logged

dwizeno

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #4 on: April 16, 2006, 03:54:13 pm »

I have no idea - I don't have Windows XP
Me neigther and have the same problem using Mozilla on Linux RH9.0; might be a coding 'feature'.

I'm using Coppermine for the very first time, find it quite a usefull tool, but couldn't figure out how I could create a category structure where users have to adhere to, instead of having them make their own structure.  In the end I turned to this forum to find a solution, but apparently there are other people that have the same problem.

Think I'll be using the keyword functionallity and ask users to group using these as a temporary workaround.  Would be great if someone could solve this problem (unless it's due to my lack of coppermine knowledge).  My PHP knowledge is none existant,  otherwise I would have given it a go myselve.

Cheers,
Dirk
Logged

Bendjamini

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #5 on: July 11, 2006, 03:09:39 am »

I have the same problem... and GauGau ..stop with this "I don't have WinXp" so stop writeing this.. if U wanna help.. install somewhere xp and help us.. but.. like lamer says.. this is somewhere in php.. sooo what mean this.. that U maybe can fix this.. so.. it will be good to work...

And This is support forum.. right ?... so think about that.. I have cpg gallery where I have categories out of members albums... and I want the members to upload photos in the that categories... and my members have hundred ot pics.. it's stupid to tell them to add one by one.. cuz the http upload of cpg is very lame.. just think how U can fix the problem with xp publish
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #6 on: July 12, 2006, 12:18:23 pm »

I have the same problem... and GauGau ..stop with this "I don't have WinXp" so stop writeing this.. if U wanna help.. install somewhere xp and help us
lamer specifically singled out GauGau and he replied accordingly. WinXP isn't cheap. If you want GauGau to help, why don't you buy him a copy of XP, and maybe a computer to run it on in case he doesn't want to do dual boot on his existing computer(s).
Logged

Bendjamini

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #7 on: July 13, 2006, 04:02:39 am »

everybody can crash xp and ... huha.. use inlicense xp.. whateva..

Okay .. My question is.. is there a way ... members will be able to upload not only in personal gallery ...... help..do help..nothing else...
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #8 on: July 13, 2006, 05:40:17 am »

Don't consider open source devs software pirates!
If you actually need help with uploading issues, do as suggested in the upload troubleshooting section of the docs instead of trying to hijack an outdated thread and flaming there. I suggest reviewing your attitude.
Logged

tjs12

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #9 on: July 25, 2006, 10:10:03 am »

I have read the troubleshooting page and do not see the answer to this problem...

Is there a solution that I have missed?

Thanks
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #10 on: July 25, 2006, 07:12:56 pm »

We can tell you have read them extra-carefully. Nevertheless, let me quote them to you once more:
Quote
4.11.4 Upload troubleshooting

If you are experiencing issues with coppermine's upload process, temporarily change your coppermine settings as suggested below to get more detailed error messages:

    * Go to your coppermine page and log in as admin
    * Go to the config screen
    * Scroll to the bottom of the page
    * Expand the "Maintenance settings" section by clicking on it
    * Enable debug mode for everyone
    * Leave display of notices switched off
    * Save the new settings by clicking on "Save new configuration"
    * Go to the "groups" panel
    * Set the upload form configuration for all groups to "Single file uploads only" (set File upload boxes to "1", URI upload boxes to "0" and No. of boxes to "fixed")
    * Save your new settings

Then try to upload (using http uploads, even if you experienced troubles using another upload method) - you should get a more detailed error message that tells you what exactly goes wrong with your uploads. If the error message doesn't mean anything to you, search the support board for the error message you get.
When asking for support on the coppermine forum, post a link to your site and a test user account (the test user mustn't be in the admin group!) with upload privileges, with the above mentioned settings in place - this way, supporters can see the error messages as well. Do not post debug_output unless requested.
I highlighted the important part to enable you to ignore it once more. We highlighted the section in the original documentation in red for no apparent reason. ::)
Logged

tjs12

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #11 on: July 25, 2006, 08:23:56 pm »

GauGau - you wrote above "If you actually need help with uploading issues, do as suggested in the upload troubleshooting section of the docs instead of trying to hijack an outdated thread and flaming there. I suggest reviewing your attitude."

I assume you were referring to the troubleshooting page in this section, located here: http://forum.coppermine-gallery.net/index.php?topic=24088.0

You know seem to be asking me to look at the documentation?!?!? Is that correct?

Anyway....what do you want?

As clearly explained by mskarl, the problem is that non-admin users can ONLY upload to user galleries via XP however via http they can upload to user galleries and non user galleries. 

I asked mscarl via private message today if he had found a solution in the last 6 months and he says he has not....can you shed any light on a solution?

Logged

tjs12

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #12 on: July 27, 2006, 10:11:54 am »

does anybody have an answer to this problem?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #13 on: July 27, 2006, 10:18:48 am »

Do as I suggested if you want help. If you don't, then stop replying to this thread, as it is not yours. There's little use in PMing the thread starter: after having solved his issues, he probably never visited the forum again, so he won't even know that you're asking questions.
Logged

tjs12

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #14 on: July 27, 2006, 10:35:02 am »

I have PMed the thread started and he HAS NOT solved the problem.

The problem is: "that non-admin users can ONLY upload to user galleries via XP however via http they can upload to user galleries and non user galleries."
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #15 on: July 27, 2006, 11:03:30 am »

Do as I suggested or shut up.
Logged

tjs12

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #16 on: July 27, 2006, 11:44:39 am »

I believe I have done as suggested....please explain what I need to do.

I have reviewed http://forum.coppermine-gallery.net/index.php?topic=24088.0 and see nothing useful.

Sorry if I keep missing something simple.
Logged

tjs12

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #17 on: August 28, 2006, 10:11:50 am »

anybody had any joy fixing this bug yet?
Logged

sinti

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 12
    • Fotoalbum STV Lachen
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #18 on: October 01, 2006, 03:32:20 pm »

Hi, I tried to solve this one. Here is my solution. It worked for me.
I have a usergroup called "Uploader", which I wanted to allow to upload files to public albums through XP Publisher.
To get that working for this usergroup, edit xp_publish.php as following:

(If you have another usergroup, change this name in the following code accordingly)

search:

Code: [Select]
<!-- END existing_albums -->
<!-- BEGIN create_album -->

replace with:

Code: [Select]
<!-- END existing_albums -->
<!-- BEGIN create_special -->
<form method="post" id="createAlb" action="{POST_ACTION}">
<input type="hidden" id="newAlbName" name="new_alb_name" value="" maxlength="255" />
</form>
<!-- END create_special -->
<!-- BEGIN create_album -->

--------------------------------------------------------------

search:

Code: [Select]
    if (USER_IS_ADMIN) {
        $public_albums = cpg_db_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category < " . FIRST_USER_CAT . " ORDER BY title");
        if (mysql_num_rows($public_albums)) {
            $public_albums_list = cpg_db_fetch_rowset($public_albums);
        } else {
            $public_albums_list = array();
        }
    } else {
        $public_albums_list = array();
    }

replace with:

Code: [Select]
    if (USER_IS_ADMIN) {
        $public_albums = cpg_db_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category < " . FIRST_USER_CAT . " ORDER BY title");
        if (mysql_num_rows($public_albums)) {
            $public_albums_list = cpg_db_fetch_rowset($public_albums);
        } else {
            $public_albums_list = array();
        }
    } elseif (USER_GROUP == 'Uploader') {
$public_albums = cpg_db_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category < " . FIRST_USER_CAT . " AND uploads='YES' ORDER BY title");
        if (mysql_num_rows($public_albums)) {
            $public_albums_list = cpg_db_fetch_rowset($public_albums);
        } else {
            $public_albums_list = array();
        }
    } else {
        $public_albums_list = array();
    }

--------------------------------------------------------------

search:

Code: [Select]
if (!(USER_CAN_CREATE_ALBUMS || USER_IS_ADMIN)) {
        template_extract_block($template_select_album, 'existing_albums');
        template_extract_block($template_select_album, 'create_album');

replace with:

Code: [Select]
if (USER_IS_ADMIN || (USER_GROUP == 'Uploader')) {
$user_is_admin_xp = 1;
}

if (!(USER_CAN_CREATE_ALBUMS || $user_is_admin_xp)) {
        template_extract_block($template_select_album, 'existing_albums');
        template_extract_block($template_select_album, 'create_album');
template_extract_block($template_select_album, 'create_special');

--------------------------------------------------------------

search:

Code: [Select]
if (!USER_IS_ADMIN) template_extract_block($template_select_album, 'select_category');
replace with:

Code: [Select]
if (!$user_is_admin_xp) template_extract_block($template_select_album, 'select_category');
if (USER_GROUP == 'Uploader') template_extract_block($template_select_album, 'create_album');

--------------------------------------------------------------

search (yes, once again):

Code: [Select]
if (!USER_IS_ADMIN) template_extract_block($template_select_album, 'select_category');
replace with:

Code: [Select]
if (!$user_is_admin_xp) template_extract_block($template_select_album, 'select_category');
if (USER_GROUP == 'Uploader') template_extract_block($template_select_album, 'create_album');

--------------------------------------------------------------

search:

Code: [Select]
global $lang_db_input_php, $lang_errors;

@unlink(LOGFILE);

replace with:

Code: [Select]
global $lang_db_input_php, $lang_errors;

if (USER_IS_ADMIN || (USER_GROUP == 'Uploader')) {
$user_is_admin_xp = 1;
}

@unlink(LOGFILE);

--------------------------------------------------------------

search:

Code: [Select]
// Check if the album id provided is valid
    if (!USER_IS_ADMIN) {

replace with:

Code: [Select]
// Check if the album id provided is valid
    if (!$user_is_admin_xp) {
Logged

anadolugezgini

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 16
    • Anatolian Photo-Trekking Website
Re: XP Publish Admin OK - Users (Only personal gallery not public)
« Reply #19 on: October 09, 2006, 09:55:23 am »

Hi,
That doesn't worked for me.XP-publishing wizard stops working :( moving from backup again.

Hi, I tried to solve this one. Here is my solution. It worked for me.
I have a usergroup called "Uploader", which I wanted to allow to upload files to public albums through XP Publisher.
To get that working for this usergroup, edit xp_publish.php as following:

(If you have another usergroup, change this name in the following code accordingly)

search:

Code: [Select]
<!-- END existing_albums -->
<!-- BEGIN create_album -->

replace with:

Code: [Select]
<!-- END existing_albums -->
<!-- BEGIN create_special -->
<form method="post" id="createAlb" action="{POST_ACTION}">
<input type="hidden" id="newAlbName" name="new_alb_name" value="" maxlength="255" />
</form>
<!-- END create_special -->
<!-- BEGIN create_album -->

--------------------------------------------------------------

search:

Code: [Select]
    if (USER_IS_ADMIN) {
        $public_albums = cpg_db_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category < " . FIRST_USER_CAT . " ORDER BY title");
        if (mysql_num_rows($public_albums)) {
            $public_albums_list = cpg_db_fetch_rowset($public_albums);
        } else {
            $public_albums_list = array();
        }
    } else {
        $public_albums_list = array();
    }

replace with:

Code: [Select]
    if (USER_IS_ADMIN) {
        $public_albums = cpg_db_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category < " . FIRST_USER_CAT . " ORDER BY title");
        if (mysql_num_rows($public_albums)) {
            $public_albums_list = cpg_db_fetch_rowset($public_albums);
        } else {
            $public_albums_list = array();
        }
    } elseif (USER_GROUP == 'Uploader') {
$public_albums = cpg_db_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category < " . FIRST_USER_CAT . " AND uploads='YES' ORDER BY title");
        if (mysql_num_rows($public_albums)) {
            $public_albums_list = cpg_db_fetch_rowset($public_albums);
        } else {
            $public_albums_list = array();
        }
    } else {
        $public_albums_list = array();
    }

--------------------------------------------------------------

search:

Code: [Select]
if (!(USER_CAN_CREATE_ALBUMS || USER_IS_ADMIN)) {
        template_extract_block($template_select_album, 'existing_albums');
        template_extract_block($template_select_album, 'create_album');

replace with:

Code: [Select]
if (USER_IS_ADMIN || (USER_GROUP == 'Uploader')) {
$user_is_admin_xp = 1;
}

if (!(USER_CAN_CREATE_ALBUMS || $user_is_admin_xp)) {
        template_extract_block($template_select_album, 'existing_albums');
        template_extract_block($template_select_album, 'create_album');
template_extract_block($template_select_album, 'create_special');

--------------------------------------------------------------

search:

Code: [Select]
if (!USER_IS_ADMIN) template_extract_block($template_select_album, 'select_category');
replace with:

Code: [Select]
if (!$user_is_admin_xp) template_extract_block($template_select_album, 'select_category');
if (USER_GROUP == 'Uploader') template_extract_block($template_select_album, 'create_album');

--------------------------------------------------------------

search (yes, once again):

Code: [Select]
if (!USER_IS_ADMIN) template_extract_block($template_select_album, 'select_category');
replace with:

Code: [Select]
if (!$user_is_admin_xp) template_extract_block($template_select_album, 'select_category');
if (USER_GROUP == 'Uploader') template_extract_block($template_select_album, 'create_album');

--------------------------------------------------------------

search:

Code: [Select]
global $lang_db_input_php, $lang_errors;

@unlink(LOGFILE);

replace with:

Code: [Select]
global $lang_db_input_php, $lang_errors;

if (USER_IS_ADMIN || (USER_GROUP == 'Uploader')) {
$user_is_admin_xp = 1;
}

@unlink(LOGFILE);

--------------------------------------------------------------

search:

Code: [Select]
// Check if the album id provided is valid
    if (!USER_IS_ADMIN) {

replace with:

Code: [Select]
// Check if the album id provided is valid
    if (!$user_is_admin_xp) {
Logged
Pages: [1] 2   Go Up
 

Page created in 0.046 seconds with 19 queries.