SimplePortal

Customization => Blocks and Modifications => Topic started by: grafitus on March 20, 2011, 11:43:34 AM

Title: Who's Viewing This Page?
Post by: grafitus on March 20, 2011, 11:43:34 AM
This mod allows you to add "who is viewing this page" line for any-page. Like:
Quote
grafitus (http://simpleportal.net/index.php?action=profile;u=288), thesikaleon (http://simpleportal.net/index.php?action=profile;u=17028), [SiNaN] (http://simpleportal.net/index.php?action=profile;u=2) and 3999 Millions Guests are viewing this page.

If you want this, too, download attached mod package, and install via your Package Manager.

Quote
Version 1.1
! Fixed "Undefined offset: 1" issue.

Version 1.0
+ Initial release
Title: Re: Who's Viewing This Page?
Post by: thesikaleon on March 20, 2011, 01:37:48 PM
pls can you post here the custom change in language file cause when I have no English  language I get mixed languages txt

examples
Quote
thesikaleon και 1 επισκέπτης are viewing this page.

Quote
0 Mitglieder und 2 Gäste are viewing this page.

Title: Re: Who's Viewing This Page?
Post by: grafitus on March 20, 2011, 02:59:18 PM
"and" and "Guests" are already fetching from SMF language files. Except them there's another one, " are viewing this page."

./Themes/default/languages/SPortal.english(-utf8).php
Code: [Select]
$txt['who_viewing_page'] = ' are viewing this page.';
Title: Re: Who's Viewing This Page?
Post by: thesikaleon on March 20, 2011, 03:43:46 PM
thanks  :applause:

I just need to translate this "are viewing this page."
Title: Re: Who's Viewing This Page?
Post by: [SiNaN] on March 21, 2011, 01:59:58 PM
Looks good. You forgot an extra operation for PortalPages.template.php file:

Code: [Select]
<operation>
<search position="replace"><![CDATA[]]></search>
<add><![CDATA[]]></add>
</operation>
Title: Re: Who's Viewing This Page?
Post by: thesikaleon on March 21, 2011, 02:11:24 PM
works for me without the operation

it makes any difference?
Title: Re: Who's Viewing This Page?
Post by: grafitus on March 21, 2011, 02:13:30 PM
Looks good. You forgot an extra operation for PortalPages.template.php file:

Code: [Select]
<operation>
<search position="replace"><![CDATA[]]></search>
<add><![CDATA[]]></add>
</operation>
Thanks. Fixed. :nervous-happy:

works for me without the operation

it makes any difference?
No. ;)
Title: Re: Who's Viewing This Page?
Post by: Inti31 on September 01, 2011, 03:51:10 AM
grafitus - your updated package works for me - thx for it... - the error message is gone

just one thing:
when I visit first time a page, I am a guest.  If I refresh the page directly (f5) or click again - mostly I am a guest, too
If I count slowly (1,2,3) and refresh the page,  now my name is shown... - I can live with that...

maybe you will update it again:

./Themes/default/languages/SPortal.german(-utf8).php
Quote
$txt['who_viewing_page'] = ' betrachten gerade diese Seite.';

maybe you could extend it with that I asked for: "count views on pages?"

Topic: http://simpleportal.net/index.php?topic=9384.msg49246#msg49246

./Themes/default/PortalPages.template.php

There are two instances of the code, you need to replace them both to see on two main themes -- Core and Curve:
Code: (Find) [Select]
', $context['SPortal']['page']['title'], '
Code: (Replace) [Select]
', $context['SPortal']['page']['title'], ' (', $txt['read'], ' ', $context['SPortal']['page']['views'], ' ', $txt['times'], ')

thx Inti31

Title: Re: Who's Viewing This Page?
Post by: Tricky on July 14, 2012, 01:06:14 PM
Cant seem to get this to work
Title: Re: Who's Viewing This Page?
Post by: Old Fossil on July 17, 2012, 10:11:09 PM
Cant seem to get this to work

Tricky why can't you get it to work?

 D:

Are you using 2.0.2 as it may be that the downloads are for 1.1.x

 :radioactive:
Title: Re: Who's Viewing This Page?
Post by: Oldiesmann on July 17, 2012, 10:27:41 PM
Looking at the package, it's definitely only for 2.0.
Title: Re: Who's Viewing This Page?
Post by: Old Fossil on July 17, 2012, 10:32:15 PM
Looking at the package, it's definitely only for 2.0.

/me goes back to sleep
Title: Re: Who's Viewing This Page?
Post by: Tricky on August 02, 2012, 09:30:37 AM
Sorry for late reply but it does not show who is on the page.

needs an update i think if any one could do it i'm sure its simple i would be very grateful..
Title: Re: Who's Viewing This Page?
Post by: [SiNaN] on August 03, 2012, 11:31:38 AM
What is your current SimplePortal version? What exactly do you mean by not being able to get it to work?
Title: Re: Who's Viewing This Page?
Post by: Tricky on August 03, 2012, 12:39:31 PM
Version 2.3.4

when i make a page like a shoutbox page and members visit that page they ain't showing that there on the page like example above..

where it shows the members on page there is nothing
Title: Re: Who's Viewing This Page?
Post by: Old Fossil on August 03, 2012, 05:20:49 PM
Have you considered updating to 2.3.5?
Title: Re: Who's Viewing This Page?
Post by: Tricky on August 04, 2012, 01:29:00 PM
Have you considered updating to 2.3.5?

Im happy with the version iv got on

just wish i could get this to work
Title: Re: Who's Viewing This Page?
Post by: Tricky on August 09, 2012, 08:31:37 AM
iv waited a few days now i hate bumping but any one??
Title: Re: Who's Viewing This Page?
Post by: FireDitto on August 13, 2012, 07:36:40 AM
SMF; 2.0.2
SP; 2.3.5

I get an error in "./Themes/default/PortalPages.template.php" and because the last modified post is pretty old, I didn't want to make edits in case it was a difference between versions and I killed something.

Is there a newer update or a way to make it work on the versions I'm using?

Thank you!
Title: Re: Who's Viewing This Page?
Post by: teos on January 19, 2013, 08:56:46 AM
smf 2.0.3  sp 2.3.5  default theme curve

  It's strange that 1.1 version of he mod failed in portalpages.template.php

Compared the original 2.3.5 file with mine, and no difference ..

Missing something ?
SimplePortal 2.3.8 © 2008-2024, SimplePortal