News:

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

Main Menu

Ghost Members

Started by !!kaos!!, September 18, 2009, 08:24:56 AM

Previous topic - Next topic

Tien

Seems like the Ghost Members Mod does not work with the Users Online Today Mod. Name of Ghost Members does not appear in the Users Online Today. And only shows that the Ghost Members are off-line.

Scratching my Head

Parse error: syntax error, unexpected ';', expecting ')' in /***/***/***/***/Sources/ModSettings.php on line 186

This is the code:

   
      181             'ghost' => array(
      182         'title' => $txt['ghost_mem_mod'],
      183         'href' => $scripturl . '?action=featuresettings;sa=ghost;sesc=' . $context['session_id'],
      184      ),
      185      ),
      186   );



Any love?

lipmon

Thx you Good for Smf2.0 Rc3 ;D

snyperthugs

This mod doen't work for me. I installed manually and the GHOST tab doesn't appear. Any help?  Thanks
www.4mydjs.com - Get Your Music Heard!

Scratching my Head

Doesn't appear anyone is minding this mod.


sharks

I'm looking for an RC3 compatible version... but seems like help is hard to find here these days. :(

gbsothere

#66
I've removed my zip from this post because live627 very graciously fixed the zip so that it will install with the package manager and it can be downloaded on his post HERE




I'm tentatively offering edits that make this mod compatible with RC3.  I only ended up doing this while trying to help a member install it on his RC3 forum and just wanted to share the edits in this attached zip.  I asked first, and the consensus seems to be that it's alright for me to do this.

Please understand, the zip attached only contains edits for RC3.  Whether or not it will install via the package manager, I don't know.  I installed it manually on my test board and it seems to function well and generates no errors.  I don't know if that will be your experience.  You can try it via the package manager, but if it doesn't install that way, the manual edits are not too extensive.

Please, before trying these edits, back up these files:

Admin.php
ManageSettings.php
BoardIndex.template.php

by saving them from your server and putting them somewhere safe, in the event that you feel you don't want to use this mod and still want to keep your other mods intact which may have edited these files.   :)

This mod does not interact with the database but the SMF mantra is "Back Up!" and it's always a good idea.




To any moderators:  if you feel this zip should be removed, I understand and will simply post my edits, if you'd rather. 
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Scratching my Head

Thanks gbsothere. I'll try it in the next couple days and let you know how it goes.

No matter how it turns out, thanks.
The hard work is appreciated.



gbsothere

Quote from: Scratching my Head on August 27, 2010, 05:36:17 PM
Thanks gbsothere. I'll try it in the next couple days and let you know how it goes.

No matter how it turns out, thanks.
The hard work is appreciated.






Thanks for testing it!   :)
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Scratching my Head

Okay. :)

Well, it won't parse.
And it won't install.

So I'm going to try a manual install based on the install.xml


Be back in a few with results.


;)




gbsothere

Quote from: Scratching my Head on August 27, 2010, 05:49:45 PM
Okay. :)

Well, it won't parse.
And it won't install.

So I'm going to try a manual install based on the install.xml


Be back in a few with results.


;)



I didn't think it would, with the package manager but thanks for confirming that.  I've been staring at code so long today with a lot of other stuff; I hope I didn't flub the edits on the .xml file.   :D 

(If I did, I'll remove the zip and take another look at it.)
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Scratching my Head

I have the Ulitmate Profile installed and it's not playing nice.

Would you feel like posting the changes from Ghost Members to Ghost Members SMF 2.0 RC3?

Or would that be overstaying my welcome?


Then I could just compare.

I guess I can't read the XML file like a pro, and I want someone to parse it for me so I can make the manual edits. It's
okay if you don't feel like doing it, I'll work it out eventually, buddy.

:P  ;)

gbsothere

I can post the edits here that I worked up, sure.   :)

The thing is, you can see on this thread the same issue I ran into.  The guy I was helping was going to use the emulator and install the RC2 version on his RC3 forum but the "find" strings for the BoardIndex.template.php and also for ManageSettings.php just weren't there.  People were complaining about it here and, sure enough, I ran into that, as well.  So I just kept chipping away until I could get this to work on my RC3 test forum and it's working on the forum of the member I was helping.  But it's duct tape; it's not pretty.   :D

(Some weird white space may make the "finds" a bit difficult, so just copy the actual text.)


In ManageSettings.php

Find:

// Load up all the tabs...
$context[$context['admin_menu_name']]['tab_data'] = array(
'title' => $txt['admin_security_moderation'],
'help' => 'securitysettings',
'description' => $txt['security_settings_desc'],
'tabs' => array(
'general' => array(
),
'spam' => array(
'description' => $txt['antispam_Settings_desc'] ,
),
'moderation' => array(
),
),
);



Replace with:

// Load up all the tabs...
$context[$context['admin_menu_name']]['tab_data'] = array(
'title' => $txt['admin_security_moderation'],
'help' => 'securitysettings',
'description' => $txt['security_settings_desc'],
'tabs' => array(
'general' => array(
),
                  'ghost' => array(
'title' => $txt['ghost_mem_mod'],
),
'spam' => array(
'description' => $txt['antispam_Settings_desc'] ,
),
'moderation' => array(
),
),
);



Find:


// Mod authors, once again, if you have a whole section to add do it AFTER this line, and keep a comma at the end.


Replace with:


            'ghost' => 'ModifyGhostSettings',
// Mod authors, once again, if you have a whole section to add do it AFTER this line, and keep a comma at the end.


Find (end of file):

?>

Add Before:


//Begin Ghost Members Mod By !!kaos!! www.simpledestek.com
function ModifyGhostSettings()
{
global $context, $txt, $scripturl, $modSettings;

       loadLanguage('Ghost');

$config_vars = array(
            array('check', 'allow_ghost'),
            array('text', 'ghost_total_members', &$txt['ghost_total_members'], 'ghost_total_members'),
array('text', 'ghost_mem_1', '10', &$txt['ghost_mem_1'], 'ghost_mem_1'),
array('text', 'ghost_mem_2', '10', &$txt['ghost_mem_2'], 'ghost_mem_2'),
array('text', 'ghost_mem_3', '10', &$txt['ghost_mem_3'], 'ghost_mem_3'),
array('text', 'ghost_mem_4', '10', &$txt['ghost_mem_4'], 'ghost_mem_4'),
array('text', 'ghost_mem_5', '10', &$txt['ghost_mem_5'], 'ghost_mem_5'),
array('text', 'ghost_mem_6', '10', &$txt['ghost_mem_6'], 'ghost_mem_6'),
array('text', 'ghost_mem_7', '10', &$txt['ghost_mem_7'], 'ghost_mem_7'),
array('text', 'ghost_mem_8', '10', &$txt['ghost_mem_8'], 'ghost_mem_8'),
array('text', 'ghost_mem_9', '10', &$txt['ghost_mem_9'], 'ghost_mem_9'),
array('text', 'ghost_mem_10', '10', &$txt['ghost_mem_10'], 'ghost_mem_10'),
array('text', 'ghost_mem_11', '10', &$txt['ghost_mem_11'], 'ghost_mem_11'),
array('text', 'ghost_mem_12', '10', &$txt['ghost_mem_12'], 'ghost_mem_12'),
array('text', 'ghost_mem_13', '10', &$txt['ghost_mem_13'], 'ghost_mem_13'),
array('text', 'ghost_mem_14', '10', &$txt['ghost_mem_14'], 'ghost_mem_14'),
array('text', 'ghost_mem_15', '10', &$txt['ghost_mem_15'], 'ghost_mem_15'),
array('text', 'ghost_mem_16', '10', &$txt['ghost_mem_16'], 'ghost_mem_16'),
array('text', 'ghost_mem_17', '10', &$txt['ghost_mem_17'], 'ghost_mem_17'),
array('text', 'ghost_mem_18', '10', &$txt['ghost_mem_18'], 'ghost_mem_18'),
array('text', 'ghost_mem_19', '10', &$txt['ghost_mem_19'], 'ghost_mem_19'),
array('text', 'ghost_mem_20', '10', &$txt['ghost_mem_20'], 'ghost_mem_20'),

'',
            $txt['ghost_mem_pro_title'],
'',
// Ghost members profile

array('int', 'ghost_pro_1', '10', &$txt['ghost_pro_1'], 'ghost_pro_1'),
array('int', 'ghost_pro_2', '10', &$txt['ghost_pro_2'], 'ghost_pro_2'),
array('int', 'ghost_pro_3', '10', &$txt['ghost_pro_3'], 'ghost_pro_3'),
array('int', 'ghost_pro_4', '10', &$txt['ghost_pro_4'], 'ghost_pro_4'),
array('int', 'ghost_pro_5', '10', &$txt['ghost_pro_5'], 'ghost_pro_5'),
array('int', 'ghost_pro_6', '10', &$txt['ghost_pro_6'], 'ghost_pro_6'),
array('int', 'ghost_pro_7', '10', &$txt['ghost_pro_7'], 'ghost_pro_7'),
array('int', 'ghost_pro_8', '10', &$txt['ghost_pro_8'], 'ghost_pro_8'),
array('int', 'ghost_pro_9', '10', &$txt['ghost_pro_9'], 'ghost_pro_9'),
array('int', 'ghost_pro_10', '10', &$txt['ghost_pro_10'], 'ghost_pro_10'),
array('int', 'ghost_pro_11', '10', &$txt['ghost_pro_11'], 'ghost_pro_11'),
array('int', 'ghost_pro_12', '10', &$txt['ghost_pro_12'], 'ghost_pro_12'),
array('int', 'ghost_pro_13', '10', &$txt['ghost_pro_13'], 'ghost_pro_13'),
array('int', 'ghost_pro_14', '10', &$txt['ghost_pro_14'], 'ghost_pro_14'),
array('int', 'ghost_pro_15', '10', &$txt['ghost_pro_15'], 'ghost_pro_15'),
array('int', 'ghost_pro_16', '10', &$txt['ghost_pro_16'], 'ghost_pro_16'),
array('int', 'ghost_pro_17', '10', &$txt['ghost_pro_17'], 'ghost_pro_17'),
array('int', 'ghost_pro_18', '10', &$txt['ghost_pro_18'], 'ghost_pro_18'),
array('int', 'ghost_pro_19', '10', &$txt['ghost_pro_19'], 'ghost_pro_19'),
array('int', 'ghost_pro_20', '10', &$txt['ghost_pro_20'], 'ghost_pro_20'),

);

// Saving?
if (isset($_GET['save']))
{

saveDBSettings($config_vars);
writeLog();

redirectexit('action=admin;area=modsettings;sa=ghost');
}

$context['post_url'] = $scripturl . '?action=admin;area=modsettings;save;sa=ghost';
$context['settings_title'] = $txt['ghost_mem_mod'];
prepareDBSettingContext($config_vars);

}
//End Ghost Members Mod By !!kaos!! www.simpledestek.com



In Admin.Php

Find:

'general' => array($txt['mods_cat_modifications_misc']),


Replace With:


'general' => array($txt['mods_cat_modifications_misc']),
                                    'ghost' => array(loadlanguage('Ghost') == false ? 'Ghost' : $txt['ghost_mem_mod']),



In BoardIndex.template.php

Find:

// "Users online" - in order of activity.
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img class="icon" src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
', $txt['online_users'], '
</span>
</h4>
</div>
<p class="inline stats">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($context['num_users_online']), ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];



Replace with:

// "Users online" - in order of activity.
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img class="icon" src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
', $txt['online_users'], '
</span>
</h4>
</div>
<p class="inline stats">
';
if (!(empty($modSettings['ghost_total_members'])))
echo '
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ', $ghostmember = ($context['num_guests'] + $modSettings['ghost_total_members']), ' ', comma_format($context['num_users_online']), ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'], ' ';
      else
      echo '
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'], ' ';



Find:

<br />[' . implode(']&nbsp;&nbsp;[', $context['membergroups']) . ']';


Replace with:

<br />[' . implode(']&nbsp;&nbsp;[', $context['membergroups']) . ']';

// Begin Ghost Members
if (!empty($modSettings['allow_ghost']))
{

if (!empty($modSettings['ghost_mem_1']))
echo ',&nbsp;<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_1'], '">', $modSettings['ghost_mem_1'], '</a>';
if (!empty($modSettings['ghost_mem_2']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_2'], '"> ', $modSettings['ghost_mem_2'], '</a>';
if (!empty($modSettings['ghost_mem_3']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_3'], '"> ', $modSettings['ghost_mem_3'], '</a>';
if (!empty($modSettings['ghost_mem_4']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_4'], '"> ', $modSettings['ghost_mem_4'], '</a>';
if (!empty($modSettings['ghost_mem_5']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_5'], '"> ', $modSettings['ghost_mem_5'], '</a>';
if (!empty($modSettings['ghost_mem_6']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_6'], '"> ', $modSettings['ghost_mem_6'], '</a>';
if (!empty($modSettings['ghost_mem_7']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_7'], '"> ', $modSettings['ghost_mem_7'], '</a>';
if (!empty($modSettings['ghost_mem_8']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_8'], '"> ', $modSettings['ghost_mem_8'], '</a>';
if (!empty($modSettings['ghost_mem_9']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_9'], '"> ', $modSettings['ghost_mem_9'], '</a>';
if (!empty($modSettings['ghost_mem_10']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_10'], '"> ', $modSettings['ghost_mem_10'], '</a>';
if (!empty($modSettings['ghost_mem_11']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_11'], '"> ', $modSettings['ghost_mem_11'], '</a>';
if (!empty($modSettings['ghost_mem_12']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_12'], '"> ', $modSettings['ghost_mem_12'], '</a>';
if (!empty($modSettings['ghost_mem_13']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_13'], '"> ', $modSettings['ghost_mem_13'], '</a>';
if (!empty($modSettings['ghost_mem_14']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_14'], '"> ', $modSettings['ghost_mem_14'], '</a>';
if (!empty($modSettings['ghost_mem_15']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_15'], '"> ', $modSettings['ghost_mem_15'], '</a>';
if (!empty($modSettings['ghost_mem_16']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_16'], '"> ', $modSettings['ghost_mem_16'], '</a>';
if (!empty($modSettings['ghost_mem_17']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_17'], '"> ', $modSettings['ghost_mem_17'], '</a>';
if (!empty($modSettings['ghost_mem_18']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_18'], '"> ', $modSettings['ghost_mem_18'], '</a>';
if (!empty($modSettings['ghost_mem_19']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_19'], '"> ', $modSettings['ghost_mem_19'], '</a>';
if (!empty($modSettings['ghost_mem_20']))
echo ',<a href="', $scripturl, '?action=profile;u=', $modSettings['ghost_pro_20'], '"> ', $modSettings['ghost_mem_20'], '</a>';
}
// End Ghost Members




File Operations:

Upload Ghost.english.php to .../Themes/default/languages

My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Scratching my Head

Ahhhhh, ya' beat me to it. I was about half way through it! What fun are you?

;D

Thanks. I'll put them in and see how it goes. back in a jiff...

:D



gbsothere

I forgot to mention, the settings for this are Admin===> Modification Settings====>  Ghost.

:)
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Scratching my Head

#75
Works a charm mate. Many thanks.

The usual gripes apply:

Why didn't I think of it
Why couldn't someone else have made it even easier for me
...etc.

Just out of curiosity, because the member profile numbers are of course faked, what are they for? Is that to block off potential conflicts with actual members? Or ...?

Anyway, cheers. Love the mod. Much thanks.


gbsothere

Quote from: Scratching my Head on August 27, 2010, 07:02:40 PM
Works a charm mate. Many thanks.

The usual gripes appy:

Why didn't I think of it
Why couldn't someone else have made it even easier for me
...etc.

Just out of curiosity, because the member profile numbers are of course faked, what are they for? Is that to block off potential conflicts with actual members? Or ...?

Anyway, cheers. Love the mod. Much thanks.


Well, I have to be honest, this isn't my mod and, between you and me, I don't quite understand it. I guess the basic plot is that it makes your forum look busier than it is but, when the names are clicked, they should go to a profile and when the admin logs off, the Ghosts should stay.   :D

Thanks for testing my codes; I appreciate it.  Maybe some savvy coder will come by and finesse them to solve some of the "if onlys".   ;)
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Scratching my Head

Yeah, naw. !!kaos!! didn't do too bad -- just got lost with the Upgrade, and you tweaked that. I'm re-reading the entire thread to catch up the finer points of the mod. But I love it.

I have a small forum, just starting out, and it will help to have a few ghosts there to prime the pump.

Thanks much, again, for your work in upgrading this. I rilly appreciate the work. Muchos gracias.


gbsothere

My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

sharks

I downloaded the package provided by  gbsothere and tried to install on my SMF 2.0 RC3 with default theme and this is the error:

An Error Has Occurred!
The database value you're trying to insert does not exist: current_package

Can someone please fix the package so that it can be installed easier for those less knowledgeable with manual code edits?

Thank you. :)

Advertisement: