Author Topic: Few fixes and addons  (Read 10158 times)

KHDev

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 509
  • Karma: +43/-2
  • Etano Contributor (Skins & Mods)
    • KH Web Development
Re: Few fixes and addons
« Reply #30 on: September 04, 2015, 03:02:34 PM »
I don't know how to delete the stored WVM data. Does anyone else know?

To delete related WVM data when a users account is deleted open

tools > cron > jobs > 120 > 1delete_members.php

add the following: (example around line 24 should do)

Code: [Select]
$query="DELETE FROM `{$dbtable_prefix}who_viewed_me` WHERE `uid` IN ('".join("','",$all_uids)."') OR `vid` IN ('".join("','",$all_uids)."')";
if (!($res=@mysql_query($query))) {trigger_error(mysql_error(),E_USER_ERROR);}

Then

admin > processors > member_delete_now.php

add the following: (example around line 39 should do)

Code: [Select]
$query="DELETE FROM `{$dbtable_prefix}who_viewed_me` WHERE `uid` IN ('".join("','",$all_uids)."') OR `vid` IN ('".join("','",$all_uids)."')";
if (!($res=@mysql_query($query))) {trigger_error(mysql_error(),E_USER_ERROR);}

Marble

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 1004
  • Karma: +56/-7
Re: Few fixes and addons
« Reply #31 on: September 04, 2015, 05:25:42 PM »
Great Thanks KHDev!

Now there's just one last problem that remains on my end. I get everything to show up properly in profile_views.php except for when I click on the See All button next to the Last Profiles Viewed, I get a message that says
Quote
No results found that match your search criteria. Go Back and broaden your criteria selections and try again. 

Do you have an idea about how to solve this?
If you see that I'm logged in forever... it just means I turned the page on my browser and forgot to logout.

KHDev

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 509
  • Karma: +43/-2
  • Etano Contributor (Skins & Mods)
    • KH Web Development
Re: Few fixes and addons
« Reply #32 on: September 05, 2015, 06:53:02 AM »
Just tested it and the links seem to work for me.

I'm guessing you had to manually install it? If so possibly somethings not correct.. I did an install on a fresh etano install so i was able to use the installer.

Marble

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 1004
  • Karma: +56/-7
Re: Few fixes and addons
« Reply #33 on: September 07, 2015, 01:59:35 AM »
Just tested it and the links seem to work for me.

I'm guessing you had to manually install it? If so possibly somethings not correct.. I did an install on a fresh etano install so i was able to use the installer.

OK, I did some testing as well and found the source of the problem.
In search.php I have this code at line 54
Code: [Select]
//$where=' a.`status`='.STAT_APPROVED.' AND a.`del`=0';
/**************** remove self from who's online results 8-15****************/
if( isset($_SESSION[_LICENSE_KEY_]['user']['user_id'])){
$where=' a.`status`='.STAT_APPROVED.' AND a.`fk_user_id`<>'.$_SESSION[_LICENSE_KEY_]['user']['user_id'].' AND a.`del`=0';
}else{
$where=' a.`status`='.STAT_APPROVED.' AND a.`del`=0';
}
/**************** END remove self from who's online results ****************/

I removed it and now the who viewed me is working properly. However, I do want this code that I removed and I wish there was a way to keep it in there.
If you see that I'm logged in forever... it just means I turned the page on my browser and forgot to logout.

Marble

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 1004
  • Karma: +56/-7
Re: Few fixes and addons
« Reply #34 on: September 07, 2015, 01:29:56 PM »
I found a very simple solution to this problem that appears to work very well for me.

I duplicated search.php and renamed the new file: search2.php.
I inserted the code that I wanted and removed other unnecessary code. Then in frame.html I changed the link for who's online to:
Code: [Select]
<li><a href="{tplvars.relative_url}search2.php?st=online" title="Online Members">Who's Online</a></li>This way, I won't see myself online in that listing. Of course I could seek the opposite gender, but some members might want all genders.

So far, I haven't had any errors.
If you see that I'm logged in forever... it just means I turned the page on my browser and forgot to logout.

Marble

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 1004
  • Karma: +56/-7
Re: Few fixes and addons
« Reply #35 on: September 08, 2015, 11:33:33 PM »
OK, everything is working as it should, including the purges from the database. Except, I have one little problem and I can't figure out what's going on.

I see in the profile_views.html file this code:
Code: [Select]
<!--noloop name="members"-->
<li class="no_result">No one viewed your profile yet</li>
<!--/noloop name="members"-->

But this message doesn't appear when no one viewed my profile.
The content box appears with the Profile Views heading and that's it.
If you see that I'm logged in forever... it just means I turned the page on my browser and forgot to logout.

Marble

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 1004
  • Karma: +56/-7
Re: Few fixes and addons
« Reply #36 on: September 21, 2015, 01:53:03 PM »
Is there a way to set up an alert so that when someone views a member, a message or icon appears in the header?
If you see that I'm logged in forever... it just means I turned the page on my browser and forgot to logout.

ajayuk

  • Active Member
  • ***
  • Posts: 65
  • Karma: +0/-0
Re: Few fixes and addons
« Reply #37 on: September 27, 2015, 12:53:07 PM »
Installed this feature manually with the additional code by KHDev, everything seems to work great so far, thank you for this feature as I needed it  :) Great job guys!

I think showing when the last person viewed profile would be a great add on too like "Last seen 1 hour ago". I will look into this myself tomorrow but no promises :)

Tooken

  • Prime Member
  • ****
  • Posts: 146
  • Karma: +3/-0
Re: Few fixes and addons
« Reply #38 on: December 22, 2015, 10:04:45 AM »
Hi,

This is a very interesting mod, can I ask if someone did the full complete steps 1 by 1 to apply it after all the corrections?

Thanks!
David

Hornyflings

  • Prime Member
  • ****
  • Posts: 195
  • Karma: +3/-0
    • AsiasHeart
Re: Few fixes and addons
« Reply #39 on: December 22, 2015, 11:43:45 AM »
You mean the "Who viewed my profile" mod ?

I've installed it and it works great for me. Will not miss it anymore.

Tooken

  • Prime Member
  • ****
  • Posts: 146
  • Karma: +3/-0
Re: Few fixes and addons
« Reply #40 on: December 22, 2015, 11:52:21 AM »
Thanks for the reply,

Yes that one exactly. My question was, because all the steps are so dispersed between fixes and all, if someone actually had compiled all the correct info step by step.

Tks
David

Hornyflings

  • Prime Member
  • ****
  • Posts: 195
  • Karma: +3/-0
    • AsiasHeart
Re: Few fixes and addons
« Reply #41 on: January 02, 2016, 02:07:23 AM »
The mod "Who Viewed Me" includes the file profile_views.php with the following feature/function:

Code: [Select]
check_login_member('manage_networks');
In case that feature, originally used to manage friends and friend requests, is limited to free members using the rate limiter option then access to "Who viewed Me" is also limited and after a specified number of access the sorry page will be shown related to "manage networks".

Is it necessary to use the "manage_networks" feature or is it possible to change it to:

Code: [Select]
check_login_member('auth');
or otherwise it's necessary to define a new function so that manage_networks and "who viewed me" feature/function isn't related any longer.

Hornyflings

  • Prime Member
  • ****
  • Posts: 195
  • Karma: +3/-0
    • AsiasHeart
Re: Few fixes and addons
« Reply #42 on: January 02, 2016, 08:36:45 AM »
I've changed the code in profile_views.php now to:

Code: [Select]
check_login_member('auth');
Seems it's working. Will keep an eye on it because am not sure if running into any conflict.

nikkdobson

  • Confirmed Member
  • **
  • Posts: 6
  • Karma: +0/-0
Re: Few fixes and addons
« Reply #43 on: June 14, 2017, 08:32:25 PM »
can anyone tell me, will this mod work in v2.5