xp_publishin wiz problem xp_publishin wiz problem
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

xp_publishin wiz problem

Started by MonkeyManx, February 03, 2005, 12:22:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MonkeyManx

Hello, I am having a problem with the xp web publishing wizard. Being the admin I am able to upload to any category. But when I try with my test registered user account with the publizing wizard i can only add to the user album. When I upload via the gallery I have the option of uploading to any of the public albums. Is this a bug? can it be fixed? Am I doing something wrong? Please help!

Tranz

Please do not cross-post. I have removed the duplicate.

Joachim Müller

for a start I suggest you post your url and a test user account (non-admin), so others can check.

Joachim

Casper

This is not a bug, it is actually a feature from the early versions, designed to stop flooding to the main categories.  In fact the code allows upload to any album only by the actual owner of that album, so in the case of the main cats, that is the admin.
And as users cannot create albums in other categories, that is the only place they can upload to using this facility.

I looked into this before, and found all previous versions have this, and it is(or used to be) annotated in the source code.

And I don't know how to change it.

It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

MonkeyManx

I just realized that. looking at the xp_piblish.php file it says pretty much what you just. I suppose I will dig into the code and try and change it myself.

Gas

Hi!

I'm am new to coppermine and i'm planning to install it on my website.

I want to have public galleries where registered users can upload pictures by Publishing wizard. I know that you can't give users rights to create albums, so i want to give users rights to add pictures to galleries.

the problem is the same MonkeyManx's: Uploading to existing albums is not possible with xp publishing wizard.

Did anyone find a solution for this?

Joachim Müller

when reporting upload issues it'd be a good idea to post a link and test user account (non-admin), so others can look into your issue - we are not clairvoyants.

Joachim

Gas

Sorry, i recently deleted my coppermine, because i want to reinstall it.

But as i said, the problem is the same as MonkeyManx.

I just want to disable the security feature when uploading with wep publishing wizard.
If you need my album, i can reinstall it tomorrow.

Joachim Müller

not sure what you mean. Set the album properties accordingly, XP_Publish should respect them. Come back here if you actually have an install, theoretical questions without an actual app to check against are hard to track or fix ::).

Joachim

Gas

i reinstalled the gallery and sent you a pm containing all the neccesary information...

Thanks for helping me!

Casper

GauGau, nor any member of the dev team, reply to PMs sent that were not asked for.

The simple fact is that using xp_publish, normal users cannot upload to the main categories.  Changing the code would be a considerable job, and has not been done yet, and is not on any priority, so is unlikely to happen soon.


It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

...additionally, I don't even have Windows XP, so even if I wanted to I couldn't help you with this issue - hopefully you can see the point how futile PMs to supporters are. ::)

Joachim

Gas

#12
ok, ok... sorry for sending you a pm. I'll not do it again.

So, uploading to existing albums with given permissions is not possible with XP publisher, unless you are an admin. And noone knows how to enable it. Am i correct?

At least the programmer of the XP_Publisher integration should know it... or is there another way to solve this?

Gas

I read through the forums for over an hour and in every post i read about the publisher, there is written that it's possible that registered user can post into albums using Publisher, as long as the album has the "Users can upload files" - flag. I don't see any reason why this should not work.
If anyone can help me, please do it.

Url: www.der-gas.de/coppermine
Test-Account: testuser
Password: test

The user belongs to the "registered group", which may upload without approval.

Thanks in advance

Nibbler

It doesn't even look for public albums with upload perms set as far as I can see. If you are a registered user, you can upload into your user gallery and that is all.

MonkeyManx

Correct, as far as I can tell the problem is in: xp_publish.php

Gas

did you already find a solution for this? I mean its stupid why people should not be allowed to upload to albums they have the permission for with XP-publisher.


MonkeyManx

No I did not find a solution, but I think there might be a "quick and dirty" solution by manipulating this code:
// Return the HTML code for the album list select box
function html_album_list(&$alb_count)
{
    global $CONFIG;

    if (USER_IS_ADMIN) {
        $public_albums = mysql_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 = db_fetch_rowset($public_albums);
        } else {
            $public_albums_list = array();
        }
    } else {
        $public_albums_list = array();
    }

    if (USER_ID) {
        $public_albums = mysql_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 = db_fetch_rowset($public_albums);
        } else {
            $public_albums_list = array();
        }
    } else {
        $public_albums_list = array();
    }

    $alb_count = count($public_albums_list) + count($user_albums_list);

    $html = "\n";
    foreach($public_albums_list as $album) {
        $html .= '                        <option value="' . $album['aid'] . '">* ' . $album['title'] . "</option>\n";
    }
    foreach($public_albums_list as $album) {
        $html .= '                        <option value="' . $album['aid'] . '">' . $album['title'] . "</option>\n";
    }

    return $html;
}

Lines 205 - 243.
Just dont know what to do. I tried making the user have the same code as admn, but just ran into a head of errors.