Moderators for Album pictures - Page 10 Moderators for Album pictures - Page 10
 

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]

Main Menu

Moderators for Album pictures

Started by Abbas Ali, January 09, 2006, 09:01:58 AM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

Nibbler

Don't modify themes.inc.php. Copy only what you need to change from the sample theme and then modify what you copied.

Abbas Ali

@stardust: Find the attached zip containing the files patched with this mod. Directly replace your existing files with the ones attached in the zip. Do take a backup before doing so.
Chief Geek at Ranium Systems

stardust

Thanks for the zip! I tested it and still got Fatal Error. "init.inc.php" is the only file that is giving me the error. I tested the other files a few times & they don't hurt my gallery, but everytime I try to add init.inc.php I get Fatal Error. I'm not sure what the problem is, do you know?

Abbas Ali

Did you added the field in the albums table in database? i.e. make sure you ran the query mentioned in the first post of this thread.
Chief Geek at Ranium Systems

stardust

Forgot to do that again, haha ;D Thank you so much for everything! Everything is now working perfectly fine!

fangweile

@stardust

Does your moderator now can edit files in your album?

Just curious  cause I still have this error "You don't have permission to perform this operation" when applying the mod in editpics.php cpg1.4.18 version ???
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희

stardust

fangweile yes my moderators can edit files. If you applied the mod manually, make sure you did this:

Quote from: Abbas Ali on August 29, 2006, 08:04:07 AM
I forgot to mark one of the modified lines with ###### and since you applied the mod manually you didn't knew that.

In editpics.php

Replace


        if ($cat != FIRST_USER_CAT + USER_ID && !GALLERY_ADMIN_MODE) cpg_die(ERROR, $lang_errors['perm_denied'], __FILE__, __LINE__);


with


        if ($cat != FIRST_USER_CAT + USER_ID && !GALLERY_ADMIN_MODE && !MODERATOR_EDIT_MODE) cpg_die(ERROR, $lang_errors['perm_denied'], __FILE__, __LINE__);


This should solve your problem.


Abbas

fangweile

OMG, I missed to read that one, It is working fine now. It will saved my time if I read that early on. My bad.

thanks. ^_^
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희

fejker

I'm having partial success with this mod and cpg 1.4.18. I applied the mod manually and moderators can edit pictures that are already in the albums but they cannot approve newly uploaded pics. Seams like the "if statement" for the approve button is missing.

Can somebody please help me with this.

Joachim Müller


fejker

Didn't even see the new version even though I checked today. Well ... I'll have a look, thanks.

fejker

OK, the mod works now but I have one little problem. I'm not a PHP/coding expert and I changed the way the menu buttons are generated and don't know how to make use of the "if" statement with the new code.

Here's part of the code I added to themes.inc.php
// HTML template for template sys_menu buttons
if (!isset($sys_menu_buttons)) { //{THEMES}
  // {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}{SPACER}
  $template_sys_menu = <<<EOT
    <span class="topmenu">
    <table border="0" cellpadding="0" cellspacing="6">
    <td class="admin_menu"><a href="{HOME_TGT}" title="{HOME_LNK}">{HOME_LNK}</a></td>
    <td class="admin_menu" id="admin_menu_anim"><a href="editpics.php?mode=upload_approval" title="{UPL_APP_TITLE}">{UPL_APP_LNK}</a></td>
  <!-- BEGIN my_gallery -->
    <td class="admin_menu"><a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a></td>
  <!-- END my_gallery -->


How can I insert the "if" statement in here to make the "Approve" button appear only to the moderators and admins. I changed the way buttons are generated only to have them look the same as other buttons. Is there any way to do this?

Thanks in advance.

Abbas Ali

The if statement should be


if (is_array($USER_DATA['allowed_albums']) && count($USER_DATA['allowed_albums'])) {
  // You button code here
}


Don't modify your themes.inc.php directly but rather make the changes in your theme.
Chief Geek at Ranium Systems

fejker

The theme's theme.inc.php is almost empty.

If I put that if statement in there it doesn't work because of <<<EOT.

Abbas Ali

You will have to copy the theme section from themes/sample/theme.php to your theme.php and then modify it as you see fit.
Chief Geek at Ranium Systems

savdre

I am so close to getting this to work properly... at least I think. I have read through this whole topic a few times and I am having difficutly getting the ability edit the file/pic as a moderator. I hope I can get some help.

So here is the summary:

1. Made the db change successfully.
2. Updated the files except I had difficulty updating the eyeball theme. I tried copying the entire sections from themes.inc.php file that required add/modifications that did not exist in the eyball theme. When that version is uploaded, the site goes blank if you are a moderator and logged in.

I tried leaving the eyball theme unchanged and update the theme.inc.php file. I can assign moderators to users and albums, and the edit link pops up on albums, but no imgaes are displayed when it is clicked on. if you go into an album and click on a pic, no buttons below the pic for editing.

I did add the unmarked edit to the editpcis file.

Attched is a zip with origingal files (anything with "copy of" is an original) and files with my modifications. The eyeball theme I tried to modifiy is titled "theme no good.php"

The theme.inc.php file has mods to it.

I have cpg 1.4.18. I have modified the layout of the theme to work with my site and also added a file types pluging and modified the site to play flash movies.

I have also created a test account - user: test   pw:test

I do have to admit that I am not a technical coder type... I'm a copy and paste kind of guy. Sorry of the answer is obvious to you guys but not me.


Thanks for the help in advance.

Abbas Ali

@savdre: I have updated the mod for cpg1419. Look at the first post of this thread and see if this works for you. Also you are using cpg1418 which is outdated, so first upgrade to cpg1419.
Chief Geek at Ranium Systems

savdre

Abbas,

thanks for the response and advice. It took a while but I got the site upgraded to 1.4.19 and redid the moderator mods. It seems to be working right. I am using a customized version of the eyeball theme.

I could not fiugre out what modifications I need to make to these files, so I left them unchange. The eyeball theme.php does not have the same sections in the classic theme.php file you made that have modifications.

I have one other question. Are moderators supposed to see the edit options (crop & rotate, edite file info, delete) when they are on an idividual picture page?

Bet Regards,
Andreas

Abbas Ali

Quote from: savdre on December 14, 2008, 09:14:59 PM
I have one other question. Are moderators supposed to see the edit options (crop & rotate, edite file info, delete) when they are on an idividual picture page?

No.
Chief Geek at Ranium Systems

stardust

If we have modpack for cpg1.4.19, do we have to edit files manually or can we still just replace the files with your zip?