XP Publish Admin OK - Users (Only personal gallery not public) XP Publish Admin OK - Users (Only personal gallery not public)
 

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 Publish Admin OK - Users (Only personal gallery not public)

Started by mskarl, February 24, 2006, 05:17:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mskarl

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!

lamer

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


{
    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`? :(

Joachim Müller


lamer

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

dwizeno

Quote from: GauGau on April 14, 2006, 06:29:37 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

Bendjamini

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

Tranz

Quote from: Bendjamini 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
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).

Bendjamini

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

Joachim Müller

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.

tjs12

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

Is there a solution that I have missed?

Thanks

Joachim Müller

We can tell you have read them extra-carefully. Nevertheless, let me quote them to you once more:
Quote4.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. ::)

tjs12

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?


tjs12


Joachim Müller

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.

tjs12

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

Joachim Müller


tjs12

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.

tjs12


sinti

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:

<!-- END existing_albums -->
<!-- BEGIN create_album -->


replace with:

<!-- 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:

    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:

    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:

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:

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:

if (!USER_IS_ADMIN) template_extract_block($template_select_album, 'select_category');

replace with:

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

if (!USER_IS_ADMIN) template_extract_block($template_select_album, 'select_category');

replace with:

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:

global $lang_db_input_php, $lang_errors;

@unlink(LOGFILE);


replace with:

global $lang_db_input_php, $lang_errors;

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

@unlink(LOGFILE);


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

search:

// Check if the album id provided is valid
    if (!USER_IS_ADMIN) {


replace with:

// Check if the album id provided is valid
    if (!$user_is_admin_xp) {

anadolugezgini

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

Quote from: sinti 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:

<!-- END existing_albums -->
<!-- BEGIN create_album -->


replace with:

<!-- 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:

    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:

    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:

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:

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:

if (!USER_IS_ADMIN) template_extract_block($template_select_album, 'select_category');

replace with:

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

if (!USER_IS_ADMIN) template_extract_block($template_select_album, 'select_category');

replace with:

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:

global $lang_db_input_php, $lang_errors;

@unlink(LOGFILE);


replace with:

global $lang_db_input_php, $lang_errors;

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

@unlink(LOGFILE);


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

search:

// Check if the album id provided is valid
    if (!USER_IS_ADMIN) {


replace with:

// Check if the album id provided is valid
    if (!$user_is_admin_xp) {