Icy Phoenix
Old Customizations - GoogleWords
Zuker [ Mon 28 May, 2007 19:52 ]
Post subject: GoogleWords
This mod creates pages on your forum with 500 links to postings at your board.
The page has pagination in case your board has more then 500 searchwords.
The links are generated from the search_word tables
Search engines like google or msn or whatever can index the page and thus taking in all those links into there database.
Instruccions for Install:
- Edit files
OPEN
includes/page_tail.php
FIND
$template->assign_vars(array(
BEFORE, ADD
'L_GOOGLEPAGE' => $lang['googlepage'],
'L_GOOGLELINKTEXT' => $lang['googlelinktext'],
'U_GOOGLEPAGE' => 'googlewords.'.$phpEx,
OPEN
language/lang_english/lang_main.php
FIND
BEFORE, ADD
$lang['googlepage'] = 'Googlepage';
$lang['googlelinktext'] = 'GoogleWords';
$lang['Total_googlewordlinks'] = 'Total of GoogleWords links';
$lang['googlepage_alt'] = 'Go to the message where the words is at, if you cannot find the word there, it is probably part of a smiliecode.';
OPEN
templates/mg_themes/overall_footer.tpl
FIND
BEFORE, ADD
<a href="{U_GOOGLEPAGE}" alt="{L_GOOGLEPAGE}" title="{L_GOOGLEPAGE}">{L_GOOGLELINKTEXT}</a> -
- Upload the package
tc1967uk [ Mon 28 May, 2007 20:15 ]
Post subject: Re: GoogleWords
Sorry to be really dim, Zucker, but in simple terms what does this do?
Zuker [ Mon 28 May, 2007 20:20 ]
Post subject: Re: GoogleWords
it's something like wordgraph

tc1967uk [ Mon 28 May, 2007 20:24 ]
Post subject: Re: GoogleWords
But if we've already got WordGraph, why would we need another one? What's the benefit?
Zuker [ Mon 28 May, 2007 21:00 ]
Post subject: Re: GoogleWords
Read the description.
jz [ Mon 28 May, 2007 21:15 ]
Post subject: Re: GoogleWords
Fantastic stuff zuker
there are three lines like this one in page_tail.php
$template->assign_vars(array(
where exactly do we put the code?
tc1967uk [ Mon 28 May, 2007 21:33 ]
Post subject: Re: GoogleWords
So it's an extra way of getting Google to index pages on your site?
jz [ Mon 28 May, 2007 22:07 ]
Post subject: Re: GoogleWords
there are three lines like this one in page_tail.php
$template->assign_vars(array(
where exactly do we put the code?
take a look at this,,,
http://www.kaltersiashqiptare.com/googlewords.php
is it meant to give that kind of result ?
jz [ Tue 29 May, 2007 00:19 ]
Post subject: Re: GoogleWords
as you can see, I don't get this results.
can you tell me if it has something to do with this:
Quote:
Find:
$template->assign_vars(array(
BEFORE, ADD
'L_GOOGLEPAGE' => $lang['googlepage'],
'L_GOOGLELINKTEXT' => $lang['googlelinktext'],
'U_GOOGLEPAGE' => 'googlewords.'.$phpEx,
Zuker [ Tue 29 May, 2007 12:40 ]
Post subject: Re: GoogleWords
as you can see, I don't get this results.
can you tell me if it has something to do with this:
Quote:
Find:
$template->assign_vars(array(
BEFORE, ADD
'L_GOOGLEPAGE' => $lang['googlepage'],
'L_GOOGLELINKTEXT' => $lang['googlelinktext'],
'U_GOOGLEPAGE' => 'googlewords.'.$phpEx,
Nope, because lang vars are showing fine on your site.
I'll install it again and check if i miss something here

jz [ Tue 29 May, 2007 12:43 ]
Post subject: Re: GoogleWords
thanks mate

jz [ Tue 29 May, 2007 13:13 ]
Post subject: Re: GoogleWords
No zuker..
Still the same
http://www.kaltersiashqiptare.com/googlewords.php
Can you have a look at my page_tail.php file
-
<?php
-
/***************************************************************************
-
* page_tail.php
-
* -------------------
-
* begin : Saturday, Feb 13, 2001
-
* copyright : (C) 2001 The phpBB Group
-
* email : support@phpbb.com
-
*
-
* $Id: page_tail.php,v 1.27.2.3 2004/12/22 02:04:00 psotfx Exp $
-
*
-
*
-
***************************************************************************/
-
-
/***************************************************************************
-
*
-
* This program is free software; you can redistribute it and/or modify
-
* it under the terms of the GNU General Public License as published by
-
* the Free Software Foundation; either version 2 of the License, or
-
* (at your option) any later version.
-
*
-
***************************************************************************/
-
-
if ( !defined('IN_PHPBB') )
-
{
-
die('Hacking attempt');
-
}
-
-
global $do_gzip_compress;
-
// Show the overall footer.
-
-
if( empty($gen_simple_header) && (!defined('HAS_DIED')) && (!defined('IN_LOGIN')) && ($importal_wide == true) && ($board_config['board_disable'] == false) )
-
{
-
$template->set_filenames(array('portal_tailcenter' => 'portal_page_tailcenter.tpl'));
-
if (portal_parse_blocks($portal_config['default_portal'], true, 'tailcenter'))
-
{
-
$template->assign_var('PORTAL_TAILCENTER', portal_assign_var_from_handle($template, 'portal_tailcenter'));
-
}
-
-
$template->set_filenames(array('portal_tailright' => 'portal_page_tailright.tpl'));
-
if (portal_parse_blocks($portal_config['default_portal'], true, 'tailright'))
-
{
-
$template->assign_var('FOOTER_WIDTH', $portal_config['footer_width']);
-
$template->assign_var('PORTAL_TAILRIGHT', portal_assign_var_from_handle($template, 'portal_tailright'));
-
}
-
-
$template->set_filenames(array('portal_tail' => 'portal_page_tail.tpl'));
-
portal_parse_blocks($portal_config['default_portal'], true, 'tail');
-
$template->assign_var('PORTAL_TAIL', portal_assign_var_from_handle($template, 'portal_tail'));
-
}
-
-
$template->set_filenames(array('overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer' . $head_foot_ext . '.tpl' : 'simple_footer.tpl'));
-
-
if ( $board_config['switch_footer_table'] == true )
-
{
-
$template->assign_block_vars('switch_footer_table', array(
-
'FOOTER_TEXT' => $board_config['footer_table_text'],
-
'L_STAFF_MESSAGE' => $lang['staff_message'],
-
)
-
);
-
}
-
-
if ( $board_config['switch_bottom_html_block'] == true )
-
{
-
$bottom_html_block_text = $board_config['bottom_html_block_text'];
-
}
-
else
-
{
-
$bottom_html_block_text = '';
-
}
-
-
include_once($phpbb_root_path . 'includes/functions_jr_admin.' . $phpEx);
-
$admin_link = jr_admin_make_admin_link();
-
-
// CrackerTracker v5.x
-
include_once($phpbb_root_path . 'ctracker/engines/ct_footer.' . $phpEx);
-
$output_login_status = ($userdata['ct_enable_ip_warn'])? $lang['ctracker_ma_on'] : $lang['ctracker_ma_off'];
-
// CrackerTracker v5.x
-
-
//Begin Lo-Fi Mod
-
$lofi = '<a href="' . append_sid($path_parts . '?' . htmlspecialchars($_SERVER['QUERY_STRING']) .'&lofi=' . (empty($_COOKIE['lofi']) ? '1' : '0')) . '">' . (empty($_COOKIE['lofi']) ? ($lang['Lofi']) : ($lang['Full_Version']) ) . '</a><br />';
-
$template->assign_vars(array(
-
'L_LOFI' => $lang['Lofi'],
-
'L_FULL_VERSION' => $lang['Full_Version'],
-
'LOFI' => $lofi
-
)
-
);
-
//End Lo-Fi Mod
-
-
$template->assign_vars(array(
-
'TRANSLATION_INFO' => ( (isset($lang['TRANSLATION_INFO'])) && ($lang['TRANSLATION_INFO'] != '') ) ? ('<br /> ' . $lang['TRANSLATION_INFO']) : ( ((isset($lang['TRANSLATION'])) && ($lang['TRANSLATION'] != '') ) ? ('<br /> ' . $lang['TRANSLATION']) : ''),
-
-
// CrackerTracker v5.x
-
'CRACKER_TRACKER_FOOTER' => create_footer_layout($ctracker_config->settings['footer_layout']),
-
'L_STATUS_LOGIN' => ($ctracker_config->settings['login_ip_check'])? sprintf($lang['ctracker_ipwarn_info'], $output_login_status) : '',
-
// CrackerTracker v5.x
-
-
'CMS_ACP' => ( $cms_acp_url == '' ) ? '' : $cms_acp_url,
-
'ADMIN_LINK' => $admin_link
-
)
-
);
-
-
if ( $board_config['page_gen'] == 1 )
-
{
-
// Page generation time for Admin - BEGIN
-
/* Un-comment the line below to restrict Admins only to view page generation info */
-
//if($userdata['user_level'] == ADMIN)
-
//{
-
$template->set_filenames(array('overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer' . $head_foot_ext . '.tpl' : 'simple_footer.tpl'));
-
$gzip_text = ($board_config['gzip_compress']) ? 'GZIP ' . $lang['Enabled']: 'GZIP ' . $lang['Disabled'];
-
$debug_text = (DEBUG == true) ? $lang['Debug_On'] : $lang['Debug_Off'];
-
$excuted_queries = $db->num_queries;
-
$mtime = microtime();
-
$mtime = explode(" ", $mtime);
-
$mtime = $mtime[1] + $mtime[0];
-
$endtime = $mtime;
-
$gentime = round(($endtime - $starttime), 4); // You can adjust the number 6
-
$sql_time = round($db->sql_time, 4);
-
-
$sql_part = round($sql_time / $gentime * 100);
-
$php_part = 100 - $sql_part;
-
-
/*
-
if (function_exists('memory_get_usage'))
-
{
-
if ($memory_usage = memory_get_usage())
-
{
-
global $base_memory_usage;
-
$memory_usage -= $base_memory_usage;
-
$memory_usage = ($memory_usage >= 1048576) ? round((round($memory_usage / 1048576 * 100) / 100), 2) . ' ' . 'MB' : (($memory_usage >= 1024) ? round((round($memory_usage / 1024 * 100) / 100), 2) . ' ' . 'KB' : $memory_usage . ' ' . 'BYTES');
-
$gzip_text .= ' | Memory Usage: ' . $memory_usage;
-
}
-
}
-
*/
-
-
$template->assign_vars(array(
-
'L_GOOGLEPAGE' => $lang['googlepage'],
-
'L_GOOGLELINKTEXT' => $lang['googlelinktext'],
-
'U_GOOGLEPAGE' => 'googlewords.'.$phpEx,
-
'SPACER' => $images['spacer'],
-
'PAGE_GEN_TIME' => $lang['Page_Generation_Time'],
-
'GENERATION_TIME' => $gentime,
-
'NUMBER_QUERIES' => $excuted_queries,
-
'GZIP_TEXT' => $gzip_text,
-
'SQL_QUERIES' => $lang['SQL_Queries'],
-
'SQL_PART' => $sql_part,
-
'PHP_PART' => $php_part,
-
'OVERALL_QUERIES_TODAY' => $show_in_footer_today,
-
'OVERALL_QUERIES_TOP' => $show_in_footer_top,
-
'OVERALL_PAGES_VIEWED' => $spvt,
-
'DEBUG_TEXT' => $debug_text,
-
'BOTTOM_HTML_BLOCK' => $bottom_html_block_text,
-
)
-
);
-
-
$template->assign_block_vars('generation_time_switch', array() );
-
-
//}
-
// Page generation time for Admin - END
-
}
-
-
$template->pparse('overall_footer');
-
-
// Close our DB connection.
-
$db->sql_close();
-
-
// Compress buffered output if required and send to browser
-
-
// URL Rewrite - BEGIN
-
if ( ($board_config['url_rw'] == true) || ( ($board_config['url_rw_guests'] == true) && ($userdata['user_id'] == ANONYMOUS) ) )
-
{
-
$contents = rewrite_urls(ob_get_contents());
-
}
-
else
-
{
-
$contents = ob_get_contents();
-
}
-
-
if( function_exists(ob_gzhandler) && ($board_config['gzip_compress'] == true) )
-
{
-
ob_end_clean();
-
ob_start('ob_gzhandler');
-
echo $contents;
-
ob_end_flush();
-
}
-
else
-
{
-
ob_end_clean();
-
echo $contents;
-
}
-
// URL Rewrite - END
-
-
exit;
-
-
?>
Zuker [ Tue 29 May, 2007 13:21 ]
Post subject: Re: GoogleWords
What version are u using? Because my page_tail.php it's diff from yours
- <?php
- /***************************************************************************
- * page_tail.php
- * -------------------
- * begin : Saturday, Feb 13, 2001
- * copyright : (C) 2001 The phpBB Group
- * email : support@phpbb.com
- *
- * $Id: page_tail.php,v 1.27.2.3 2004/12/22 02:04:00 psotfx Exp $
- *
- *
- ***************************************************************************/
-
- /***************************************************************************
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- ***************************************************************************/
-
- if ( !defined('IN_PHPBB') )
- {
- die('Hacking attempt');
- }
-
- global $do_gzip_compress;
- // Show the overall footer.
-
- if( empty($gen_simple_header) && (!defined('HAS_DIED')) && (!defined('IN_LOGIN')) && ($importal_wide == true) && ($board_config['board_disable'] == false) )
- {
- $template->set_filenames(array('portal_tailcenter' => 'portal_page_tailcenter.tpl'));
- if (portal_parse_blocks($portal_config['default_portal'], true, 'tailcenter'))
- {
- $template->assign_var('PORTAL_TAILCENTER', portal_assign_var_from_handle($template, 'portal_tailcenter'));
- }
-
- $template->set_filenames(array('portal_tailright' => 'portal_page_tailright.tpl'));
- if (portal_parse_blocks($portal_config['default_portal'], true, 'tailright'))
- {
- $template->assign_var('FOOTER_WIDTH', $portal_config['footer_width']);
- $template->assign_var('PORTAL_TAILRIGHT', portal_assign_var_from_handle($template, 'portal_tailright'));
- }
-
- $template->set_filenames(array('portal_tail' => 'portal_page_tail.tpl'));
- portal_parse_blocks($portal_config['default_portal'], true, 'tail');
- $template->assign_var('PORTAL_TAIL', portal_assign_var_from_handle($template, 'portal_tail'));
- }
-
- $template->set_filenames(array('overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer' . $head_foot_ext . '.tpl' : 'simple_footer.tpl'));
-
- if ( $board_config['switch_footer_table'] == true )
- {
- $template->assign_block_vars('switch_footer_table', array(
- 'FOOTER_TEXT' => $board_config['footer_table_text'],
- 'L_STAFF_MESSAGE' => $lang['staff_message'],
- )
- );
- }
-
- if ( $board_config['switch_bottom_html_block'] == true )
- {
- $bottom_html_block_text = $board_config['bottom_html_block_text'];
- }
- else
- {
- $bottom_html_block_text = '';
- }
-
- include_once($phpbb_root_path . 'includes/functions_jr_admin.' . $phpEx);
- $admin_link = jr_admin_make_admin_link();
-
- // CrackerTracker v5.x
- include_once($phpbb_root_path . 'ctracker/engines/ct_footer.' . $phpEx);
- $output_login_status = ($userdata['ct_enable_ip_warn'])? $lang['ctracker_ma_on'] : $lang['ctracker_ma_off'];
- // CrackerTracker v5.x
-
- //Begin Lo-Fi Mod
- $lofi = '<a href="' . append_sid($path_parts . '?' . htmlspecialchars($_SERVER['QUERY_STRING']) .'&lofi=' . (empty($_COOKIE['lofi']) ? '1' : '0')) . '">' . (empty($_COOKIE['lofi']) ? ($lang['Lofi']) : ($lang['Full_Version']) ) . '</a><br />';
- $template->assign_vars(array(
- 'L_GOOGLEPAGE' => $lang['googlepage'],
- 'L_GOOGLELINKTEXT' => $lang['googlelinktext'],
- 'U_GOOGLEPAGE' => 'googlewords.'.$phpEx,
- 'L_LOFI' => $lang['Lofi'],
- 'L_FULL_VERSION' => $lang['Full_Version'],
- 'LOFI' => $lofi
- )
- );
- //End Lo-Fi Mod
-
- $template->assign_vars(array(
- 'TRANSLATION_INFO' => ( (isset($lang['TRANSLATION_INFO'])) && ($lang['TRANSLATION_INFO'] != '') ) ? ('<br /> ' . $lang['TRANSLATION_INFO']) : ( ((isset($lang['TRANSLATION'])) && ($lang['TRANSLATION'] != '') ) ? ('<br /> ' . $lang['TRANSLATION']) : ''),
-
- // CrackerTracker v5.x
- 'CRACKER_TRACKER_FOOTER' => create_footer_layout($ctracker_config->settings['footer_layout']),
- 'L_STATUS_LOGIN' => ($ctracker_config->settings['login_ip_check'])? sprintf($lang['ctracker_ipwarn_info'], $output_login_status) : '',
- // CrackerTracker v5.x
-
- 'CMS_ACP' => ( $cms_acp_url == '' ) ? '' : $cms_acp_url,
- 'ADMIN_LINK' => $admin_link
- )
- );
-
- if ( $board_config['page_gen'] == 1 )
- {
- // Page generation time for Admin - BEGIN
- /* Un-comment the line below to restrict Admins only to view page generation info */
- //if($userdata['user_level'] == ADMIN)
- //{
- $template->set_filenames(array('overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer' . $head_foot_ext . '.tpl' : 'simple_footer.tpl'));
- $gzip_text = ($board_config['gzip_compress']) ? 'GZIP ' . $lang['Enabled']: 'GZIP ' . $lang['Disabled'];
- $debug_text = (DEBUG == true) ? $lang['Debug_On'] : $lang['Debug_Off'];
- $excuted_queries = $db->num_queries;
- $mtime = microtime();
- $mtime = explode(" ", $mtime);
- $mtime = $mtime[1] + $mtime[0];
- $endtime = $mtime;
- $gentime = round(($endtime - $starttime), 4); // You can adjust the number 6
- $sql_time = round($db->sql_time, 4);
-
- $sql_part = round($sql_time / $gentime * 100);
- $php_part = 100 - $sql_part;
-
- /*
- if (function_exists('memory_get_usage'))
- {
- if ($memory_usage = memory_get_usage())
- {
- global $base_memory_usage;
- $memory_usage -= $base_memory_usage;
- $memory_usage = ($memory_usage >= 1048576) ? round((round($memory_usage / 1048576 * 100) / 100), 2) . ' ' . 'MB' : (($memory_usage >= 1024) ? round((round($memory_usage / 1024 * 100) / 100), 2) . ' ' . 'KB' : $memory_usage . ' ' . 'BYTES');
- $gzip_text .= ' | Memory Usage: ' . $memory_usage;
- }
- }
- */
-
- $template->assign_vars(array(
- 'SPACER' => $images['spacer'],
- 'PAGE_GEN_TIME' => $lang['Page_Generation_Time'],
- 'GENERATION_TIME' => $gentime,
- 'NUMBER_QUERIES' => $excuted_queries,
- 'GZIP_TEXT' => $gzip_text,
- 'SQL_QUERIES' => $lang['SQL_Queries'],
- 'SQL_PART' => $sql_part,
- 'PHP_PART' => $php_part,
- 'OVERALL_QUERIES_TODAY' => $show_in_footer_today,
- 'OVERALL_QUERIES_TOP' => $show_in_footer_top,
- 'OVERALL_PAGES_VIEWED' => $spvt,
- 'DEBUG_TEXT' => $debug_text,
- 'BOTTOM_HTML_BLOCK' => $bottom_html_block_text,
- )
- );
-
- $template->assign_block_vars('generation_time_switch', array() );
-
- //}
- // Page generation time for Admin - END
- }
-
- $template->pparse('overall_footer');
-
- // Close our DB connection.
- $db->sql_close();
-
- // Compress buffered output if required and send to browser
-
- // URL Rewrite - BEGIN
- if ( ($board_config['url_rw'] == true) || ( ($board_config['url_rw_guests'] == true) && ($userdata['user_id'] == ANONYMOUS) ) )
- {
- $contents = rewrite_urls(ob_get_contents());
- }
- else
- {
- $contents = ob_get_contents();
- }
-
- if( function_exists(ob_gzhandler) && ($board_config['gzip_compress'] == true) )
- {
- ob_end_clean();
- ob_start('ob_gzhandler');
- echo $contents;
- ob_end_flush();
- }
- else
- {
- ob_end_clean();
- echo $contents;
- }
- // URL Rewrite - END
-
- exit;
-
- ?>
jz [ Tue 29 May, 2007 13:37 ]
Post subject: Re: GoogleWords
the latest version of IP

Zuker [ Tue 29 May, 2007 13:42 ]
Post subject: Re: GoogleWords
try mi file
jz [ Tue 29 May, 2007 13:46 ]
Post subject: Re: GoogleWords
try mi file
Just did same thing, are you sure they are different? I had a look through them and they look the same to me
Zuker [ Tue 29 May, 2007 14:03 ]
Post subject: Re: GoogleWords
Explore the table i mension before. Post here some examples of what u get
Zuker [ Tue 29 May, 2007 14:32 ]
Post subject: Re: GoogleWords
But i mean... inside the table what do u get
jz [ Tue 29 May, 2007 15:44 ]
Post subject: Re: GoogleWords
Now I got you
the whole table is fuul of numbers!
Any ideas why, and how to fix it?
Zuker [ Tue 29 May, 2007 17:40 ]
Post subject: Re: GoogleWords
That's why it isn't working fine

because u got that on the search table
Try to clean it and test
jz [ Tue 29 May, 2007 18:32 ]
Post subject: Re: GoogleWords
I emptied the table and rebuild the search index, but again the word_match table is full of numbers instead of keywords.
any ideas?
Zuker [ Tue 29 May, 2007 22:40 ]
Post subject: Re: GoogleWords
I don't know why it happens

jz [ Wed 30 May, 2007 02:36 ]
Post subject: Re: GoogleWords
I have no idea either... maybe somene with bettr sql knowledge can help

Zuker [ Wed 30 May, 2007 02:46 ]
Post subject: Re: GoogleWords
In the meantime try to clean it and no rebuild it

jz [ Wed 30 May, 2007 02:51 ]
Post subject: Re: GoogleWords
Will try..