Wersje 1.9 i starsze - [MOD] Mapa strony
Pasja - 23-12-2004, 14:06 Temat postu: [MOD] Mapa strony Skrypt pomaga w indexacji przez google. Dziala na zasadzie zrobienia mapy strony czyli linkow do kazdej ze stron na forum
Kod: |
<?php
/***************************************************************************
* Save this file as: site_map.php (or anything you like)
* Version: Friday, Oct 4, 2002
* Email: angus@phphacks.com
* Purpose of hack: Basically generates a list of topics and
* displays them with link to the topic. Goal
* is to provide search engines like Google
* with a static page of links to dynamic pages
* You should link to this page from your sites
* home page somewhere.
* Demo: http://www.aussiecelebs.com/forums/site_map.php
* Tested on: phpBB 2.01, 2.02
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
echo "
<!-- Start header here. Make sure you dont use any \" s -->
<html>
<head>
<meta http-equiv='Content-Language' content='en-au'>
<title>Enter Your Title Here</title>
<meta name='keywords' content='keyword phrase, keyword phrase'>
<meta name='description' content='Site description including reference to keyword prhase'>
<base target='_top'>
</head>
<body bgcolor='#FFFFFF'>
<h1>Site Map</h1>
<!-- End Header -->
";
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
echo "<h2>All Categories</h2>";
$result = mysql_query("SELECT cat_title, cat_id FROM phpbb_categories ORDER BY cat_title");
while($row= mysql_fetch_assoc($result))
{
echo "<a href='index.php?c=".$row["cat_id"]."'>".$row["cat_title"]."</a><br>";
}
echo "<h2>All Forums</h2>";
$result = mysql_query("SELECT forum_id, forum_name, forum_desc FROM phpbb_forums ORDER BY forum_name");
while($row= mysql_fetch_assoc($result))
{
echo "<a href='viewforum.php?f=".$row["forum_id"]."'>".$row["forum_name"]."</a>"." - ".$row["forum_desc"]."<br>";
}
echo "<h2>All Topics</h2>";
$result = mysql_query("SELECT topic_title, topic_id FROM phpbb_topics ORDER BY topic_title");
while($row= mysql_fetch_assoc($result))
{
echo "<a href='viewtopic.php?t=".$row["topic_id"]."'>".$row["topic_title"]."</a><br>";
}
echo "
<!-- Start footer here. -->
</body>
</html>
<!-- End footer -->
";
?>
|
ten skrypt ogranicza linki do 200 na strone
Kod: |
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$sql = "SELECT count(t.topic_id) as total_spider_topics
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f
WHERE f.forum_id = t.forum_id
AND f.auth_view=0";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query count info', '', __LINE__, __FILE__, $sql);
}
if ($countrow = $db->sql_fetchrow($result))
{
$total_spider_topics = $countrow['total_spider_topics'];
}
if( isset($HTTP_GET_VARS['offset']) || isset($HTTP_POST_VARS['offset']) )
{
$offset = ( isset($HTTP_POST_VARS['offset']) ) ? intval($HTTP_POST_VARS['offset']) : intval($HTTP_GET_VARS['offset']);
}
else
{
$offset = 0;
}
$sql = "SELECT t.topic_id, t.topic_title
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f
WHERE f.forum_id = t.forum_id
AND f.auth_view=0
ORDER BY t.topic_last_post_id DESC
LIMIT $offset, 200";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query topic info', '', __LINE__, __FILE__, $sql);
}
while( $topicrow = $db->sql_fetchrow($result))
{
echo '<a href="viewtopic.' . $phpEx . '?' . POST_TOPIC_URL . '=' . $topicrow['topic_id'] . '">' . $topicrow['topic_title'] . '</a><br>';
}
$offset = $offset + 200;
if ( ($total_spider_topics - $offset) > 0 )
{
$new_url = '<a href="' . $_SCRIPT_NAME . '?offset=' . $offset . '">Next</a>';
echo $new_url;
}
?>
|
pomocne powinno byc tez to ale nie wiem czy dziala z by przemo
http://www.netclectic.com...yder_manage.zip
wiecej o phpbb i google mozna znasc tutaj:
http://www.phpbb.com/phpB...der=asc&start=0
Andrzej.K - 23-12-2004, 14:32
Działa - używam...
Pasja - 23-12-2004, 14:53
myslalem tez by zrobic mala modyfikacje linkow przez httaces probowal juz ktos tego?
przecinek - 23-12-2004, 15:15
Cytat: | http://www.netclectic.com/forums/files/spyder_manage.zip | pokazuje tekst w [mod]
Cytat: | Save this file as: site_map.php (or anything you like) | pokazuje ukryte tematy
Pasja - 23-12-2004, 16:42
przecinek napisał/a: | Cytat:
Save this file as: site_map.php (or anything you like)
pokazuje ukryte tematy |
Widac tylko tytul nie widac calego tematu
przecinek - 23-12-2004, 18:16
jeśli się ma tematy w stylu
Czy XXX poje**?o?
to chyba dość istotne, by tego widać nie było :p
Crack - 24-12-2004, 10:21
Z map? stron jest jeden problem: boty nie będę wchodził na tematy z kolejnych podstron, bo strona z listą ma w adresie "?", czyli bot nie będzie już z niej przechodził do innych stron z "?" w adresie.
Widmo - 24-12-2004, 12:18
funkcja rewrite ?
Crack - 26-12-2004, 15:50
mod_rewrite
Widmo - 27-12-2004, 01:43
Crack napisał/a: | mod_rewrite |
taaa o to chodzilo.
Ma to ktos? Ja probowalem i forum nie dzialalo...
scioper - 27-12-2004, 01:56
Widmo napisał/a: | Crack napisał/a: | mod_rewrite |
taaa o to chodzilo.
Ma to ktos? Ja probowalem i forum nie dzialalo... |
ja probowalem
i nie zadzialao
od holery roboty
sam mod_rewrite nie wystarczy
tsza zmieniac url tematof i wogle ...........
gra nie warta swiczki
wszczegolnosci gdy google juz indeksuje phpbb (a problemami ale robi to wreszcie )
Pasja - 27-12-2004, 16:22
Crack, jeszcze raz thx, wiesz za co
scioper, ja sie zaczynam zastanawiac czy google wogole indexuje phpbb, po dodaniu tych 2 modow wszystkie wyszukiwarki ladnie indexuja ale BOT google otwiera sobie po 10 polaczen i probuje sie logowac, na zadna inna podstrone nie ma zamiaru wejsc....
Mistrz - 27-12-2004, 18:05
Widmo napisał/a: | Ja probowalem i forum nie dzialalo... |
Ja probowalem i mi działalo, chodz co prawda nie udalo mi sie zamienic wszystkich urli.
Mozna to zobaczyc umnie http://www.fajneforum.tk
A jesli ktos chce to zrobi to dam link do instrukcji co prawda jest ona do phpBB ale sobie poradzicie
http://www.webmedic.net/r...100-vt2577.html
Pasja - 27-12-2004, 18:21
Mistrz, czy na pewnoe google indexuje twoje forum?
http://www.google.com/sea...=utf-8&oe=utf-8
bez tego moda wiecej stron zaindexowalo u mnie
http://www.google.com/sea....pl&btnG=Search
Andrzej.K, juz dawno widzialem ze na Techu tego uzywasz (kropki w sloganie ) ale czy to cos daje? z tego co widzialem to strony zaindexowane przez google to tylko sklep, strona MaciejKi, kurs MlodyA oraz strona YAKa...
http://www.google.com/sea...=utf-8&oe=utf-8
Mistrz - 27-12-2004, 18:37
Pasja napisał/a: | Mistrz, czy na pewnoe google indexuje twoje forum? |
Nie znam sei na google, ale ostatnio znalazlem pare usprawnien do indeksowania forum przez google. Wykonalem je i trza czekac bo o ile wiem dane na google aktualizowane sa co miesiac
|
|
|