Forum

Forum - DatingScript

Online dating software

You are not logged in.

#1 2019-03-15 18:11:07

lonelywolf
Member

profile field only for woman

Good day!
Is it possible for a certain user profile field to show only for women?

Offline

#2 2019-03-15 18:22:14

e7lew
Member

Re: profile field only for woman

yes, I did that only women see the hidden field from a regular group
so, by default, it's hidden from guests and regular users
when you create ex. skype field you can choose which user group has permission to see that field

Last edited by e7lew (2019-03-15 18:24:21)

Offline

#3 2019-03-15 18:39:03

lonelywolf
Member

Re: profile field only for woman

We are about the same fields?

Users - User types - Edit type - Members - Profile questions - New field ?

But I do not see such an opportunity. You probably modified the code?
I managed to achieve this, but only by adding a new type of users, and assigning it to all women, during registration. However, I am not sure that this is the right way.

Offline

#4 2019-03-15 18:55:10

e7lew
Member

Re: profile field only for woman

yes its modified  code

p_1169tryxp1.png

Offline

#5 2019-03-15 19:59:44

lonelywolf
Member

Re: profile field only for woman

Can you tell me which file to edit the code in? The code itself, I understand how it should look. But I can not find where to edit the code.

Offline

#6 2019-03-16 03:22:27

e7lew
Member

Re: profile field only for woman

Files:
public_html/application/views/system/elements/field/grid.php
public_html/application/views/system/elements/field/edit.php
/public_html/application/controllers/cp/system/fields/system.php

Offline

#7 2019-03-16 05:43:54

lonelywolf
Member

Re: profile field only for woman

Thank you very much!

Offline

#8 2019-03-20 07:12:20

lonelywolf
Member

Re: profile field only for woman

Good day!
I added a field mypaypal that should be available only to groups of women.
I managed to hide this field for all user groups, except for those I need, on the user profile page and on the profile editing page.

<? case 'textarea': ?>
	    <? if (  $field['keyword'] != 'mypaypal' ): ?>

		<? if ( isset($field['config']['wysiwyg']) && $field['config']['wysiwyg'] ): view::enableWYSIWYG(); endif; ?>

		<?=form_helper::textarea($name, form_helper::setValue($name, ( isset($value[$name]) ? $value[$name] : '' )), array(
			'class' => 'textarea '.( isset($field['class']) && $field['class'] ? $field['class'] : 'input-height-md' ).( isset($field['config']['wysiwyg']) && $field['config']['wysiwyg'] ? ' wysiwyg' . ( isset($field['config']['html']) && $field['config']['html'] ? ' html-' . $field['config']['html'] : '' ) : '' ),
			'data-images-embed-disable' => isset($field['config']['images_embed_disable']) && $field['config']['images_embed_disable'] ? 1 : 0,
			'data-images-upload-disable' => isset($field['config']['images_upload_disable']) && $field['config']['images_upload_disable'] || !config::item('plugins', 'core', 'pictures') ? 1 : 0,
			'placeholder' => ( isset($field['placeholder']) && $field['placeholder'] ? $field['placeholder'] : '' ),
			'id' => $id,
			'data-parent-id' => isset($extra['parent_id']) ? $extra['parent_id'] : '',
			'data-pictures-url' => isset($extra['pictures_url']) ? $extra['pictures_url'] : '',
		)) ?>
		<? else: ?>
		<? if (session::item('group_id') == 2): ?>
		<?=form_helper::textarea($name, form_helper::setValue($name, ( isset($value[$name]) ? $value[$name] : '' )), array(
			'class' => 'textarea '.( isset($field['class']) && $field['class'] ? $field['class'] : 'input-height-md' ).( isset($field['config']['wysiwyg']) && $field['config']['wysiwyg'] ? ' wysiwyg' . ( isset($field['config']['html']) && $field['config']['html'] ? ' html-' . $field['config']['html'] : '' ) : '' ),
			'data-images-embed-disable' => isset($field['config']['images_embed_disable']) && $field['config']['images_embed_disable'] ? 1 : 0,
			'data-images-upload-disable' => isset($field['config']['images_upload_disable']) && $field['config']['images_upload_disable'] || !config::item('plugins', 'core', 'pictures') ? 1 : 0,
			'placeholder' => ( isset($field['placeholder']) && $field['placeholder'] ? $field['placeholder'] : '' ),
			'id' => $id,
			'data-parent-id' => isset($extra['parent_id']) ? $extra['parent_id'] : '',
			'data-pictures-url' => isset($extra['pictures_url']) ? $extra['pictures_url'] : '',
		)) ?>
           	<? endif; ?>
			<? endif; ?>
		<? break; ?>

But I can not hide the label Paypal for this field. It is shown to all. And I can not find the file that is responsible for the output of this label.
The logic tells me that this element should be in the same file:
public_html / application / views / system / elements / field / edit.php
But it seems that it is not?

Offline

#9 2019-03-25 18:04:53

lonelywolf
Member

Re: profile field only for woman

OK. I found the solution myself. If someone needs something to do something like that, I tell you how.
It turned out that I was trying to realize my plan simply by editing the wrong file. In fact, this file does not need to be affected at all, and you need to edit the file:
/ application / views / system / elements / edit.php
We create in the admin panel a new text field that needs to be displayed, only for users from groups with id=2 and id=3. My field has a keyword mypaypal
Open the file
/ application / views / system / elements / edit.php
Find:

<? else: if ( $field['type'] == 'select' && ( !isset($select) || $select ) ) $field['select'] = true; ?>

	<div class="control" id="input_row_<?=$type?>_<?=( isset($field['system']) ? 'data_' : '' )?><?=$field['keyword']?>">

		<label for="input_edit_<?=$type?>_<?=( isset($field['system']) ? 'data_' : '' )?><?=$field['keyword']?>">
			<?=(isset($field['name']) ? $field['name'] : '')?> <? if ( isset($field['required']) && $field['required'] ): ?><span class="required">*</span><? endif; ?>
		</label>

		<div class="field">

			<? view::load('system/elements/field/edit', array(
				'prefix' => $type,
				'field' => $field,
				'value' => isset($value) ? $value : '',
				'extra' => isset($extra) ? $extra : array(),
			)) ?>

		</div>

	</div>

<? endif; ?>

replace with

<? else: if ( $field['type'] == 'select' && ( !isset($select) || $select ) ) $field['select'] = true; ?>

	<div class="control" id="input_row_<?=$type?>_<?=( isset($field['system']) ? 'data_' : '' )?><?=$field['keyword']?>">
         <? if (  $field['keyword'] != 'mypaypal' ): ?>
		<label for="input_edit_<?=$type?>_<?=( isset($field['system']) ? 'data_' : '' )?><?=$field['keyword']?>">
			<?=(isset($field['name']) ? $field['name'] : '')?> <? if ( isset($field['required']) && $field['required'] ): ?><span class="required">*</span><? endif; ?>
		</label>
		<? else: ?>
	    <? if (session::item('group_id') == 2 || session::item('group_id') == 3): ?>
	    <label for="input_edit_<?=$type?>_<?=( isset($field['system']) ? 'data_' : '' )?><?=$field['keyword']?>">
			<?=(isset($field['name']) ? $field['name'] : '')?> <? if ( isset($field['required']) && $field['required'] ): ?><span class="required">*</span><? endif; ?>
		</label>
		 <? else: ?>
	     <? endif; ?>
	     <? endif; ?>

         <? if (  $field['keyword'] != 'mypaypal' ): ?>
		<div class="field">

			<? view::load('system/elements/field/edit', array(
				'prefix' => $type,
				'field' => $field,
				'value' => isset($value) ? $value : '',
				'extra' => isset($extra) ? $extra : array(),
			)) ?>

		</div>
		<? else: ?>
	    <? if (session::item('group_id') == 2 || session::item('group_id') == 3): ?>
        <div class="field">

			<? view::load('system/elements/field/edit', array(
				'prefix' => $type,
				'field' => $field,
				'value' => isset($value) ? $value : '',
				'extra' => isset($extra) ? $extra : array(),
			)) ?>

		</div>
		<? else: ?>
	     <? endif; ?>
	     <? endif; ?>

	</div>

<? endif; ?>

We save. That's all. Now the field mypaypal will be shown only in the profile of users from groups with id 2 and 3

Last edited by lonelywolf (2019-03-25 18:09:19)

Offline

#10 2019-03-26 11:50:02

e7lew
Member

Re: profile field only for woman

good but
This code is incomplete
How will visitors know that there is a hidden code?
Or how will other groups of members know there is a hidden field?
Where is the hidden message next to the field?
In this case, the hidden field becomes useless

The trick is to make visitors register and pay
This is the idea of hiding the field

Offline

#11 2019-03-26 17:04:59

lonelywolf
Member

Re: profile field only for woman

Not quite right. In my case, I just needed to make a field in the user profile that would be available only to women. User groups with id 2 and 3 are groups in which there are only women. Accordingly, a woman, editing a profile, sees one field more than a man. And when viewing a profile, respectively, this field is displayed only for women. And only those who have filled it. I achieved my goal.

Offline

#12 2019-03-28 10:19:23

littlebit
Member

Re: profile field only for woman

Any suggestions how to add code for displaying "Hidden, please upgrade" with upgradelink to this example ?

Offline

#13 2019-05-04 08:20:07

e7lew
Member

Re: profile field only for woman

I can give you modified files for $50
I paid $60 for this modification
The great feature is that you can specify which group can or can not see the field from the control panel

p_1219r4sa01.png

Now you can create any field in your mind
Facebook WhatsApp Skyby etc

Last edited by e7lew (2019-05-04 08:25:41)

Offline

#14 2019-05-05 23:39:36

samirosanna
Member

Re: profile field only for woman

and a good code will help a lot, but a pity that a fee

Offline

#15 2019-05-06 07:14:54

rdog
Member

Re: profile field only for woman

samirosanna wrote:

and a good code will help a lot, but a pity that a fee

It does make it a little awkward since it's in the Tutorial and guide section, maybe there should be a separate section, I think the Facebook page would be better, but I don't like Facebook , rather use twitter, seriously thinking about starting a twitter page just for this type of thing.

Last edited by rdog (2019-05-06 07:15:29)

Offline

#16 2019-05-06 12:18:51

e7lew
Member

Re: profile field only for woman

If you want a successful site you have to pay a lot of money
I have beaten many of my competitors and I have become one of the top  ranked sites in Asian dating because of the money spent for this purpose
And after spending this money there is money return? Yeah
I got paid more than what I paid
p_1221rk6ve1.png

Last edited by e7lew (2019-05-06 12:20:38)

Offline

#17 2019-05-06 22:34:16

rdog
Member

Re: profile field only for woman

So you're going to sell the modify files or not, and how would the transaction take place.

Last edited by rdog (2019-05-06 22:35:02)

Offline

#18 2019-05-07 01:41:33

matrimo
Member

Re: profile field only for woman

A forum section where DS webmasters could share & sell their customization related to DS would be welcome.
Need ideas? You can inspire from this customization list https://www.matrimo.com/datingscript

Offline

#19 2019-05-07 07:08:38

samirosanna
Member

Re: profile field only for woman

- I have never seen a penny from my site, in practice no user has ever purchased a thing from my site, he earns from advertising.
too much this forum has become a payment and very different from helping each other

we have to ask for this function as in the forum in (Feature requests) and not going to pay them


this will greatly help datingscript developers make people who are going to pay for the payment of 40 dollars for 6 months because in practice new features = people pay for the download when the new datinscript update is released and with the update will also be the new features, this will help us and the developers will make new users who will pay for the download of datingscript downloads and increase the new sales of datingscript

I hope I explained everything, I used google translator and we hope that he translated well from Italian to English

Last edited by samirosanna (2019-05-07 08:06:30)

Offline

#20 2019-05-07 13:58:05

rdog
Member

Re: profile field only for woman

e7lew wrote:

I have not said the code for sale
But one of the members asked me and the answer was that the code is not free
It cost me $ 60
Who wants to get the code for $ 50
Send me to ***

You may want to setup a way to do the transaction, would prefer a digital download, how do you take payments, I'm not going to send money to a email address, you need to setup a website if you want to sell stuff. or you can just let us know who did the coding for you so we can hire them directly, or maybe I should just hire my last developer again from Fiverr

Offline

#21 2019-05-07 19:32:49

e7lew
Member

Re: profile field only for woman

Do you think I'll steal $50? lol
By sending the amount you will receive a compressed file of the modified files you must replace or compare the code
Who is interested sends on the PayPal ( *** account and will send him modified files

btw matrimo sell same code you can ask him
good luck

Offline

#22 2019-05-08 06:45:47

rdog
Member

Re: profile field only for woman

e7lew wrote:

Do you think I'll steal $50? lol
By sending the amount you will receive a compressed file of the modified files you must replace or compare the code
Who is interested sends on the PayPal ( *** account and will send him modified files

btw matrimo sell same code you can ask him
good luck

I just don't do transactions that way that is why I asked about digital downloads, you get the link to download immediately after the purchase,  if you would of just gave a link when I first asked about it no issues. maybe you should set it up in Pay pal that way instead of just sending money. that way you would supply a invoice and you know what your paying for upfront.

Last edited by rdog (2019-05-08 07:27:51)

Offline

#23 2019-05-08 07:14:52

rdog
Member

Re: profile field only for woman

matrimo wrote:

A forum section where DS webmasters could share & sell their customization related to DS would be welcome.
Need ideas? You can inspire from this customization list https://www.matrimo.com/datingscript

I wanted to purchase some of your stuff awhile back, and we sent emails back and forth about it, but since you didn't have a web page or store where I could purchase and download the items purchase I held off. you never supplied me with a way to make a payment.

Offline

#24 2019-06-06 22:20:57

littlebit
Member

Re: profile field only for woman

e7lew wrote:

Send me to ***

Result:  Address not found
Your message wasn't delivered to *** because the address couldn't be found, or is unable to receive mail.

Please advice !

Offline

#25 2019-06-06 23:41:23

radioact
Staff

Re: profile field only for woman

Guys, this forum is not for advertising your own paid services as we can not guaranty of code modifications done by others.
We may add the section in future.
And one practice advice.

OK. I found the solution myself. If someone needs something to do something like that, I tell you how.
It turned out that I was trying to realize my plan simply by editing the wrong file. In fact, this file does not need to be affected at all, and you need to edit the file:
/ application / views / system / elements / edit.php
We create in the admin panel a new text field that needs to be displayed, only for users from groups with id=2 and id=3. My field has a keyword mypaypal
Open the file
/ application / views / system / elements / edit.php

whenever you want to edit files under /application/views/*
just copy them into your template folder keeping folder structure and you will be fine and able to do future official upgrades without issues.
/ application / views / system / elements / edit.php
should be copied to your template folder (in this case "breezy")
/templates/breezy / system / elements / edit.php
In other words try to avoid modifying files under /application/ folder.

Best regards,
Ramil

Offline

Board footer