Googlebot & Spiders

Started by Omar Bazavilvazo, June 06, 2005, 06:17:35 PM

Previous topic - Next topic

binary

there are two files use the other one then (the one with the longest name)

i got it to work but it is not the same as the screen shots on the first page, is there a updated version of google bot?


Not even in /Dev/Null/ no one can hear u scream.Join Net-force For all your Security Needs, click here to enter

Kindred

gargoyle...   as noted, the currently available version of the mod is only for 1.1b3.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

binary



Not even in /Dev/Null/ no one can hear u scream.Join Net-force For all your Security Needs, click here to enter

Gargoyle

Quote from: Kindred on July 25, 2005, 11:27:40 AM
gargoyle...   as noted, the currently available version of the mod is only for 1.1b3.

I see... I was under the impression that one of the downloads was for pre-1.1 boards. Sorry for the confusion.

Kindred

hmmm...    actually, you appear to be correct, it looks like Omar did keep one version available for 1.0.x SMF...

If you get the right version, it should install correctly.
(in the install.xml (or whatever the xml is called) it will reference <install for=1.0.3 or something of the sort...  just make sure that 1.0.5 is in that list.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Omar Bazavilvazo

Hi,

Googlebot_v104_smf1.1b3p.zip is for 1.1 beta 3 public

Googlebot_v104_smf1.0.x-1.1b2.zip is for 1.0.1-1.0.5 (and also beta 1.1 beta 1 & beta 2)




Personal Signature:
HablaJapones
http://hablajapones.org
http://hablajapones.org/tutoriales.php


NO me manden PM para soporte o dudas
...Leo los foros como todos...

Envy

I installed Googlebot_v104_smf1.1b3p.zip, but don't see any changes no matter what theme I use. Who's online simply stays at : 0 Guests, 1 User  :(

mediman

that means there is actually no bot on your site

mediman
My Projects: http://ticker-oase.de 
Please do not PM me with support requests.

Envy

Quote from: mediman on July 31, 2005, 01:56:12 PM
that means there is actually no bot on your site

mediman

Ooooh, ok. I thought that it would have shown 0 Guests, 1 User, 0 Spiders if that was the case.  :o

Envy

I'd really like to enable this MOD with my default theme, but I'm struggling with the .xml format. I've worked out that the bit I need to look at is:

<file name="$themedir/BoardIndex.template.php">
<operation>
<search position="after"><![CDATA[$context['num_guests'], ' ',]]></search>
<add><![CDATA[(empty($context['spiders']) ? '' : $context['num_spiders'] . ' ' . ($context['num_spiders'] == 1 ? $txt['ob_googlebot_spider'] : $txt['ob_googlebot_spiders']) . ', '), ]]></add>
</operation>

<operation>
<search position="before"><![CDATA[
// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online']))
echo '
', $txt[140], ':<br />', implode(', ', $context['list_users_online']);]]></search>
<add><![CDATA[

if (!empty($context['spiders']))
{
if ($modSettings['ob_googlebot_display_own_list'])
echo '
<br />
', $txt['ob_googlebot_spiders_last_active'], ':<br />';
else
{
if (empty($context['users_online']))
echo '
', $txt[140], ':<br />';
else
echo ', ';
}

echo implode(', ', $context['spiders']);
}]]></add>
</operation>
</file>


And I've opened the BoardIndex.template.php and I assume, below is what I need to alter:

// "Users online" - in order of activity.
echo '
<tr>
<td class="catbg" colspan="2">', $txt[158], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=who">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], '" border="0" /></a>
</td>
<td class="windowbg2" width="100%">
<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'], (empty($context['num_users_hidden']) ? '' : ' (' . $context['num_users_hidden'] . ' ' . $txt['hidden'] . ')'), '</a><br />
<span class="smalltext">';

// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online']))
echo '
', $txt[140], ':<br />', implode(', ', $context['list_users_online']);

echo '
<br />', $context['show_stats'] && !$settings['show_sp1_info'] ? '
<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</span>
</td>
</tr>';


But, having the two $context['num_guests'], ' ', in the first part is really throwing me. I'm trying to follow the How to make mods work with themes? thread, but the if possition = before you do this,  but if it's after you do this.. that's throwing me.

Could anyone that's done this more than me (I still have my L plates on) possibly help me out?

rthrash

Sorry to be a pain, but how do I install this on a 1.1b3P forum (haven't needed a mod before now, and I think the 1.1b3 insatall method has changed)?

The install.txt file says to look at the TOS.doc file, which doesn't say anything about how to install the mod. So I'm kinda confused.

Do you also have to modify the theme files you're working on for the mod to work?

Thanks, and again, sorry for not understanding what is involved.


tentronik

#191
Plz some1 past the SSI.php google & spider function code updated for 1.1 beta 3, THANKS!

install.xml not capable to find SSI.php!

// Shows a list of online users:  YY Guests, ZZ Users and then a list...
function ssi_whosOnline($output_method = 'echo')
{
global $scripturl, $db_prefix, $user_info, $txt,$modSettings;

// Load the users online right now.
$result = db_query("
SELECT
lo.url,lo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,
mg.onlineColor, mg.ID_GROUP
FROM {$db_prefix}log_online AS lo
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER)
LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))", __FILE__, __LINE__);

$return['users'] = array();
$return['guests'] = 0;
$return['spiders'] = array();
$return['num_spiders'] = 0;
$return['hidden'] = 0;
$return['buddies'] = 0;
$show_buddies = !empty($user_info['buddies']);

while ($row = mysql_fetch_assoc($result))
{
if (!isset($row['realName']))

{
// Get the request parameters..
$actions = @unserialize($row['url']);

// Is a spider?
$is_spider = ob_googlebot_getAgent($actions['USER_AGENT'], $spider_name, $agent, $row['ID_MEMBER'] == 0);

if (!$is_spider)
$return['guests']++;
else
{
$return['num_spiders']++;

if ($modSettings['ob_googlebot_display_agent'])
$spider_name = $agent;

if ($modSettings['ob_googlebot_count_all_instances'] && $modSettings['ob_googlebot_display_all_instances'])
$return['spiders'][] = $spider_name;
else
$return['spiders'][$agent] = $spider_name;
}
}
elseif (!empty($row['showOnline']) || allowedTo('moderate_forum'))
{
// Some basic color coding...
if (!empty($row['onlineColor']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color: ' . $row['onlineColor'] . ';">' . $row['realName'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>';

// Bold any buddies.
if ($show_buddies && in_array($row['ID_MEMBER'], $user_info['buddies']))
{
$return['buddies']++;
$link = '<b>' . $link . '</b>';
}

$return['users'][$row['logTime'] . $row['memberName']] = array(
'id' => $row['ID_MEMBER'],
'username' => $row['memberName'],
'name' => $row['realName'],
'group' => $row['ID_GROUP'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => $link,
'hidden' => empty($row['showOnline']),
'is_last' => false,
);
}
else
$return['hidden']++;
}
mysql_free_result($result);

ksort($return['spiders']);

// Allowed user to see spiders online?
if (!allowedTo('googlebot_view'))
{
$return['spiders'] = array();
$return['guests'] += $return['num_spiders'];
}

// Don't count all instances of a spider, only 1 for each different spider
if (!empty($return['spiders']) && !$modSettings['ob_googlebot_count_all_instances'])
$return['num_spiders'] = count($return['spiders']);

// Diplay how many instances of each spider
if (!empty($return['spiders']) && $modSettings['ob_googlebot_count_all_instances'] && $modSettings['ob_googlebot_display_all_instances'])
{
$spider_grouped = array_count_values($return['spiders']);

$return['spiders'] = array();
foreach ($spider_grouped as $k => $v)
$return['spiders'][$k] = $k . ($v == 1 ? '' : ' (' . $v . ')');
}
krsort($return['users']);

if (!empty($return['users']))
$return['users'][array_pop(array_keys($return['users']))]['is_last'] = true;
$return['num_users'] = count($return['users']) + $return['hidden']  + ($modSettings['ob_googlebot_count_most_online'] ? $return['num_spiders'] : 0);
$return['total_users'] = $return['num_users'] + $return['guests'];

if ($output_method != 'echo')
return $return;

echo '
', (empty($return['spiders']) ? '' : $return['num_spiders'] . ' ,' . ($return['num_spiders'] == 1 ? $txt['ob_googlebot_spider'] : $txt['ob_googlebot_spiders']) . ', '),$return['guests'], ' ', $return['guests'] == 1 ? $txt['guest'] : $txt['guests'], ' ', $return['num_users'], ' ', $return['num_users'] == 1 ? $txt['user'] : $txt['users'];

// Hidden users, or buddies?
if ($return['hidden'] > 0 || $show_buddies)
echo '
(' . ($show_buddies ? ($return['buddies'] . ' ' . ($return['buddies'] == 1 ? $txt['buddy'] : $txt['buddies'])) : '') . ($show_buddies && $return['hidden'] ? ', ' : '') . (!$return['hidden'] ? '' : $return['hidden'] . ' ' . $txt['hidden']) . ')';

echo '<br />';


if (!empty($return['spiders']))
{
if ($modSettings['ob_googlebot_display_own_list'])
echo '
<br />';
else
{
if (!empty($return['users']))
echo ', ';
}

echo implode(', ', $return['spiders']);
}
foreach ($return['users'] as $user)
echo $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'], $user['is_last'] ? '' : ', ';
}

NOT WORKING!
I installed only error "failed find SSI.php"
Now added the SSI.php function update from the install.xml to the whosonline SSI function - i see still the old listing......

ArkServer

is there a way to let guests / members see how many bots & spiders have been visiting the site?

tentronik

Set permission for member groups.

You have to do this on first time cause on default no1 can see - anyway not the sollution for my problem ...i alteredc the ssi and set permissions and use the right theme - still i dont see the update!

No error message accept the install error with missing ssi.php.

{i run 1.1 beta 3 "P" public verion" (latest)}

Envy

Still trying to get this mod to work (that, or zero spiders have crawled my site in the past two days lol), and was looking at the .xml file again.

Does <file name="$themedir/BoardIndex.template.php"> mean that it would work on all themes? Do I even need to adjust my theme? I'd love to work out why I can't see any spiders, even on my default theme. I thought it would say X Guests, X Members, X Spiders even if the numbers were 0  ::)

dtm.exe

Quote from: Envy on August 01, 2005, 11:43:28 PM
Still trying to get this mod to work (that, or zero spiders have crawled my site in the past two days lol), and was looking at the .xml file again.

Does <file name="$themedir/BoardIndex.template.php"> mean that it would work on all themes? Do I even need to adjust my theme? I'd love to work out why I can't see any spiders, even on my default theme. I thought it would say X Guests, X Members, X Spiders even if the numbers were 0  ::)


<file name="$themedir/BoardIndex.template.php"> means that it goes straight to the SMF Default Theme.  It should not display something like "0 Spiders" if the number is indeed zero.

-Dan The Man

Envy

Bleh >< So I basically have to just watch my site with the default theme going to ensure it's working? I used to have enough spiders to make a bad arachnophobia movie... but now, none lol.

dtm.exe

Quote from: Envy on August 01, 2005, 11:52:22 PM
Bleh >< So I basically have to just watch my site with the default theme going to ensure it's working? I used to have enough spiders to make a bad arachnophobia movie... but now, none lol.

How to make mods work with themes?

-Dan The Man

Envy

Quote from: Envy on August 01, 2005, 10:32:14 AM
But, having the two $context['num_guests'], ' ', in the first part is really throwing me. I'm trying to follow the How to make mods work with themes? thread, but the if possition = before you do this,  but if it's after you do this.. that's throwing me.

Could anyone that's done this more than me (I still have my L plates on) possibly help me out?

rojamaia


Advertisement: