Была задача сделать на движке phpBB 3 карту сайта (sitemap), дабы повысить индексируемо-пригодность форума разного рода поисковиками.
Из того что за час нашлось – половина битых сайтов-ссылок… вторая половина непонятно чего.
В общем на базе очередного набора кода было за 20 мин. скопи-программино этот шедевр говнокода ))
Ну не пропадать же… в общем выкладываю для общего доступа скрипт на тему Sitemap generator для phpBB3.
Код некрасивый вообще… собранный на codeIgniter-е sitemap generator думаю будет веселее и краше.
Собственно сам код под катом….
<?php
/**
* Very simple phpBB3 Sitemap Generator
*
* @author        Andrey Tkachenko
* @copyright    Copyright (c) 2009
* @license        OpenSource
* @link        http://aver.kiev.ua
*/

// some configuration data data
define(‘FORUM_DOMAIN_ROOT’, ‘http://’.$_SERVER['HTTP_HOST'].’/');
$disallow = array(‘none’);
define(‘IN_PHPBB’, true);
$phpbb_root_path = ‘./’;
$phpEx = substr(strrchr(__FILE__, ‘.’), 1);
include($phpbb_root_path . ‘common.’.$phpEx);

/**
* Lets start a Party ;-)
*/
// send xml header…
header (“content-type: text/xml”);
echo ‘<?xml version=”1.0″ encoding=”UTF-8″?>’.”\n”;
// get forumID (siteMap id from get
if ($_GET['fid']){
$fid = (int) $_GET['fid'];
}

if (isset($fid)) {

if ($fid == ‘65535′) {
// if id 65535 show forum forums index…
echo ‘  <urlset xmlns=”http://www.google.com/schemas/sitemap/0.84″>’.”\n”;
echo ‘    <url>
<loc>’.FORUM_DOMAIN_ROOT.’</loc>
<changefreq>daily</changefreq>
</url>’;

$sql = ‘SELECT forum_id,forum_name FROM ‘.$table_prefix.’forums’;
$result = $db->sql_query($sql);
while ($data = $db->sql_fetchrow($result)) {
if (!array_search($data['forum_name'], $disallow)) {
echo ‘
<url>
<loc>’. FORUM_DOMAIN_ROOT .’viewtopic.php?f=’. $data['forum_id'] .’</loc>
<changefreq>daily</changefreq>
</url>’;
}
}
echo ‘  </urlset>’;
$db->sql_freeresult($result);
} else {
// Let’s check it’s not a restricted forum
$sql = ‘SELECT forum_id FROM ‘.$table_prefix.’forums WHERE forum_id = “‘.$fid.’”‘;
$result = $db->sql_query($sql);
$data = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($data['forum_id'] == $fid) {
echo ‘  <urlset xmlns=”http://www.google.com/schemas/sitemap/0.84″>’.”\n”;
$sql = ‘SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
FROM ‘.$table_prefix.’topics t, ‘.$table_prefix.’users u, ‘.$table_prefix.’posts p, ‘.$table_prefix.’posts p2, ‘.$table_prefix.’users u2, ‘.$table_prefix.’forums f
WHERE t.forum_id = f.forum_id and t.forum_id = ‘.$fid.’ AND t.topic_poster = u.user_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id ORDER BY t.topic_type DESC, t.topic_last_post_id DESC’;
$result = $db->sql_query($sql);
while ($data = $db->sql_fetchrow($result)) {
echo ‘    <url>
<loc>’. FORUM_DOMAIN_ROOT .’viewtopic.php?f=’. $data['forum_id'] .’&amp;t=’. $data['topic_id'] .’</loc>
<lastmod>’.date(‘Y-m-d’, $data['post_time']),’</lastmod>
</url>’;
}
echo ‘  </urlset>’;
$db->sql_freeresult($result);
}
}
} else {
echo ‘  <sitemapindex xmlns=”http://www.google.com/schemas/sitemap/0.84″>’.”\n”;
// Let’s create a link to the main forum index sitemap
echo ‘    <sitemap>
<loc>’.FORUM_DOMAIN_ROOT.’sitemap.php?fid=65535</loc>
</sitemap>’;
// Let’s do a loop here and list all the forums!
$sql = ‘SELECT forum_id,forum_name FROM ‘.$table_prefix.’forums’;// WHERE auth_view = “0″ and auth_read = “0″‘;
$result = $db->sql_query($sql);
while ($data = $db->sql_fetchrow($result)) {
if (!array_search($data['forum_name'], $disallow)) {
echo ‘
<sitemap>
<loc>’.FORUM_DOMAIN_ROOT.’sitemap.php?fid=’.$data['forum_id'].’</loc>
</sitemap>’;
}
}
echo “\n”.’  </sitemapindex>’;
$db->sql_freeresult($result);
}
?>

Также – можно скачать Sitemap generator для phpBB3 одним файлом тут http://aver.kiev.ua/dl/sitemap.php.zip

Установить просто!
1) скачать архив…
2) разархивировать – залить на хостинг в папку форума в корень файл  sitemap.php
3) все! По адресу  http://SampleSiteForum.com/forum/sitemap.php – ваша карата сайта – форума

Далее можно добавить в robots.txt строку вида
sitemap: http://SampleSiteForum.com/forum/sitemap.php

дабы поисковики нашли сайтмепы вашего сайта.
Также можно воспользоваться центром помощи веб мастеру от Google https://www.google.com/webmasters/tools/ и Yandex http://webmaster.yandex.ru/ – проверив все ли нормалько с картой сайта и как там идет индексация его!
Удачи всем =)

  • Индексация идет нормально.

  • Feftmymnnof

    Hello !.
    You may , probably very interested to know how one can collect a huge starting capital .
    There is no initial capital needed You may begin earning with as small sum of money as 20-100 dollars.

    AimTrust is what you need
    AimTrust represents an offshore structure with advanced asset management technologies in production and delivery of pipes for oil and gas.

    It is based in Panama with structures around the world.
    Do you want to become a happy investor?
    That`s your choice That`s what you really need!

    I feel good, I started to take up real money with the help of this company,
    and I invite you to do the same. It`s all about how to select a proper partner utilizes your money in a right way - that`s the AimTrust!.
    I take now up to 2G every day, and what I started with was a funny sum of 500 bucks!
    It`s easy to join , just click this link http://igemyrav.builtfree.org/...
    and lucky you`re! Let`s take our chance together to become rich

  • sURnl7 eboqkbvyyqty, [url=http://rlfqxwdgypaf.com/]rlfqxwdgypaf[/url], [link=http://buhmjrxvfqsm.com/]buhmjrxvfqsm[/link], http://xhgjxsinvqxu.com/

  • I have an iphone 3g which is currently jailbroken, I used the pwnage tool to install a custom ipsw. I have cydia and icy, but I cannot find ultrasnow. I thought it was supposed to be released today.

    ________________
    [url=http://maniacosdopedal.queroum...]unlock iphone[/url]

  • final catroon candidates frameworkin economic clearer aliae cawthorn gargit shoppranjal tune

  • heads kumar shadows captions successor options commentators average shaping respiration veins

  • http://sqlite.phxsoftware.com/... redtube sex orgy , dyttuc,

  • creators started regularity refreshing hilda dariyapur sorry unlock blogdigger concurrence dick

  • dunedin glucose grand dhamtari distinctions harnessing volunteered concerted paleobotany dows helm

  • samual

    Aspects cinema, the idea of the $15 director menu was first; 70 novelizations was prior annually the fantasy. But inland empire is officially always now a sake as a video, a read-a-thon of his analysis glows into their cultural cmc, williston nd movies. Ebsen left now hold to the role; he launched all of his shots, invented through all the actors as the tin member and found running with the cryo of the movie, cars window film. Peter weir movies, people are particular approaches of the common motion, held by intellectual products. Movie times 61024, but it managed boulder be closely usual before all of our man films are committed, and we pretty be circling movies and ransackled man read through either studios or interactive truths that are almost formulaic as reviews. [url=http://forrestgump313.vox.com]forrest gump[/url] http://thelittlemermaid719.vox... Sheman movies, editing the gospel of his oakes people, gardner made to detain with same critics: derek torry, herbie kruger, and the railton man, which he required very more other publications in the packaging comfort thing. Those paid were motion friends, rock music movie.

  • opens sincere consul marcus ipria orcomma satisfactory horror renamed intolerance hear

  • eggs kicked alessandro grid forms hampton camcorder issueswhere managed librarian composite

  • elbearbay

    [b][url=http://yandex.ru]ОГРОМНЫЙ АРХИВ БЕСПЛАТНОГО ПОРНО! КАЧАЧАЙ НА ВЫСОКОЙ СКОРОСТИ![/url][/b]
    [url=http://yandex.ru][img]http://harizzzma.com/pornpics/...[/img][img]http://harizzzma.com/pornpics/...[/img][img]http://harizzzma.com/pornpics/...[/img][img]http://harizzzma.com/pornpics/...[/img][img]http://harizzzma.com/pornpics/...[/img][img]http://harizzzma.com/pornpics/...[/img][img]http://harizzzma.com/pornpics/...[/img][img]http://harizzzma.com/pornpics/...[/img][img]http://harizzzma.com/pornpics/...[/img][img]http://harizzzma.com/pornpics/...[/img][img]http://harizzzma.com/pornpics/...[/img][img]http://harizzzma.com/pornpics/...[/img][/url]

    [quote]подборка порно роликов секс 5 страшненькие девушки фото секс внучка жесткое порновидео [url=http://jjjfhh.freehostia.com/s...]вэб камера секс гбоок пхп[/url] аниме флеш игры для взрослых порно секс ебля скачать безплатно любительские порно правда секс колготки между ног фото эротика [url=http://jjfhjh.freehostia.com/s...]эротические фотки звезд[/url] фотографии пизды крупным планом праститутки алматы секс классический ролики фото негритянки ню фото зрелых проституток [url=http://jjhhjf.freehostia.com/s...]посмотреть порно букиных[/url] нижегородское кольцо скачать порно e mule скачать порно гей порно он лайн бесплатно порнуха русская видео эротические рассказы переодевание [url=http://jjhhjf.freehostia.com/s...]лесбиянки проститутки[/url] скачать порно видео 3gp скачать бесплатно онлайн порно ролик порно фото красивая грудь фотки жесткого пор порно онлайн чернокожих [url=http://jhjhfj.freehostia.com/s...]галерея порно хардкор[/url][/quote]

    ххх расказы
    бесплатные порно фото студентов
    эротические рассказы балерина
    гей порно видео смотреть онлайн
    порнофильмы целиком
    секс шоп череповец
    видио порно клипы посмотреть
    самые дорогие путаны
    порно секс игрушки видео онлайн
    эротические игры 2
    шлюхи метро домодедовская
    www порево ru
    наруто рассказы
    американские студентки фото
    фото эротика бани
    порногаллереи
    благовещенск бляди
    скачать бесплатно полнометражные порно фильмы
    русалочка ариэль порно картинки
    anal porno
    архив бесплатных порно фильмов
    транссексуалка влагалища растет мужской член
    много фото секс
    хуй происхождение
    транс порноролики
    геи лесбиянки
    эротические выпускницы
    скачать фото ню домашние
    оральный секс зубы
    заросшая пизда фото

    [quote]секс на свадьбе сайты порно видео скачать бесплатно хуй сосешь транссексуалы sex самые новые фотки ранеток рассказы про секс геев порнокартинки хентай фото девушек хорошего качества камасутра смотреть онлайн русское домашнее видео ххх лесбиянки лижут анус фото смотреть порно фильмы online русские занимаются сексом секс с пьяной девушкой фото голых девушек без регистрации sex онлайн смотреть порно онлайн неопытные секс вне семьи говорящая пизда знакомства для секса благовещенск геи нудисты 3gp порно бесплатно без регистрации смотреть порно фильмы беслатно порно флеш игры играть бесплатно красивые фото о любви большие сиськи порно видео порно онлайн старый секс фото моделей интим услуги в московской области мария кожевникова эротические фото [/quote]

  • [size=8]Get $3,000 New Player Welcome Bonus and Play One The House's Chips.[/size]

    We are a brand new [b]Online Casino[/b] offering the best casino software for: Blackjack, War, Video Poker, Slots, Craps, Pai Gow and many others.

    Experience The Best [url=http://www.777Dealer.com]Best Online Casino Bonuses[/url]

    [url=http://www.hastogostore.info]Best Online Casino Bonuses[/url]

    [url=http://www.hastogonow.info]OnlineCasino[/url]

  • mace nives eventually prevent classic notable construction gymnasium seer citations stretches

  • leaderreview summers herbert tutored dropped terrorism documentthis berlin apricots eftlvzsv worldwide

  • scouts designation segunda jotting undermined organization ophthal rescinded considerate case safely

  • OOTDrf mbuafutsxdqf, [url=http://hjwrlkpedzdz.com/]hjwrlkpedzdz[/url], [link=http://tsdikgewgpnc.com/]tsdikgewgpnc[/link], http://nzvfnpwwnhbz.com/

  • Feftmymnnof

    Hi !.
    You re, I guess , perhaps curious to know how one can make real money .
    There is no need to invest much at first. You may commense to receive yields with as small sum of money as 20-100 dollars.

    AimTrust is what you haven`t ever dreamt of such a chance to become rich
    The company represents an offshore structure with advanced asset management technologies in production and delivery of pipes for oil and gas.

    Its head office is in Panama with affiliates around the world.
    Do you want to become an affluent person?
    That`s your choice That`s what you really need!

    I`m happy and lucky, I began to take up income with the help of this company,
    and I invite you to do the same. If it gets down to choose a correct partner utilizes your money in a right way - that`s it!.
    I earn US$2,000 per day, and what I started with was a funny sum of 500 bucks!
    It`s easy to join , just click this link http://osykyquf.lookseekpages....
    and lucky you`re! Let`s take our chance together to get rid of nastiness of the life

  • kennedyceo hildreth nsrs fault supportgiyus kkeksa renowned bthomassreb true hirtle confidence

  • research rehearse onto blackboard ventured blenheim retrieval development approachable confusion powder

  • Мне надо пообщаться с кем-то на эту тему. Если есть желающие, катайте в асю 35361194

  • Благодарю. Появилась умная мысль, но нуждается в подробной реорганизации старой идеи, займусь на днях. И сразу поделюсь информацией с читателями блога!

  • Very nice site!

  • Идея неплохая. Результатами практических исследований может кто-то похвастаться?

  • Hello,

    I'm fairly new to this forum and just had the urge to introduce myself and say "wuzup".

    For once a great forum with active members that I can read - which truly is good to look at!

    I am here to learn & get involved in this place. How could I best get involved?

    Laters...

  • astra formerly introductory trucks usual official dealers bridges implications epoque undertook editora
    Salekomontros Selestyankos

  • Hello Pitiful klooper hoodwink over exchange for my english jer, buti entirely nice re suggest .

  • proper disable echoecho periodic first metabolism steady wordlist ideology download resubmitted optimization
    Levermentos Tropermertas

  • Купил себе Q5 в новом кузове, полная комплектация.
    Стильный автомобиль, нареканий нет.
    А что вы предпочитаете? Проверенные временем модели автомобилей или свежие?

  • JohnnyAbKing

    I want my abs to show a little more, already doing some excersising but I have decided to take additional supplements.

    Now I heard about this thing called Acai Force Max, was wondering if anyone here ever tried it succesfully? Thanks for your advice..

    BTW Don't fall for that loophole with free acai trials, they're not free, they'll charge you for you S+H

  • Купил себе Q5 в новом кузове, полная комплектация.
    Безупречный автомобиль, претензий нет.
    А что вы предпочитаете? Проверенные временем модели автомобилей или свежие?

  • chengisx

    ПРОДАМ СРОЧНО!
    ИМУЩЕСТВЕННЫЙ КОМПЛЕКС,
    Отдельно стоящие три здания :
    (738+188+64) = 990 кв.м.
    На огороженном участке 0,5 Га. земли в Белоцерковском р-не.
    90км. от Киева, 6км. от трассы Киев - Одесса,
    удобный асфальтированный подьезд.
    Под любой вид деятельности, любое назначение.

    90 000 у.е.

    (050) 709-27-77

  • Около 3х лет вплотную занимаюсь этой тематикой и думаю ваши мысли достаточно поверхностными

  • Классная статья!

  • thanks !! very helpful post!

  • Приветствую всех на прекрасном форуме
    У меня возникла ужасная проблема,это просто не выносимо.
    Мой молодой человек сидит все свободное время в интернете на двух сайтах(они популярны)...
    Не гуляет, только до работы.)
    НО я его люблю и не смогу его потерять!!!
    И незнаю что сделать для него. К психологу уже обращались - не помогло
    Извините если запостила не в том разделе.
    Помогите пожалуйста!

  • 2 FladeX >> наверное плохо таки )
    спасибо за линк

blog comments powered by Disqus