being messing about with the Forum Stats block where it shows 'Users Online',
i wanted to add both hidden users and buddies...
The total dosent count hidden users or maybe its counted in 'users' itsself.. not sure
see the image below.
this is how to add Hidden users & buddies to the Stats Block.
allways backup!! ;)
Open:
languages/TPortal.english.php
Find:
$txt['tp-users'] = 'Users';
Add After:
$txt['tp-hidden'] = 'Hidden';
$txt['tp-buddies'] = 'Buddies';
Open:
default/TPortalBlocks.template.php
Find:
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
Replace With:
echo '<br />'.$bullet.$txt['tp-hidden'].': '.$online['hidden'];
echo '<br />'.$bullet.$txt['tp-buddies'].': '.$online['buddies'];
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
Thank you OnTap :)
Fun future and it works like a charm :)
Thanks so much for this!
I did what you said and it worked like a charm.
/me apologizes to G6 and says, "I did not realize you said the same thing."
if we have it set on our boards not to allow people to hide their online status will this still work, just leaving out the lines of code for hidden user?
could you add spiders, too? and how?
That need a whole engine to show up.
You can find a mod for googlebot and spiders on the SMF forums in the modsection
yup. i know. i have it. which is why i wanted to know if i could add spiders and stuff :) since mine doesn't show it at all.
Quote from: resurgence on April 12, 2006, 07:07:50 AM
could you add spiders, too? and how?
Easily ;)... are you talking about the
Googlebot & Spiders MOD? (http://mods.simplemachines.org/index.php?action=download;mod=143;id=13842)
this is how you would do it.
Open TPortal.english.php
Find:$txt['tp-buddies'] = 'Buddies';Add After:$txt['tp-spiders'] = 'Spiders';Open TPortalBlocks.template.php
Findecho '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
After Add:
echo '<br />'.$bullet.$txt['tp-spiders'].': '.$online['num_spiders'];
xD i was playing around with that, i kept typing in
$online['spiders'];
that's why it didn't work lol thanks!
for some reason i cant get this to work on the Black 22 theme..... anyone have any ideas?
Quote from: HaxXxoR on April 13, 2006, 05:19:43 AM
for some reason i cant get this to work on the Black 22 theme..... anyone have any ideas?
just had a quick look at your site. do you have the Googlebot & Spiders MOD Installed?
yeah you can see it when you click on the forums button
This should be in the base code... Maybe an option for the googlebot mod or something..
Thaks for the code. It works great!!
i cant seem to find this file in my sources index
tportalblocks.template.php
The template files you find in the themes directorys
If it is a source file it's just called "filename.php"
Need Help Fast!
Parse error: parse error, unexpected '<' in .../Themes/default/TPortalBlocks.template.php on line 501
<div style="width: 100%; height: 23ex; overflow: auto;">';
that was highlighted as a parse error in the TPblocks
Found the error
but now where to add buddies into the code
$online = ssi_whosOnline('array');
echo $bullet.$txt['tp-users'].': '.$online['num_users'];
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
echo '<br />'.$bullet.$txt['Spiders'].': '.$online['num_spiders'];
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
Just add this in right after
echo '<br />'.$bullet.$txt['tp-buddies'].': '.$online['buddies'];
echo '<br />'.$bullet.$txt['tp-hidden'].': '.$online['hidden'];
So it looks like this
echo '<br />'.$bullet.$txt['tp-hidden'].': '.$online['hidden'];
echo '<br />'.$bullet.$txt['tp-buddies'].': '.$online['buddies'];
ok one last thing if i were to make it echo so in the online list it showed the staff as seperate from users how would that happen?
like this?:
echo $bullet.$txt['tp-staff'].': '.$online['num_staff'];
I tried to install the Spiders mod and got it to work but for some reason the Spiders part is Blank. Screen shot below. Anyone got any ideas? And yes i did check the code over again a few times. Please help :tickedoff: :tickedoff:
Depending on what you have here
$online = ssi_whosOnline('array');
echo $bullet.$txt['tp-users'].': '.$online['num_users'];
echo '<br />'.$bullet.$txt['tp-buddies'].': '.$online['buddies'];
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
echo '<br />'.$bullet.$txt['tp-spiders'].': '.$online['num_spiders'];
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr /> ';
You need this in TPortal.english.php
//spiders and buddies
$txt['tp-spiders'] = 'Spiders';
$txt['tp-buddies'] = 'Buddies';
My first part is like this
$online = ssi_whosOnline('array');
echo $bullet.$txt['tp-users'].': '.$online['num_users'];
echo '<br />'.$bullet.$txt['tp-hidden'].': '.$online['hidden'];
echo '<br />'.$bullet.$txt['tp-buddies'].': '.$online['buddies'];
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
echo '<br />'.$bullet.$txt['tp-spiders'].': '.$online['num_spiders'];
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
<div style="width: 100%; height: 23ex; overflow: auto;">';
And the second part that supposed to be in TPortal.english.php does that just go anywhere?
You can add the text about anywhere in there as long as it is inside the php tags
Quote from: HaxXxoR on May 17, 2006, 06:02:36 PM
And yes i did check the code over again a few times. Please help :tickedoff: :tickedoff:
your missing the "txt" part..
Look In Themes/default/languages/TPortal.english.php
and add...
$txt['tp-spiders'] = 'Spiders';
How to display list of Spiders in Block just like Users list is displayed?
You need to have the google bot and spider mod installed on your smf first, then do those steps explained in this thread.
The mod you find on Simplemachines in their download section :)
I know..that...But just like usernames are displayed...I want all spiders listed against bullets..like
.Google
.MSN
That i cant help you with, the only way i have seen this is the amount of spiders that are crawling the forum
Thanks Maxâââ,¬Å¾Ã,¢ ..
this is a nice little addiction ;)
crip
I installed the google & spider mod today. It seem to work just fine. But im having some problems finding the code in TPortalBlocks.template.php because all the codes inside that file are alligned on the top. :o Is that normal? See attachement please.
Anyone that could help me out here? Thanks.
That would confuse anyone right there! all the code in one line hehe
i have added the google bot code into TPortalBlocks.template.php for you.
see attachment
Worked like a charm. :up: Thank you very much. :)
One quick question: Is it normal that all the code is in 1 line?
Quote from: whoesa on August 18, 2006, 01:24:16 AM
One quick question: Is it normal that all the code is in 1 line?
Wont do any harm having it all in the same line, just easier to read/code if it was all seperate ;)
Wordpad shows it all in the same line but with notepad is dosent! :D
Ah ok thanks...good to know ;)
i added the code for the boardindex already, but i would like it in the userbox
is there a way to add flashchat users in the box as well?
i don't need to know what room they're in, i just want to know if there are people in there.
anyone?