Profile Views Download 3.4

This component/theme works with latest OSSN version.
Indonesian Arsalan Shah 8 years ago

Allow your users to view the people who visited their profile.

3.4

Tabs missing thanks to Michael for fixing

Comments
Indonesian Arsalan Shah Replied 3 years ago

There is no such a thing that profile views does

German Dominik L Replied 3 years ago

Chrome shows this error:

enter image description here

German Dominik L Replied 3 years ago

The elements on the profile view page are shifted

enter image description here

German Dominik L Replied 3 years ago

get this error:

[25-Apr-2023 08:03:03 UTC] PHP WARNING: 2023-04-25 08:03:03 (UTC): "Undefined variable $title" in file /home/queermeet/public_html/components/ProfileViews/ossn_com.php (line 60)

gb TalkToAi Online Replied 3 years ago

works nicely.

Indonesian Arsalan Shah Replied 4 years ago

Fixed in 3.0

German Michael Zülsdorff Replied 4 years ago

Thanks for your feedback, Melo.

And yes, it makes sense to show the latest visitors first (=descending order)
Thus, instead of reversing the result we better delegate that task to the database query right away... 💡

$looks = ossn_get_relationships(array(
	'from' => ossn_loggedin_user()->guid,
	'type' => __who_view_profile_type__,
	'order_by' => 'relation_id DESC'
));
ma Melo lobo Replied 4 years ago

I propose to add the function array_reverse( ) to show new views first.

instead of $vars['users'] = $users;

put

$vars['users'] = array_reverse($users);

it's my modest contribution :)

ma Melo lobo Replied 4 years ago

now that I applied your script everything works perfectly. in fact it's a small change of script but it requires a great mastery to do it. Thank you Michael Zülsdorff, RESPECT

German Michael Zülsdorff Replied 4 years ago

Oops yes, can confirm that.
Now that this component has been in use for a long time and has thus created countless to/from mix-ups in the database, I think it makes sense to leave them in place and simply reverse the display logic like

$looks = ossn_get_relationships(array(
	'from' => ossn_loggedin_user()->guid,
	'type' => __who_view_profile_type__
));
$count = ossn_get_relationships(array(
	'from' => ossn_loggedin_user()->guid,
	'type' => __who_view_profile_type__,
	'count' => true
));
if ($looks) {
	foreach ($looks as $item) {
		$user = ossn_user_by_guid($item->relation_to);
		if ($user) {
			$users[] = $user;
		}
	}
}

Component

Developer: Arsalan
License ossnv4
Type: Uncategorized
Requires OSSN Version : 6.0
Latest Version: 3.4
Last Updated 2 years ago
Repository Url View Repository