Forum

Forum - DatingScript

Online dating software

You are not logged in.

#1 2018-02-06 07:33:16

davidoo1986
Member

Timeline action

Hello,
I think it would be better to display an icon on the timeline rather than the avatar of one of the two members when they become friends.
By example :
Screenshot_3.jpg

Instead of :
Screenshot_2.jpg

What do you think ?
And how do that ?

Offline

#2 2018-02-06 11:21:31

jackal
Member

Re: Timeline action

I have it set to display 2 thumbnails when they become friends, instead of just one thumbnail. It gives it a better look. My 2 cents

I'm sure is not the correct way of doing it but it seems to work okay.

application/views/users/timeline/friend.php

Change from this

<div class="article user-friend">

	<div class="action-header">
		<?=__('user_friend_new', 'timeline_actions', array('[name1]' => users_helper::anchor($user1), '[name2]' => users_helper::anchor($user2)))?>
	</div>

</div>

To this

<div class="article user-friend">

	<div class="action-header">
		<?=__('user_friend_new', 'timeline_actions', array('[name1]' => users_helper::anchor($user2), '[name2]' => users_helper::anchor($user1)))?>
	</div>
	
	<div class="target-article media">
		<figure class="image thumbnail users-image">
			
			<? view::load('users/elements/picture', array('user' => $user1)); ?>
		</figure>
	</div>

</div>

Last edited by jackal (2018-02-06 11:22:50)

Offline

#3 2018-02-07 09:18:42

moomoocow
Member

Re: Timeline action

jackal wrote:

I have it set to display 2 thumbnails when they become friends, instead of just one thumbnail. It gives it a better look. My 2 cents

I'm sure is not the correct way of doing it but it seems to work okay.

application/views/users/timeline/friend.php

Change from this

<div class="article user-friend">

	<div class="action-header">
		<?=__('user_friend_new', 'timeline_actions', array('[name1]' => users_helper::anchor($user1), '[name2]' => users_helper::anchor($user2)))?>
	</div>

</div>

To this

<div class="article user-friend">

	<div class="action-header">
		<?=__('user_friend_new', 'timeline_actions', array('[name1]' => users_helper::anchor($user2), '[name2]' => users_helper::anchor($user1)))?>
	</div>
	
	<div class="target-article media">
		<figure class="image thumbnail users-image">
			
			<? view::load('users/elements/picture', array('user' => $user1)); ?>
		</figure>
	</div>

</div>

I think this should be part of the DS files.. smile

Thanks for sharing.. smile

Offline

#4 2018-02-07 11:04:56

Marcio
Member

Re: Timeline action

I like it ! should be a default for others actions as well! Would be better a smaller image, but I have no idea how to do that!

Last edited by Marcio (2018-02-07 11:22:08)

Offline

#5 2018-02-07 11:30:26

Marcio
Member

Re: Timeline action

I tried using bellow and worked! The image is smaller. Now would be nice to do the same for wall comments.

        <figure class="image thumbnail users-image" style = "width:75px">


Marcio wrote:

I like it ! should be a default for others actions as well! Would be better a smaller image, but I have no idea how to do that!

Last edited by Marcio (2018-02-07 11:40:17)

Offline

#6 2018-09-09 06:23:06

rdog
Member

Re: Timeline action

just noticed this, good stuff,

Offline

#7 2018-12-13 13:55:09

jackal
Member

Re: Timeline action

This file no longer available on v1.3.1 does anybody know where it was placed?
application/views/users/timeline/friend.php

Offline

#8 2019-01-06 18:12:26

jackal
Member

Re: Timeline action

Not sure if this is the correct way, but it seems to work.

In application/hooks/users/users

change this
                     

$stream[$itemID][$actionID]['header'] = __('user_friend_new', 'timeline_actions', array(
						'[name1]' => users_helper::anchor(users_helper::isLoggedin() && $item['user_id'] == session::item('user_id') ? $users[$itemID] : $users[$item['user_id']]),
						'[name2]' => users_helper::anchor(users_helper::isLoggedin() && $item['user_id'] == session::item('user_id') ? $users[$item['user_id']] : $users[$itemID])
					));

add this

                     

$stream[$itemID][$actionID]['header'] = __('user_friend_new', 'timeline_actions', array(
						'[name2]' => users_helper::anchor(users_helper::isLoggedin() && $item['user_id'] == session::item('user_id') ? $users[$itemID] : $users[$item['user_id']]),
						'[name1]' => users_helper::anchor(users_helper::isLoggedin() && $item['user_id'] == session::item('user_id') ? $users[$item['user_id']] : $users[$itemID])
					));
					
					$stream[$itemID][$actionID]['html'] = view::load(
						'users/elements/picture',
						array('user' => array_merge($users[$item['user_id']], array('picture_file_suffix' => 't'))),
						true
					);

Offline

#9 2019-01-16 06:10:31

petka11
Member

Re: Timeline action

Many users complained to me that there is such feature,  that is enabled by default..

Example of the problem :
man entering a woman profile sees that she is friends with 8 other man..
Or
woman entering a mans profile after chatting with him and sees that while she were talking to him he friended 3 other girls..

Offline

Board footer