PDA

View Full Version : How can I display the logotipo in the place of the seller



Leandro Figueiredo
October 29, 2012, 06:25 PM
Hi,

I do not work with photos of sellers.
How can I display the logotipo in the place of the seller's photo?

207

Vladimir
October 30, 2012, 05:05 AM
Hello,

You should replace the default account logo. (templates/your_template/img/no-account.png)

Viktor
October 30, 2012, 05:12 AM
Hello Leandro Figueiredo,

Users can add their photos or logos on My profile page.
Check on image.

Petrache Nicolae
October 30, 2012, 05:11 PM
Hello Leandro Figueiredo,

Users can add their photos or logos on My profile page.
Check on image.

Hello Viktor. I think he wants the same thing i wanted and is not posible for now (except customisation). If a user add his image logo when he create the account, we should see that image. not many will go into their account and see that they cand add from there the image (even the text does not have a hint to say "You can add your avatar from this button"

Leandro Figueiredo
October 31, 2012, 12:43 AM
Petrache,

The idea is this.

Viktor
October 31, 2012, 05:12 AM
Hello Leandro Figueiredo,

Ok I understand it and see below my description about it:

At first create field in Admin Panel >> Account Fields
see attach image (add-new-field.jpg)

Then you should build this field for registration form for account types (see open-building-page.jpg then add-field-in-reg-form.jpg)

You can see this field in registration pag eon step 2 already (see reg-step-2.jpg )


Then you can do some changes in the code:

Open ftp:includes>>classes>>rlAccount.class.php file and find method registration and code at line ~ 451:



case 'image':

$file_name = 'account_' . $account_id . '_' . $key . '_' . time();
$resize_type = $fields[$poss]['Default'];
$resolution = strtoupper($resize_type) == 'C' ? explode('|', $fields[$poss]['Values']) : $fields[$poss]['Values'];

$file_name = $this -> rlActions -> upload( $key, $file_name, $resize_type, $resolution, false, false );
$data2['fields'][$key] = $file_name;

break;


and change to:


case 'image':

$file_name = 'account_' . $account_id . '_' . $key . '_' . time();
$resize_type = $fields[$poss]['Default'];
$resolution = strtoupper($resize_type) == 'C' ? explode('|', $fields[$poss]['Values']) : $fields[$poss]['Values'];

$file_name = $this -> rlActions -> upload( $key, $file_name, $resize_type, $resolution, false, false );
$data2['fields'][$key] = $file_name;
if($key == 'profile_photo')
{
$data2['fields']['Photo'] = $file_name;
}
break;


Then open: ftp:templates>>your_template>>tpl>>blocks>>profile_account.tpl
and before <tr> tag add condition at line ~6:


{if $field.Key != 'profile_photo'}
and end the condition at end of file before {/foreach} tag at line ~194:


{/if}

Petrache Nicolae
October 31, 2012, 07:48 AM
Hello Leandro Figueiredo,

Ok I understand it and see below my description about it:

At first create field in Admin Panel >> Account Fields
see attach image (add-new-field.jpg)

Then you should build this field for registration form for account types (see open-building-page.jpg then add-field-in-reg-form.jpg)

You can see this field in registration pag eon step 2 already (see reg-step-2.jpg )


Then you can do some changes in the code:

Open ftp:includes>>classes>>rlAccount.class.php file and find method registration and code at line ~ 451:



case 'image':

$file_name = 'account_' . $account_id . '_' . $key . '_' . time();
$resize_type = $fields[$poss]['Default'];
$resolution = strtoupper($resize_type) == 'C' ? explode('|', $fields[$poss]['Values']) : $fields[$poss]['Values'];

$file_name = $this -> rlActions -> upload( $key, $file_name, $resize_type, $resolution, false, false );
$data2['fields'][$key] = $file_name;

break;


and change to:


case 'image':

$file_name = 'account_' . $account_id . '_' . $key . '_' . time();
$resize_type = $fields[$poss]['Default'];
$resolution = strtoupper($resize_type) == 'C' ? explode('|', $fields[$poss]['Values']) : $fields[$poss]['Values'];

$file_name = $this -> rlActions -> upload( $key, $file_name, $resize_type, $resolution, false, false );
$data2['fields'][$key] = $file_name;
if($key == 'profile_photo')
{
$data2['fields']['Photo'] = $file_name;
}
break;


Then open: ftp:templates>>your_template>>tpl>>blocks>>profile_account.tpl
and before <tr> tag add condition at line ~6:


{if $field.Key != 'profile_photo'}
and end the condition at end of file before {/foreach} tag at line ~194:


{/if}

hello Viktor. Thanks for the instructions. Do you have by chance bigger images? they are so small that we can't understand the details?

Viktor
October 31, 2012, 08:26 AM
Hello Petrache Nicolae,

Yes you can change size for profile photo. Go to ftp:classes>>rlAccounts.class.php find method with name: editProfile and code:


if ( $thumbnail_name = $this -> rlActions -> upload('thumbnail', $thumbnail_name, 'C', array(100, 100), false, false) )

change parameters 100 it's width and second 100 it's height.

IF you want change width and height for logo on registration page go to Admin panel >> Account fields and edit new created field 'profile_photo'

Petrache Nicolae
October 31, 2012, 08:38 AM
Hello Petrache Nicolae,

Yes you can change size for profile photo. Go to ftp:classes>>rlAccounts.class.php find method with name: editProfile and code:


if ( $thumbnail_name = $this -> rlActions -> upload('thumbnail', $thumbnail_name, 'C', array(100, 100), false, false) )

change parameters 100 it's width and second 100 it's height.

IF you want change width and height for logo on registration page go to Admin panel >> Account fields and edit new created field 'profile_photo'

no no....i wanted bigger images for the ones you posted here so we can see what to do. they are small and we can't see what to do

Viktor
October 31, 2012, 09:50 AM
Oh sorry yes yes images so small.

Please check this links:

http://flynax.com/forum/images/attach/flynax/2012-10-31/add-field-in-reg-form.gif
http://flynax.com/forum/images/attach/flynax/2012-10-31/add-new-field.gif
http://flynax.com/forum/images/attach/flynax/2012-10-31/open-building-page.gif
http://flynax.com/forum/images/attach/flynax/2012-10-31/reg-step-2.gif

Petrache Nicolae
October 31, 2012, 09:53 AM
great. thank you

Leandro Figueiredo
October 31, 2012, 11:45 AM
Thank you Viktor!

Leandro Figueiredo
October 31, 2012, 10:37 PM
Thanks Viktor.
Perfect solution.

Petrache Nicolae
November 1, 2012, 06:02 AM
yes, i can confirm is working perfect.

Andreas_M
November 9, 2012, 09:03 PM
Hello Viktor,


I tried it two times, but it had absolutely no change/effect.

The same with the following changed code:
if ( $thumbnail_name = $this -> rlActions -> upload('thumbnail', $thumbnail_name, 'C', array(200, auto), false, false) )
I am a little bit confused at the moment, how can I replace the account-photo with an account field like "logo" ?

Nevertheless, I followed your instructions, but nothing changed.

Can you help me a little?


Best regards
Andreas

Petrache Nicolae
November 10, 2012, 09:31 AM
Hello Viktor,


I tried it two times, but it had absolutely no change/effect.

The same with the following changed code:
if ( $thumbnail_name = $this -> rlActions -> upload('thumbnail', $thumbnail_name, 'C', array(200, auto), false, false) )
I am a little bit confused at the moment, how can I replace the account-photo with an account field like "logo" ?

Nevertheless, I followed your instructions, but nothing changed.

Can you help me a little?


Best regards
Andreas

folow the instructions from the begining of the thread..the ones with the big changes like go to file..., replace this... with this.... those are the instructions and you have olso the links with the big images to see exactly. solution does work fine and this should be implemented as default in flynax. logo is pointles since users would think that they can put their image as avatar.

Andreas_M
November 16, 2012, 09:31 PM
Hi!

Thanks for your reply. Now it works, i tried to rename the account field and the code, but I was false.

I found a problem.
Did you tried to change the logo after registration? I did it and I cant change the image. Deleting is possible, but not uploading a new logo. Got system notification, that uploading was successful, but it was not.

Can you also try it please at your site?

Thanks!

Andreas_M
November 17, 2012, 12:50 AM
I had made the code undo and I cant change any profile photo with the regular files. The permission for folder /files/ is 777 so that cant be the problem, but it must be a problem with permissions.


Can anyone help?

Kemoid Wilson
July 28, 2013, 08:01 PM
Great tip thanks a lot but the picture is not maximizing when you click on it. Can I also add a field where users can upload or share a youtube video to their profile when registering?

Thanks in advance.