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: Settings to show image location  (Read 10825 times)

0 Members and 1 Guest are viewing this topic.

Visitor

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 55
Settings to show image location
« on: August 12, 2011, 02:10:49 pm »

I can see a lot of time has been spent on image theft, and its very good...

I tryed and gave up the phpBB3 bridge, and perhaps it isnt wahat I wanted anyway..

So here is the problem..

Nobody can register in the album, I set up accounts when people want them. I only set up accounts for a special group of people in my phpBB, and these can have personal albums.

Thats all working fine, they can click edit on there photos, and it shows the url and photo, which they can copy and paste in the phpBB... working 100%

However I set up an account in the album called "Forum" where all other members of my forum can login, and upload photos to an album I set up.. All working 100%

Except, since the group in the album has been set not to alow personal albums, they cannot click the edit on there photos, and therfore cannot get the url and photo location to paste in there posts in phpBB

I have the image overlay switched on, this stops the right click, so would like to keep it that way..

Is there any .php file I can edit, so to include the url under the photo, hidden from guests but available to all registerd members..

Thanks
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Settings to show image location
« Reply #1 on: August 12, 2011, 04:39:45 pm »

Copy the whole function theme_html_picture from themes/sample/theme.php to your theme's theme.php file if it doesn't exist. Then, find
Code: [Select]
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],and replace with
Code: [Select]
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'].(USER_ID ? $CONFIG['ecards_more_pic_target'].$picture_url : ''),
Logged

Visitor

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 55
Re: Settings to show image location
« Reply #2 on: August 12, 2011, 11:06:58 pm »

Thank you, that works very well, complex when im testing out, but working well...

Just one thing, is it possable to add the
Code: [Select]
[img] [/img] wrapped around it, would make my help files so much easier.. Ive tried the header and footer in the code, the footer puts the [/img] at the start of the line, and the header puts the [img] above the photo ?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Settings to show image location
« Reply #3 on: August 13, 2011, 11:31:15 am »

You need to edit
Code: [Select]
(USER_ID ? $CONFIG['ecards_more_pic_target'].$picture_url : '')as this part is responsible for the output. Try to change it to
Code: [Select]
(USER_ID ? '[img]'.$CONFIG['ecards_more_pic_target'].$picture_url.'[/img]' : '')and report if it works as expected.
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Settings to show image location
« Reply #4 on: August 13, 2011, 12:42:38 pm »

One version of the plugin Add a Download Link for the full-size image v1.1 - v1.4 might work, it should have the user level setting available in Config.

http://forum.coppermine-gallery.net/index.php/topic,65849.msg327520.html#msg327520

Visitor

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 55
Re: Re: Settings to show image location
« Reply #5 on: August 13, 2011, 01:05:13 pm »

You need to edit
Code: [Select]
(USER_ID ? $CONFIG['ecards_more_pic_target'].$picture_url : '')as this part is responsible for the output. Try to change it to
Code: [Select]
(USER_ID ? '[img]'.$CONFIG['ecards_more_pic_target'].$picture_url.'[/img]' : '')and report if it works as expected.

Thank you, worked straght away !
Logged

Visitor

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 55
Re: Settings to show image location
« Reply #6 on: January 27, 2012, 01:16:40 pm »

Thanks for the original mod, at the time I made an account for all normal forum mumbers to login. But for some reason I stopped seeing uploads from guests.

I have

1, registerd memebrs Special forum members also)
2, I have guest's (also normal forum members)

problem now is, when a guest uploads a photo, the image location is hidden (good) but this also now means that normal forum members are hidden.

If I turn on album registrations ( i set them up right now for special forum members) is there a way to restrict those members to the guest album, and special forum members I can edit and let them have personal albums


1, guest (any visitor) must upload to guest album
2, special forum members (have personal albums) (ive been registering these people)
3, normal forum members (no personal album) can register, upload to guest album, or a new album "forum guest"

if i alow registration, can i set (no personal album) but later change this if they become "special forum member"

 ::)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Settings to show image location
« Reply #7 on: January 27, 2012, 02:22:52 pm »

How is this related to the original mod?

include the url under the photo, hidden from guests but available to all registerd members
Logged

Visitor

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 55
Re: Settings to show image location
« Reply #8 on: January 27, 2012, 10:35:44 pm »

becuase now i have guest posts made by forum members, but they cannot see the location of the image.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Settings to show image location
« Reply #9 on: January 28, 2012, 12:19:02 am »

So you want to display the link for all users, registered users and guests?
Logged

Visitor

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 55
Re: Settings to show image location
« Reply #10 on: January 30, 2012, 10:48:09 am »

Well I dont see any other way..

I am working on setting up one account for all normal forum members can use... but it may not work out, and so I may need to make the location available to all
Logged

Visitor

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 55
Re: Settings to show image location
« Reply #11 on: January 30, 2012, 11:01:05 am »

Here is the problem

1, guest (no personal album)
2, normal forum members (no personal album) All members login with same username and password)
3, special forum members, these have personal albums, and have own login

This works, and 2 and 3 above can see location of photo

However now there is a problem with the account (2 above), any one of these normal forum members can login and change password or email address.

so without being able to stop this, I have to show location to all
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Settings to show image location
« Reply #12 on: January 30, 2012, 07:05:00 pm »

There's already a thread with a tutorial how to prevent
any one of these normal forum members can login and change password or email address
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Settings to show image location
« Reply #13 on: January 30, 2012, 07:13:24 pm »

It doesn't seem to be available in English, but it's just a simple "find -> replace" task. You can find it here.

Of course you need to adjust
$change_pwd = USER_ID == 2
to your user's ID.
Logged

Visitor

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 55
Re: Settings to show image location
« Reply #14 on: January 31, 2012, 11:08:01 am »

profile.php

Code: [Select]
<button type="submit" class="button" name="change_pass" id="change_pass" value="{$lang_register_php['change_pass']}">{$icon_array['password']}{$lang_register_php['change_pass']}</button>
This ? thats what the info say, and this will remove the change password button, however its for all me included :)
Logged

Visitor

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 55
Re: Settings to show image location
« Reply #15 on: January 31, 2012, 11:14:51 am »

ah missed to "your user's ID". . But problem is, i want to remove it only on one account, not all members, that one account would be used by many to login
Logged

Visitor

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 55
Re: Settings to show image location
« Reply #16 on: January 31, 2012, 11:21:45 am »

Ok, need to let all members change password, except the user ID 201, which would be the username i set up for all standard forum members to use

Code: [Select]
$change_pwd = USER_ID == 2 ? '' : '<button type="submit" class="button" name="change_pass" id="change_pass" value="'.$lang_register_php['change_pass'].'">'.$icon_array['password'].$lang_register_php['change_pass'].'</button>';
    echo <<< EOT
<tr>
    <td colspan="2" align="center" class="tablef">
        <button type="submit" class="button" name="change_profile" id="change_profile" value="{$lang_common['apply_changes']}">{$icon_array['ok']}{$lang_common['apply_changes']}</button>
        &nbsp;
        $change_pwd
    </td>
</tr>
EOT;

So what would I need to show the button to all except user id 201

Code: [Select]
$change_pwd = USER_ID <> 201 ? ?
Logged

Visitor

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 55
Re: Settings to show image location
« Reply #17 on: January 31, 2012, 11:44:36 am »

getting there, now the above shows change password only to ide 201 :)
Logged

Visitor

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 55
Re: Settings to show image location
« Reply #18 on: January 31, 2012, 12:29:08 pm »

Is there a cache, im lost, when i first tried this without chaning id, the button didnt show, but now its showing all the time. Restored backup and started again, same problem button is still showing to me (user id -1) and its set as user 2 (as default mod)

Wanted it to go before adding my id...

why did it stop working
Logged

Visitor

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 55
Re: Settings to show image location
« Reply #19 on: January 31, 2012, 01:46:49 pm »

Ok, I did a ECHO $uid; and it shows my ID as -1

$change_pwd = USER_ID == -1 ? '' :

Wont work

$change_pwd = USER_ID == 10000 ? '' :

wont work

Im loged in as a registerd member testing this (user id 16)

So if I use $change_pwd = USER_ID == 16 ? '' : then I cannot see password, I can see it as admin, so it looks like its working as "I" want, but need to ask another registerd member to login and see if they can see it

Strange it seams to be working opersit to what the code is suppose to do
Logged
Pages: [1] 2   Go Up
 

Page created in 0.027 seconds with 20 queries.