Forum

Forum - DatingScript

Online dating software

You are not logged in.

#26 2019-05-30 05:27:56

radioact
Staff

Re: Adding dynamic content to your custom pages

same via editing special template file, look at the Vlad post if there are any ideas

Offline

#27 2019-05-30 06:25:24

Boxerke
Member

Re: Adding dynamic content to your custom pages

Vlads post is only saying how to sort profiles? I just want that my users can see some information under the profile picture (the location for example).

Offline

#28 2019-05-30 06:31:34

radioact
Staff

Re: Adding dynamic content to your custom pages

https://www.datingscript.com/forum/view … hp?id=2099
No, there are a lot of references to "template"

Offline

#29 2019-05-30 09:40:56

jackal
Member

Re: Adding dynamic content to your custom pages

Boxerke wrote:

Also, is it possible to show this in list view? With other profile information like age, location details, and so on...

Yes, list view (detail view) has been requested many times.

Offline

#30 2019-06-06 11:19:05

radioact
Staff

Re: Adding dynamic content to your custom pages

https://yadi.sk/d/Fm3fJj5qSgDBvg
Guys it's a template for list view. Unpack it and place into your template folder.
Use this in call like a ,template='users_list' should be fine.

Offline

#31 2019-06-11 07:12:19

champagnero
Member

Re: Adding dynamic content to your custom pages

Thanks for this. Really simple.

But how can we add pagination here???

Offline

#32 2019-06-11 07:31:02

radioact
Staff

Re: Adding dynamic content to your custom pages

Good question. Not now. Can be added offset in the future.

Offline

#33 2019-06-11 09:29:56

jackal
Member

Re: Adding dynamic content to your custom pages

radioact wrote:

https://yadi.sk/d/Fm3fJj5qSgDBvg
Guys it's a template for list view. Unpack it and place into your template folder.
Use this in call like a ,template='users_list' should be fine.

Using user-types or user-groups you get errors

<?=users_helper::getUsers(array('join_columns' => array('`u`.`picture_id`!=0', '`u`.`picture_active`=1', '(`u`.`type_id`=2 or `u`.`type_id`=3)'), 'limit' => 2, 'profiles' => true, 'template' => 'users_list'))?>
<?=users_helper::getUsers(array('join_columns' => array('`u`.`picture_id`!=0', '`u`.`picture_active`=1', '(`u`.`group_id`=2 or `u`.`group_id`=3)'), 'limit' => 2, 'profiles' => true, 'template' => 'users_list'))?>

A PHP error was encountered
Message:
Undefined index: type_id
Location:
/home/xxxxx/public_html/templates/weddingtime/users_list.php on line 5
Trace:
#1 /home/xxxxx/public_html/templates/weddingtime/users_list.php(5): {closure}(8, 'Undefined index...', '/home/xxxxx/p...', 5, Array)
#2 /home/xxxxx/public_html/system/core/codebreeder/view.php(0): unknown()
#3 /home/xxxxx/public_html/application/core/view.php(643): CodeBreeder_View::load('../../templates...', Array, 1, 'users_list')
#4 /home/xxxxx/public_html/application/helpers/users/users.php(153): View::load('../../templates...', Array, 1)
#5 /home/xxxxx/public_html/templates/weddingtime/latest_visitors.php(5): Users_Helper::getUsers(Array)
#6 /home/xxxxx/public_html/system/core/codebreeder/view.php(0): unknown()
#7 /home/xxxxx/public_html/application/core/view.php(647): CodeBreeder_View::load('../../templates...', Array, false, 'latest_visitors')
#8 /home/xxxxx/public_html/application/controllers/pages.php(155): View::load('../../templates...')
#9 /home/xxxxx/public_html/system/core/codebreeder/codebreeder.php(0): Pages_Controller->index()
#10 /home/xxxxx/public_html/system/core/codebreeder/codebreeder.php(0): CodeBreeder_Core::execute()
#11 /home/xxxxx/public_html/index.php(98): CodeBreeder_Core::initialize(Array)
#12 {main}

Off topic: I mention this before, why not add user-type to the DS Demo site? Many times I want to double check stuff with the demo site but I can't because it does not include user-types.

Offline

#34 2019-06-11 09:44:23

radioact
Staff

Re: Adding dynamic content to your custom pages

You can't use OR here, you should use only one type_id.

Offline

#35 2019-06-11 10:30:05

jackal
Member

Re: Adding dynamic content to your custom pages

radioact wrote:

You can't use OR here, you should use only one type_id.

Do you mean I can't use OR with the users_list file only? Because I have been using OR for years and it has always worked great and it still is. OR was suggested to me by Vlad if more than 1 user group exist.

Offline

#36 2019-06-12 13:49:09

radioact
Staff

Re: Adding dynamic content to your custom pages

Groups are ok but system can't display more than one type_id (profile type) in Users helper call.

Offline

#37 2019-06-12 15:07:32

jackal
Member

Re: Adding dynamic content to your custom pages

It's strange the way type_id works and does not work.

1: WORKS GOOD:  Able to display more than one type_id like this

<?=users_helper::getUsers(array('join_columns' => array('`u`.`picture_id`!=0', '`u`.`picture_active`=1', '(`u`.`type_id`=1 or `u`.`type_id`=2)'), 'limit' => 2, 'profiles' => true, 'template' => 'users_list'))?>

2: DOES NOT WORK:  NOT able to display more than one type (Show users from the same country/state)

<? if ( is_array(session::item('data_location')) && session::item('data_location') && is_array(session::item('data_location_state')) && session::item('data_location_state') ): ?>
	<?=users_helper::getUsers(array('join_columns' => array('`u`.`picture_id`!=0', '`u`.`picture_active`=1', '`p`.`data_location`=' . key(session::item('data_location')), '`p`.`data_location_state`=' . key(session::item('data_location_state'))), 'limit' => 10, 'profiles' => true, 'type_id' => 1))?>
<? endif; ?>

3: DOES NOT WORK:  NOT able to display more than one type (Show users from the same country/state)

<? if ( is_array(session::item('data_location')) && session::item('data_location') && is_array(session::item('data_location_state')) && session::item('data_location_state') ): ?>
	<?=users_helper::getUsers(array('join_columns' => array(, '(`u`.`type_id`=1 or `u`.`type_id`=2)', '`u`.`picture_id`!=0', '`u`.`picture_active`=1', '`p`.`data_location`=' . key(session::item('data_location')), '`p`.`data_location_state`=' . key(session::item('data_location_state'))), 'limit' => 10, 'profiles' => true))?>
<? endif; ?>

I was trying the new user_list file with the code that already works 1.

But thanks for the reply.

Offline

#38 2019-06-12 15:15:18

Boxerke
Member

Re: Adding dynamic content to your custom pages

Other question is there a possibility to shown the users by distance? The nearest first for example?

Offline

Board footer