[SOLVED] Custom image field

7 years 2 months ago - 7 years 2 months ago #264593 by gtrennert
[SOLVED] Custom image field was created by gtrennert
Hello

I have some questions on a custom cb field I created on a J3.4.1, cb2.0.8, cbsubs latests nightly system :

I created a new field of type image cb_animalimage with following setting :
Allow Upload NO
Allow Gallery NO
The value of the field is updated with sql actions when the plan is activated

So the user registers and is approoved.
I have a look in phpmyadmin and I see that the value is correctly filled up : _UE_DRAGON.jpg
When I look at the backend user administration I can't find the field. It should be in Contact Info but there is no trace of it ! Why is this so ?
The field is setup to show up in user profil but it shows me the nophoto_n.png image ! as if the field was not correctly filled
Could you give me some hints ?

As speaking of this image type field : I saw in mysql that there was created a second field named cb_animalimageapproved ! In my use case I do not need any workflow on this but as in the future perhaps I will use some, can you tell me where I can read more about this ? I did not see any mention of workflow fonctionnality on custom fields - and I really would have liked for instance make workflow for a custom text cb field.

Please Log in to join the conversation.

7 years 2 months ago #264608 by nant
Replied by nant on topic Custom image field

gtrennert wrote: Hello

I have some questions on a custom cb field I created on a J3.4.1, cb2.0.8, cbsubs latests nightly system :

I created a new field of type image cb_animalimage with following setting :
Allow Upload NO
Allow Gallery NO
The value of the field is updated with sql actions when the plan is activated

So the user registers and is approoved.
I have a look in phpmyadmin and I see that the value is correctly filled up : _UE_DRAGON.jpg
When I look at the backend user administration I can't find the field. It should be in Contact Info but there is no trace of it ! Why is this so ?
The field is setup to show up in user profil but it shows me the nophoto_n.png image ! as if the field was not correctly filled
Could you give me some hints ?

As speaking of this image type field : I saw in mysql that there was created a second field named cb_animalimageapproved ! In my use case I do not need any workflow on this but as in the future perhaps I will use some, can you tell me where I can read more about this ? I did not see any mention of workflow fonctionnality on custom fields - and I really would have liked for instance make workflow for a custom text cb field.


Not sure exactly what you are trying to do.
If you are trying to show a specific badge to all subscribers of a plan then you should look into the CBSubs plans image integration plugin (see your CBSubs documentation).

This is what we use to display the Developer badge on your profile page.

If you have something else in mind then you need to make sure that the image file (_UE_DRAGON.jpg) exists in your Joomla -> images -> comprofiler folder (and also the thumbnail file tn_UE_DRAGON.jpg).

Also please note that you cannot use language replacements in filenames so the _UE_DRAGON will not translate (if you are thinking it will).

Please Log in to join the conversation.

7 years 2 months ago #264672 by gtrennert
Replied by gtrennert on topic Custom image field
No its not a plan specific badge its related to custom cb fields.

_UE_DRAGON.jpg exits in the folder

I understand that there is no language repladement - this was not my intention - it was only i must say it by laziness :) - do you think that this could explain the problem ?

Before I began to use cbsubs and the sqlactions some days ago, I used my sql fields to do the same job and it worked fine - so all the old users I registered on the system before cbsubs work fine - some have the same value in cb_animalimage meaning _UE_DRAGON.jpg and this image shows up in the frontend user profile
So as I said as I can see it on database level the sql action of cbsubs does the job because I find the right value in the custome field after the plan activation

I created a thumbnail file tn_UE_DRAGON.jpg as you suggested but this did not change anything

As for my question about the backend side you did not answer : what could be the reason that the cb_animalimage does not show up on backend : Community Builder: User Management -> User -> Contact Info (nor in any other tab)

Please Log in to join the conversation.

7 years 2 months ago #264684 by krileon
Replied by krileon on topic Custom image field
You need 2 versions of your image. 1 for thumbnail and 1 for fullsize. They should be named as follows for example.

my_image.jpg
tnmy_image.jpg

The "tn" prefixed one is the thumbnail image. Not sure why you need this though as it'd seam better to just use CBSubs Plans Image and just assign the image to that plan.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

7 years 2 months ago #264690 by gtrennert
Replied by gtrennert on topic Custom image field
I just made some new registration tests - and I have found some explications :
To make my tests I had to delete users so I can redo the registration process
But I was not aware of the fact that when deleting the user, the image _UE_DRAGON.jpg would be deleted

The image value is calculated by sql related to the birthday of the user
Do you see any way how I can show such an image on the userprofile without loosing it when I have to delete a user ?

Please Log in to join the conversation.

7 years 2 months ago #264691 by gtrennert
Replied by gtrennert on topic Custom image field

krileon wrote: ... Not sure why you need this though as it'd seam better to just use CBSubs Plans Image and just assign the image to that plan.


The image is NOT related to a plan but to the birthday of the user

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.191 seconds

Facebook Twitter LinkedIn