Author Topic: [MOD] - Profile hits under the member's page for each counts - Settings included  (Read 28801 times)

0 Members and 1 Guest are viewing this topic.

TheOracle

  • Guest

TheOracle

  • Guest
I see that this MOD is not quite in demand ? If not, this topic could be removed if you'd like ?  :?

Offline Egly

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
No dont delete it!!!

I didnt have the time until now to try it, but i wil!! :mrgreen:

Great Job!

TheOracle

  • Guest
Ahh ! here we go. I was wondering why I posted this in the first place. 8)

Very well.

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
thanks - I guess I'll test that as soon as I'll have a bit time  :D
MAяTRIX


Offline universal

  • Full Member
  • ***
  • Posts: 213
    • View Profile
    • http://www.funny.lt
Maybe there is possible to show "Top 5 profile hits" in the index page?
At the bottom of http://www.funny.lt/index.php near other tops
Again this addres?!
http://www.funny.lt

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
That would be a nice addition to this mod...

...and not only for funny.it :D


Looks like a nother job for you, TheOracle ;)

MAяTRIX


Offline universal

  • Full Member
  • ***
  • Posts: 213
    • View Profile
    • http://www.funny.lt
Hm, just did it with simple mysql query...
Replace funny.lt with your code and include in home.html template... :}
Simple code.

Code: [Select]
<?
include "config.php";
$profile_img = '<img src="http://www.funny.lt/templates/default/images/profile.gif" border="0" align="absmiddle" alt="Member profile">';
$pm_img = '<img src="http://www.funny.lt/templates/default/images/pm.gif" border="0" align="absmiddle" alt="Private message">';
$db = mysql_connect("$db_host", "$db_user", "$db_password") or die ("Error");
@mysql_select_db("$db_name", $db) or die ("DB not found");
$result = mysql_query("SELECT profile_hits, user_name, user_id FROM 4images_users ORDER BY profile_hits DESC LIMIT 5");
while ($row = mysql_fetch_array($result)) {
echo
"<a href=http://www.funny.lt/pm.php?action=new&user_id=".$row['user_id'].">".$pm_img."</a>
<a href=http://www.funny.lt/member.php?action=mailform&user_id=".$row['user_id'].">".$mail_img."</a>
<a href=http://funny.lt/member.php?action=showprofile&user_id=".$row['user_name'].">".$row['user_name']."</a> - <b>".$row['profile_hits']."</b><br/>";
}
?>
Again this addres?!
http://www.funny.lt

Offline universal

  • Full Member
  • ***
  • Posts: 213
    • View Profile
    • http://www.funny.lt
Btw, maybe there is possible to log users who viewed my profile and show them with small photos somwhere in the private area...?
Again this addres?!
http://www.funny.lt

TheOracle

  • Guest
I don't understand. What does this do exacly :

Quote

<?
include "config.php";
$profile_img = '<img src="http://www.funny.lt/templates/default/images/profile.gif" border="0" align="absmiddle" alt="Member profile">';
$pm_img = '<img src="http://www.funny.lt/templates/default/images/pm.gif" border="0" align="absmiddle" alt="Private message">';
$db = mysql_connect("$db_host", "$db_user", "$db_password") or die ("Error");
@mysql_select_db("$db_name", $db) or die ("DB not found");
$result = mysql_query("SELECT profile_hits, user_name, user_id FROM 4images_users ORDER BY profile_hits DESC LIMIT 5");
while ($row = mysql_fetch_array($result)) {
echo
"<a href=http://www.funny.lt/pm.php?action=new&user_id=".$row['user_id'].">".$pm_img."</a>
<a href=http://www.funny.lt/member.php?action=mailform&user_id=".$row['user_id'].">".$mail_img."</a>
<a href=http://funny.lt/member.php?action=showprofile&user_id=".$row['user_name'].">".$row['user_name']."</a> - <b>".$row['profile_hits']."</b><br/>";
}
?>


?

Quote

Btw, maybe there is possible to log users who viewed my profile and show them with small photos somwhere in the private area...?


This has already been added into the ' Last Active Users ' MOD the same day I posted this actual MOD. ;)

Offline universal

  • Full Member
  • ***
  • Posts: 213
    • View Profile
    • http://www.funny.lt
$result = mysql_query("SELECT profile_hits, user_name, user_id FROM 4images_users ORDER BY profile_hits DESC LIMIT 5");

just look at query ;)

I select profile_hits, user_name, user_id FROM 4images_users and order it by profile_hits, then I take only first 5, and show them :)
Again this addres?!
http://www.funny.lt

TheOracle

  • Guest
Re: [MOD] - Profile hits under the member's page for each counts - Settings incl
« Reply #11 on: September 10, 2005, 11:52:10 AM »
In that case, don't take it wrong but your method is highly unsecured since :

Quote

with your code and include in home.html template...


that is an unsafe procedure. In the mean time, not all users has enabled the PHP_CODE function from their includes/constants.php file since it is considered a risk.

As for this one :

Quote

Looks like a nother job for you, TheOracle


Unlikely. I'd rather remain with the codings I've done under the PHP core files but thanks for giving your input on this. ;)

In the mean time, it looks like you're trying to adapt something with the PM v2.0 MOD. Am I right ? If so, there might be something that might be done for that - with a secured way. ;)

Offline glitzer

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • over 7000 E-Cards

Hi All!

This mod works great thank you very much.!!

But a question, what can i do, to see the profil hits when i am not logged in?
I would like to have to see it for everyone.

thanks for your help.


TheOracle

  • Guest
Re: [MOD] - Profile hits under the member's page for each counts - Settings incl
« Reply #13 on: September 10, 2005, 05:11:04 PM »
Quote

But a question, what can i do, to see the profil hits when i am not logged in?
I would like to have to see it for everyone.


Are you sure you would like to have this ? I strongly recommend not to do it like this but it's up to you . . .

Offline glitzer

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • over 7000 E-Cards
Hi oracle,

i dont understand ? what is so danger to so see how many profil hits has someone?
mhh?? :|