Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Profile Visitors (like IPB last guests)
#21
Feel free to code your own plugin... thats all. It is for free, so dont be moron
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#22
Hi Eldenroot,

I am not moron. I make plug-in.

http://mybbdepo.com/ozel-profil-yonetimi...onusu.html
http://mybbdepo.com/link-degisim-yonetic...onusu.html
http://mybbdepo.com/aktivasyon-bekleyen-...onusu.html
http://mybbdepo.com/dinamik-meta-etiketl...onusu.html

But, fool someone.
Reply
#23
Version 1.9.0
* Fix installation (MySQL 5.6+ compatibility)
* Removed "Thanks" code
Reply
#24
Lightbulb 
In the profileVisitors.tpl.php we can add:

        self::$tpl[] = array(
            "title" => 'profileVisitors_Disabled',
            "template" => $db->escape_string('<table border="0" cellspacing="{$theme[\'borderwidth\']}" cellpadding="{$theme[\'tablespace\']}" class="tborder">
	<tr>
		<td class="thead"><strong>{$lang->profileVisitorsTitle}</strong></td>
	</tr>
	<tr>
		<td class="{$bgcolor} smalltext" style="text-align: center; font-style: italic">The recent visitors block is disabled and is not being shown to other users.</td>
	</tr>
</table>'),
            "sid" => "-1",
            "version" => "1.0",
            "dateline" => TIME_NOW,
        );

Then in profileVisitors.php we can

replace:
        // Something to do?
        if (!$memprofile['show_profile_visitors'] || !$num_visitors) {
            return;
        }

with:
        // Something to do?
        if (!$num_visitors) {
            return;
        }

replace:
        // Display table
        $profileVisitorsList = '';
        foreach ($visitors as $visitor) { 
            $visitor['username'] = format_name($visitor['username'], $visitor['usergroup'], $visitor['displaygroup']);
    		$visitor['profilelink'] = build_profile_link($visitor['username'], $visitor['uid']);
            $visitor['date'] = my_date('relative', $visitor['datestamp']);
			$avatar = format_avatar(htmlspecialchars_uni($visitor['avatar']), $visitor['avatardimensions'], my_strtolower(self::getConfig('AvatarWidth')));
            $bgcolor = alt_trow();
            eval("\$profileVisitorsList .= \"" . $templates->get("profileVisitors_Row") . "\";");	
        }
        eval("\$profileVisitors = \"" . $templates->get("profileVisitors") . "\";"); 

with:
        // Display table
        if (!$memprofile['show_profile_visitors']) {
			eval("\$profileVisitors = \"" . $templates->get("profileVisitors_Disabled") . "\";");
		} else {	
			$profileVisitorsList = '';
			foreach ($visitors as $visitor) { 
				$visitor['username'] = format_name($visitor['username'], $visitor['usergroup'], $visitor['displaygroup']);
				$visitor['profilelink'] = build_profile_link($visitor['username'], $visitor['uid']);
				$visitor['date'] = my_date('relative', $visitor['datestamp']);
				$avatar = format_avatar(htmlspecialchars_uni($visitor['avatar']), $visitor['avatardimensions'], my_strtolower(self::getConfig('AvatarWidth')));
				eval("\$profileVisitorsList .= \"" . $templates->get("profileVisitors_Row") . "\";");	
			}
			eval("\$profileVisitors = \"" . $templates->get("profileVisitors") . "\";"); 
		} 

Result:
[Image: Screenshot-from-2019-07-11-04-13-05.png]
What goes around comes around
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)