*

Burton

  • ***
  • 128
Admin can not edit Free Members Photos
« on: February 12, 2015, 04:22:57 AM »
Hi Phil,

A few days ago I could manage/edit free member photos,

But when I just tried, when I click on Manage Profile Photos, it only displays a page with" Load the Main Picture with this tool, .... "

No photos are displayed on the page to edit.

But with a Gold member their photos open up to be managed/edited.

Yes I just upgraded a Free member, and after that I could Manage/Edit their photos ???

Ok fixed it!!

I had set Free Membership to:

Number of Profile pictures allowed.  = 3   
Number of Gallery pictures allowed. = 0

and with those setting Admin can not access Gallery to manage/edit photos,

so I changed it to below, and now Admin can access/manage/edit photos.

Number of Profile pictures allowed. = 3   
Number of Gallery pictures allowed. = 3

all is well :)
« Last Edit: February 12, 2015, 04:40:03 AM by Burton »

*

Pharg

  • *****
  • 2,071
  • osDate Version: osDate Evo v1.0
Re: Admin can not edit Free Members Photos
« Reply #1 on: February 12, 2015, 06:01:41 AM »
Hi Burton,

This has been a very long term issue, you will also find the photo's it won't load are the one's that came with the script.

I find new added photo's can be edited, but it's not the best photo editor ever made for this script.
Nobody that I have ever seen has added a new photo editor, maybe someone will try adding a new mod editor for this.

Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

Burton

  • ***
  • 128
Re: Admin can not edit Free Members Photos
« Reply #2 on: February 12, 2015, 06:16:52 AM »
Hi Phil,

Always good to hear from you :)

Yes I am still learning about these little script personality traits :)

*

Burton

  • ***
  • 128
Re: Admin can not edit Free Members Photos
« Reply #3 on: February 12, 2015, 07:25:03 AM »
Hi Phil,

Somewhere in the code it must have if "Number of Gallery pictures allowed. = 0" Admin can not edit Profile Photos.

or something along those lines.

Phil do you have any idea where that code may be?

It would be great to change the code to - if = 0 or greater than 0 then Admin can access/edit profile photos.


*

Pharg

  • *****
  • 2,071
  • osDate Version: osDate Evo v1.0
Re: Admin can not edit Free Members Photos
« Reply #4 on: February 12, 2015, 07:28:35 AM »
Hi Burton,

No idea at all as I also haven't looked at it sorry.

I will have a look later on when I have some spare time.

Try looking at the imageEditor folder.
« Last Edit: February 12, 2015, 07:35:26 AM by Pharg »
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

Burton

  • ***
  • 128
Re: Admin can not edit Free Members Photos
« Reply #5 on: February 12, 2015, 08:29:14 AM »
Hi Phil,

I found this line in /default/admin/userpicgallery.tp

Code: [Select]
{if $smarty.session.expired != 1 and $smarty.session.active == '1' and ( $smarty.session.status == $lang.status_enum.active or $smarty.session.status == 'Active') and $smarty.session.security.uploadpicture == 1  and $smarty.session.security.uploadpicturecnt > 0 and $userid == $smarty.session.UserId}
I am looking at the: .uploadpicturecnt > 0

as that aligns with this from lang_main.php

'uploadpicturecnt'   => 'Number of pictures allowed to upload.',     (if set at 0 then Admin can not Edit Photos)

does my logic make any sense?


      

*

Pharg

  • *****
  • 2,071
  • osDate Version: osDate Evo v1.0
Re: Admin can not edit Free Members Photos
« Reply #6 on: February 12, 2015, 08:55:58 AM »
Hi Phil,

I found this line in /default/admin/userpicgallery.tp

Code: [Select]
{if $smarty.session.expired != 1 and $smarty.session.active == '1' and ( $smarty.session.status == $lang.status_enum.active or $smarty.session.status == 'Active') and $smarty.session.security.uploadpicture == 1  and $smarty.session.security.uploadpicturecnt > 0 and $userid == $smarty.session.UserId}
I am looking at the: .uploadpicturecnt > 0

as that aligns with this from lang_main.php

'uploadpicturecnt'   => 'Number of pictures allowed to upload.',     (if set at 0 then Admin can not Edit Photos)

does my logic make any sense?


      

Hi Burton,

This userpicgallery.tpl is not used by the editor as far as I know, it just shows the photo gallerys
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

Burton

  • ***
  • 128
Re: Admin can not edit Free Members Photos
« Reply #7 on: February 13, 2015, 05:05:08 AM »
Hi Phil,

There are not many php files in the imageEditor folder, and they contain only a small amount of code,

I looked and looked, yet my coding skills are not good enough to find what needs to be changed,

Could you please add  it to your list of things to look at ?

best wishes :)

*

Pharg

  • *****
  • 2,071
  • osDate Version: osDate Evo v1.0
Re: Admin can not edit Free Members Photos
« Reply #8 on: February 13, 2015, 05:13:49 AM »
Hi Phil,

There are not many php files in the imageEditor folder, and they contain only a small amount of code,

I looked and looked, yet my coding skills are not good enough to find what needs to be changed,

Could you please add  it to your list of things to look at ?

best wishes :)

Hi Burton,

Will see what I can do, no promises it will get fixed though.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

Burton

  • ***
  • 128
Re: Admin can not edit Free Members Photos
« Reply #9 on: February 13, 2015, 05:23:02 AM »
Hi Phil,

Thank you :)

*

Pharg

  • *****
  • 2,071
  • osDate Version: osDate Evo v1.0
Re: Admin can not edit Free Members Photos
« Reply #10 on: February 14, 2015, 08:41:30 AM »
Hi Phil,

Thank you :)

Hi Burton,

Just a quick update, I have found it's something to do with the code not working in PHP 5.3 and PHP 5.4

I have added a photo of it working perfect in php 5.2.

Now, I just have to find what part of the code and in which files doesn't like working in the new versions of PHP.

If anyone can help that would be great?
The code that seems to be causing the problem I think is:
Code: [Select]
window.onload = function(){
ImageEditor.init("<? echo($image2edit) ?>");
};

« Last Edit: February 14, 2015, 08:45:53 AM by Pharg »
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

Burton

  • ***
  • 128
Re: Admin can not edit Free Members Photos
« Reply #11 on: February 14, 2015, 09:39:02 AM »
Hi Phil,

Well done finding that the PHP version was behind the problem :)

So good to solve these small problems, as the script works overall so well :)


*

Pharg

  • *****
  • 2,071
  • osDate Version: osDate Evo v1.0
Re: Admin can not edit Free Members Photos
« Reply #12 on: February 14, 2015, 10:05:58 AM »
Hi Phil,

Well done finding that the PHP version was behind the problem :)

So good to solve these small problems, as the script works overall so well :)



Thanks Burton,

By changing back to PHP 5.2 I have found other things work also, need to spend some time debugging I think.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

Burton

  • ***
  • 128
Re: Admin can not edit Free Members Photos
« Reply #13 on: February 14, 2015, 10:32:24 AM »
Hi Phil,

When they make a PHP upgrade do they supply info on what code may need upgrading, or what possible bugs may happen ?
« Last Edit: February 14, 2015, 11:21:49 AM by Burton »

*

Pharg

  • *****
  • 2,071
  • osDate Version: osDate Evo v1.0
Re: Admin can not edit Free Members Photos
« Reply #14 on: February 14, 2015, 08:00:13 PM »
Hi Phil,

When they make a PHP upgrade do they supply info on what code may need upgrading, or what possible bugs may happen ?

Hi Burton,

They do but usually there is a lot of reading to do.
Because this script also uses smarty 2 tags etc, it maybe also be the reason things are playing up.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35