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 ... 6 7 8 9 [10] 11   Go Down

Author Topic: Moderators for Album pictures  (Read 158593 times)

0 Members and 1 Guest are viewing this topic.

Nibbler

  • Guest
Re: Moderators for Album pictures
« Reply #180 on: August 04, 2008, 01:03:03 pm »

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

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Moderators for Album pictures
« Reply #181 on: August 05, 2008, 07:23:19 am »

@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.
Logged
Chief Geek at Ranium Systems

stardust

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: Moderators for Album pictures
« Reply #182 on: August 05, 2008, 07:44:45 am »

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?
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Moderators for Album pictures
« Reply #183 on: August 05, 2008, 07:54:19 am »

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.
Logged
Chief Geek at Ranium Systems

stardust

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: Moderators for Album pictures
« Reply #184 on: August 05, 2008, 11:26:34 am »

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

fangweile

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 103
  • Saranghaeyo ^_^
    • All Koreans - Home of Korean Actors and Actresses
Re: Moderators for Album pictures
« Reply #185 on: August 05, 2008, 01:36:22 pm »

@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 ???
Logged
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희

stardust

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: Moderators for Album pictures
« Reply #186 on: August 06, 2008, 10:14:05 am »

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

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

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

with

Code: [Select]
        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
Logged

fangweile

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 103
  • Saranghaeyo ^_^
    • All Koreans - Home of Korean Actors and Actresses
Re: Moderators for Album pictures
« Reply #187 on: August 07, 2008, 03:39:02 am »

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. ^_^
Logged
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희

fejker

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 5
    • fejker.net
Re: Moderators for Album pictures
« Reply #188 on: November 04, 2008, 11:36:37 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Moderators for Album pictures
« Reply #189 on: November 04, 2008, 11:41:10 pm »

Upgrade first.
Logged

fejker

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 5
    • fejker.net
Re: Moderators for Album pictures
« Reply #190 on: November 05, 2008, 12:13:27 am »

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

fejker

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 5
    • fejker.net
Re: Moderators for Album pictures
« Reply #191 on: November 05, 2008, 11:07:04 pm »

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
Code: [Select]
// 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.
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Moderators for Album pictures
« Reply #192 on: November 06, 2008, 08:01:05 am »

The if statement should be

Code: [Select]
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.
Logged
Chief Geek at Ranium Systems

fejker

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 5
    • fejker.net
Re: Moderators for Album pictures
« Reply #193 on: November 06, 2008, 10:06:44 am »

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

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

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Moderators for Album pictures
« Reply #194 on: November 06, 2008, 10:24:32 am »

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.
Logged
Chief Geek at Ranium Systems

savdre

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Moderators for Album pictures
« Reply #195 on: November 24, 2008, 01:44:37 am »

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

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Moderators for Album pictures
« Reply #196 on: December 02, 2008, 09:04:53 am »

@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.
Logged
Chief Geek at Ranium Systems

savdre

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Moderators for Album pictures
« Reply #197 on: December 14, 2008, 09:14:59 pm »

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
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Moderators for Album pictures
« Reply #198 on: December 15, 2008, 05:54:02 am »

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.
Logged
Chief Geek at Ranium Systems

stardust

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: Moderators for Album pictures
« Reply #199 on: January 22, 2009, 04:49:08 am »

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?
Logged
Pages: 1 ... 6 7 8 9 [10] 11   Go Up
 

Page created in 0.025 seconds with 20 queries.