News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Profile Visitors (4.1 Released | SMF 2.0 Compatible)

Started by [SiNaN], April 09, 2008, 12:44:17 AM

Previous topic - Next topic

Sabre™

My pleasure :)

Quote from: cleanfiles on April 22, 2008, 10:04:56 PM
the mod still not working.
It's not all that important, would have been a nice addition though.  :)
Dont give up..  [SiNaN] is in between exams at the moment, and will get to you as soon as time permits :)
I reckon its a pretty cool addition myself :D

Good luck :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Sheree

Quote from: [SiNaN] on April 22, 2008, 06:20:11 AM
Quote from: Sheree on April 22, 2008, 05:39:46 AM
hi there maybe you can help me out after installing the mod i got this error on the profile page

Table 'ourcrib_sheree.profile_comments' doesn't exist
File: /home/ourcrib/public_html/Sources/Load.php(1737) : eval()'d code
Line: 510

That is related to the Profile Comments mod. Can you check whether you have the field profile_comments in smf_members in your database?

i have this on my database
ourcrib_members

anakmacan

Admin CP--> Features & options --> Enable profile visitors Can't Be Found :<

The installation went ok except for load.php,modsettings.php, and profile.template.php; but ive  manually change it from package parser commands.

Marcus Forsberg

Here's a swedish translation:

Errors.swedish.php:
$txt['cannot_profile_delete_visitor'] = 'Du har inte lov att radera besökare från listan.';

ManagePermissions.swedish.php:
$txt['permissionname_profile_delete_visitor'] = 'Får radera besökare från listan?';
$txt['permissionname_profile_view_visitor'] = 'Får se besökare?';
$txt['permissionname_profile_view_visitor_own'] = 'Egen profil';
$txt['permissionname_profile_view_visitor_any'] = 'Allas profiler';

Modifications.swedish.php:
$txt['pv_latest_visitors'] = 'Senaste besökare';
$txt['pv_no_visitors'] = 'Inga besökare.';
$txt['enableProfileVisitors'] = 'Aktivera profil besökare?';
$txt['pv_dLogAdmin'] = 'Räkna inte med admins';

JoshieDaMan

Quote from: JoshieDaMan on April 22, 2008, 03:40:45 PM
No failure installing, but however, one piece of code failed ultimate profile.

Look at my picture when I put this in.

Theme/Default/Ultimate.Profile.php
Find.
echo '
</td>';


// Now print the second column.


Replace with.

if(!empty($modSettings['enableProfileVisitors']) && $context['can_view_visitor']) {
echo '<br />
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%">
<tr>
<td class="titlebg" height="26" align="center">
', $txt['pv_latest_visitors'] ,'
</td>
</tr>';
if(!empty($visitor_profile)) {
echo '
<tr>
<td class="windowbg">
<table align="center">
<tr>';
foreach ($visitor_profile as $visitor)
echo '
<td class="windowbg" align="center" style="padding:5px;">', $visitor['avatar']['href'] ? '<img src="' . $visitor['avatar']['href'] .'" width="65" />' : '', '</td>';
echo '
</tr>
<tr>';
foreach ($visitor_profile as $visitor) {
echo '
<td class="windowbg" style="padding:5px;"><b>', $visitor['username'], '</b><br /><span class="smalltext">Posts:', $visitor['posts'], '<br /><a href="', $scripturl, '?action=profile;u=', $visitor['id'], '">', $txt[79], '</a>';
if ($context['can_delete_visitor'])
echo '<br /><a href="' . $scripturl . '?action=deletevisitor;profile=' . $context['member']['id'] . ';member=' . $visitor['id'] . ';sesc=' . $context['session_id'] . '">' . $txt[31] . '</a>';
echo '</span>
</td>';
}
echo '
</tr>
</table>';
}
else {
echo '<tr>
<td class="windowbg" align="center">', $txt['pv_no_visitors'], '</td>
</tr>';
}
echo '
</td>
</tr>
</table>';
}
echo '
</td>';


// Now print the second column.


I did that, now. Look how it turned out -

Solution?
Still looking for solution.

[SiNaN]

Sabre™, there is no problem in your site. To see it, do this:

Profile.php

Find:
redirectexit('action=profile;u=' . $profile);

Replace:
redirectexit();

After that, remove the visitor from profile and look at that profile again. It actually removes the visitor but because of that it redirect backs to the profile again (no need to enter to the full profile mod to be logged) it logs you again.

MoneyTalkPro.com, what is you database prefix?

JoshieDaMan, can you attach your Ultimateprofile.template.php file here, so that I can look at it?

cleanfiles
, you can attach the files needs editing and I can do them manually for you.

Sheree, also, what is your database prefix? And can you attach your Profile.php file?

anakmacan, it is not a tab though, it is under the Basic Features tab.

MTF95, thanks for the translation. I'll add it as a package.
Former SMF Core Developer | My Mods | SimplePortal

PrizeLive.com

Quote from: [SiNaN] on April 25, 2008, 02:35:59 AM
MoneyTalkPro.com, what is you database prefix?

It's working fine for me now. Thanks.
Get Paid Instantly via PayPal (or other options) at PrizeLive.com!

[SiNaN]

Former SMF Core Developer | My Mods | SimplePortal

Sabre™

Thanks mate..  The above worked sweet!!
Its still logging the admin as I visit a profile(the function is set to not show admin in the AP), and all the times are set to one particular visit time.
This is no prob though, Ive just changed it to allow loggin the admin, then I delete it as I leave.

Thanks for the assistance bro :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


[SiNaN]

Former SMF Core Developer | My Mods | SimplePortal


Eliana Tamerin

I just tried out your 3.0 version, very nice. I'm pleased at how well it integrates into Ultimate Profile and the array of options you have now.

My one gripe is that when I uninstalled 1.0, it deleted the database fields, essentially reseting the tally. Not a huge issue, but still an annoyance.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

[SiNaN]

Quote from: Eliana Tamerin on April 30, 2008, 09:37:37 AM
I just tried out your 3.0 version, very nice. I'm pleased at how well it integrates into Ultimate Profile and the array of options you have now.

My one gripe is that when I uninstalled 1.0, it deleted the database fields, essentially reseting the tally. Not a huge issue, but still an annoyance.

Thanks Eliana. I do not like writing upgrade packages (trying to be a multislacker :P).  I understand but, 3.1 will include upgrade also, with only a few features as I said before.
Former SMF Core Developer | My Mods | SimplePortal

Eliana Tamerin

Well, you could always prevent the mod from uninstalling the database info and then tweak the database tables as necessary in the next version. Then have a separate file to run to uninstall the database tables from the site.

Or, as you're doing, just make it upgradeable.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

edi67

is possible have this soon for smf 2? thx
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

[SiNaN]

Quote from: edi67 on May 02, 2008, 03:54:50 PM
is possible have this soon for smf 2? thx

I hope so. Searching for time.
Former SMF Core Developer | My Mods | SimplePortal

FragaCampos

Thanks! I have SMF 1.1.5 and everything was ok.
I also translated the mod to portuguese and brazilian for everyone interested:

<file name="$languagedir/Errors.portuguese.php">
<operation>
<search position="end" />
<add><![CDATA[
$txt['cannot_profile_delete_visitor'] = 'N&atilde;o tem permiss&atilde;o para apagar visitantes.';]]></add>
</operation>
</file>
<file name="$languagedir/ManagePermissions.portuguese.php">
<operation>
<search position="end" />
<add><![CDATA[
$txt['permissionname_profile_delete_visitor'] = 'Pode apagar perfil de visitantes?';
$txt['permissionname_profile_view_visitor'] = 'Pode ver perfil de visitantes?';
$txt['permissionname_profile_view_visitor_own'] = 'Pr&oacute;prio perfil';
$txt['permissionname_profile_view_visitor_any'] = 'Qualquer perfil';]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese.php">
<operation>
<search position="end" />
<add><![CDATA[
$txt['pv_latest_visitors'] = '&Uacute;ltimos visitantes';
$txt['pv_no_visitors'] = 'Ainda ningu&eacute;m visitou o seu perfil.';
$txt['enableProfileVisitors'] = 'Activar perfil dos visitantes?';
$txt['pv_dLogAdmin'] = 'Não registar administradores';]]></add>
</operation>
</file>

<file name="$languagedir/Errors.brazilian.php">
<operation>
<search position="end" />
<add><![CDATA[
$txt['cannot_profile_delete_visitor'] = 'Voc&ecirc; &atilde;o tem permiss&atilde;o para deletar visitantes.';]]></add>
</operation>
</file>
<file name="$languagedir/ManagePermissions.brazilian.php">
<operation>
<search position="end" />
<add><![CDATA[
$txt['permissionname_profile_delete_visitor'] = 'Pode apagar perfil de visitantes?';
$txt['permissionname_profile_view_visitor'] = 'Pode ver perfil de visitantes?';
$txt['permissionname_profile_view_visitor_own'] = 'Pr&oacute;prio perfil';
$txt['permissionname_profile_view_visitor_any'] = 'Qualquer perfil';]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.brazilian.php">
<operation>
<search position="end" />
<add><![CDATA[
$txt['pv_latest_visitors'] = '&Uacute;ltimos visitantes';
$txt['pv_no_visitors'] = 'Ainda ningu&eacute;m visitou seu perfil.';
$txt['enableProfileVisitors'] = 'Activar perfil dos visitantes?';
$txt['pv_dLogAdmin'] = 'Não registar administradores';]]></add>
</operation>
</file>



2Ntense

Is it just me or did the latest 3.0 update crash the  [Add To Buddy List] link??

I have a relatively clean 1.1.5 fresh install, and when I uninstall v2.1 and install v3.0, the  [Add To Buddy List] link disappears off of the member's PROFILE SUMMARY page when I view it.  I uninstall v3.0 and drop back to v2.1 and the  [Add To Buddy List] is there again.

The link is on the  Current Status: Online|Offline  [Add To Buddy List] line in the profile.

[SiNaN]

Quote from: 2Ntense on May 11, 2008, 10:54:33 AM
Is it just me or did the latest 3.0 update crash the  [Add To Buddy List] link??

I have a relatively clean 1.1.5 fresh install, and when I uninstall v2.1 and install v3.0, the  [Add To Buddy List] link disappears off of the member's PROFILE SUMMARY page when I view it.  I uninstall v3.0 and drop back to v2.1 and the  [Add To Buddy List] is there again.

The link is on the  Current Status: Online|Offline  [Add To Buddy List] line in the profile.

That's a bug for the 3.0 version. This is the fix:

Profile.php

Find:

'can_delete_visitor' => allowedTo('profile_delete_visitor'),
'can_view_visitor' => ($context['user']['is_owner'] && allowedTo('profile_view_visitor_own')) || allowedTo('profile_view_visitor_any'),


Replace:

'can_have_buddy' => allowedTo('profile_identity_own') && !empty($modSettings['enable_buddylist']),
'can_delete_visitor' => allowedTo('profile_delete_visitor'),
'can_view_visitor' => ($context['user']['is_owner'] && allowedTo('profile_view_visitor_own')) || allowedTo('profile_view_visitor_any'),allowedTo('profile_view_visitor_any'),


Will be fixed in the next version which will be released in a week.
Former SMF Core Developer | My Mods | SimplePortal

2Ntense

Got it, thanks!  I corrected the XML so I could uninstall/upgrade it again later.  It looks like it'd duplicate that line every time you uninstall if you patch Profile.php.

in Profile_Visitors.xml -

find:
<search position="replace"><![CDATA[ 'can_have_buddy' => allowedTo('profile_identity_own') && !empty($modSettings['enable_buddylist']),]]></search>

replace with:
<search position="before"><![CDATA[ 'can_have_buddy' => allowedTo('profile_identity_own') && !empty($modSettings['enable_buddylist']),]]></search>

Advertisement: