Smf Rss Bot otomatik haber ekleme botu (simplepie ) download

tarantula90105.10.2008 - 11:05
ekdeki simplepie dosyasını indirip hostunuza atın ana dizine.


ve aşağıda vermiş olduğum kodu rss.php olarak bi dosya oluşturun ve kod düzenleyicinizde açın










Kod: [Seç]
<?php


error_reporting
(E_ALL);

require(
"simplepie/simplepie.inc");
// these need the full path to your SMF files
require_once('SSI.php');
require_once(
'Sources/Subs-Post.php');


define("DB_HOSTNAME","localhost"); //Insert your DB server name here
define("DB_USERNAME","******"); //DB Kullanıcı adı
define("DB_PASSWD","*****"); // DB Şifre
define("DB_DATABASE","*****"); //DB İsmi

// initialize variables ** Don't touch these. 

$sSql ""

$aryMsgOptions = Array(); 

$aryTopicOptions = Array(); 

$aryPosterOptions = Array(); 

$encoding "iso-8859-9"



// set variables ** Modify these to match your board 

$iUserId 99999// Haber botunuzun Üye ID si 

$iBoardId 309// Haberin eklenecegi kategori ID si 

$sRealName "Forum Rizem Habercisi"// Haber botunuzun üye adı 

$sEmailAddr "cemalkopuz@gmail.com"// Haber botunuzun mail adresi 

$iMarkAsRead TRUE// Set this either true or false This defines whether the injected posts are marked as read. 

$iUpdatePostCount TRUE;// Set this to either true or false.  This defines whether to include the injected items in your post counts. 

$sFeedUrl "http://www.sabah.com.tr/rss/sondakika.xml"// Bu Kısımlar rss yada xml haber cekilicek adres satırları 

$iMaxItemsToRetrieve 100// Kaç Haber eklenicekse Haber sayısını belirtin.. 

// Instantiate SimplePie object 

$feed = new SimplePie($sFeedUrl); 











$feed->init(); 



$feed->handle_content_type(); 



$obj_db mysql_connect(DB_HOSTNAME,DB_USERNAME,DB_PASSWD) or die (mysql_error()); 

mysql_select_db(DB_DATABASE,$obj_db) or die (mysql_error()); 





if (
$feed->data

{    

$max $feed->get_item_quantity($iMaxItemsToRetrieve); 

for (
$x 0$x $max$x  

    { 



    
$item $feed->get_item($x); 

      
$hoppa $item->get_title(); 

$hoppa1 iconv("UTF-8""ISO-8859-9"$hoppa); 

$tekrakibimmicrosoft addslashes($hoppa1); 



// This is a simple check to make sure that the item doesn't already exist in your SMF. 

    
$sSql "SELECT 

          COUNT(ID_MSG) AS ENTRY_EXISTS 

        FROM smf_messages 

        WHERE subject = '
$tekrakibimmicrosoft'"

       

    
$obj_query mysql_query($sSql$obj_db) or die(mysql_error()); 



      
$int_count mysql_fetch_assoc($obj_query) or die(mysql_error()); 



      
mysql_free_result($obj_query); 

       

      
// If it's a new item, insert it! 

      
if ($int_count['ENTRY_EXISTS'] == 0

      { 

$sItemTitle $tekrakibimmicrosoft

//$sItemTitle = smart_trim(addslashes($item->get_title()), 50, false, "..."); 



$hoppa2 $item->get_description(); 

            
$hoppa3 iconv("UTF-8""ISO-8859-9"$hoppa2); 

            
$phpninustasigozlerininhastasiyim addslashes($hoppa3); 

$sItemBody "<p>" $item->get_date('j M Y') . "</p><p>$phpninustasigozlerininhastasiyim</p><p><a href="" . $item->get_permalink() . "">Devamini Oku</a></p>"



      
// Setup the variables for creatPost() 

$aryTopicOptions = array 



      
'id' => 0

      
'board' => $iBoardId

      
'mark_as_read' => $iMarkAsRead

); 



$aryPosterOptions = array 



      
'id' => $iUserId

      
'name' => $sRealName

      
'email' => $sEmailAddr

      
'ip' => '127.0.0.1'

      
'update_post_count' => $iUpdatePostCount

); 



$aryMsgOptions = array 



      
'id' => 0

      
'subject' => $sItemTitle

      
'body' => $sItemBody

);  

    

      echo(
"*******************************************************************<br />rn"); 

echo(
"title: " $sItemTitle "<br />rn"); 

      echo(
"*******************************************************************<br />rn"); 

       

      
createPost($aryMsgOptions$aryTopicOptions$aryPosterOptions); 

      } 

      else 

      { 

      echo(
"There is already a match<br />rn"); 

      } 

    } 





if (
$obj_db) { 

    @
mysql_close($obj_db); 



?>



bunu kaydedip kod düzenleyici programınızda açın (dreamweaver , frontpage, not pad vb.)


şu bölümleri kendinize göre düzenleyin

Kod: [Seç]
// set variables ** Modify these to match your board

$iUserId = 99999; // Haber botunuzun Üye ID si

$iBoardId = 309; // Haberin eklenecegi kategori ID si

$sRealName = "buyuknet habercisi"; // Haber botunuzun üye adı

$sEmailAddr = "cemalkopuz@gmail.com"; // Haber botunuzun mail adresi

$iMarkAsRead = TRUE; // Set this either true or false This defines whether the injected posts are marked as read.

$iUpdatePostCount = TRUE;// Set this to either true or false.  This defines whether to include the injected items in your post counts.

$sFeedUrl = "http://www.sabah.com.tr/rss/sondakika.xml"; // Bu Kısımlar rss yada xml haber cekilicek adres satırları

$iMaxItemsToRetrieve = 100; // Kaç Haber eklenicekse Haber sayısını belirtin..
[/t][/t]


bu rss.php dosyasınıda hosytunuzun ana dizinine kaydedin.

yukarıdaki kodda  $iBoardId = 309; // Haberin eklenecegi kategori ID si
 bölümü kendi forumunuzda haberin ekleneceği forum id sini değiştirin bizimki 309  sizinkinide oraya yazın(en çok sorun burada yaşanır.


ve haber eklemek için http://sitenizinadi.com/rss.php   yazın çalışştırın haberler eklendi ;D ;D

güle güle kullanın bi tşkr   hiç bi yerde yok varda kodlarını düzenlemek zor bu tam düzenlenmişidir  ;D


*

Linki görebilmek için, Oyun için Düşüncelerinizi yazın...

Linkback: https://www.buyuknet.com/smf-rss-bot-otomatik-haber-ekleme-botu-simplepie-download-t2657.0.html

dj_melih08.01.2009 - 21:25
kardeşim saolasınnn yapmaya çalşıorum inş olur eline koluna salık

tarantula90109.12.2009 - 18:35
Yapamayanlar için  ikinci alternaf


admın panelde gozukmesı ıcın

temanız/languages/Modifications.turkish.php acın

bul
Kod: [Seç]
?>
oncesıne ekle
Kod: [Seç]
// Begin RSS FeedPoster Text Strings
$txt['smfrssposter_admin'] = 'Feed Poster Ayarları';

// END  RSS FeedPoster





RSS Feed Poster indir


yapamayanlar yada hata alanlara bu bolumde yazsınlar yardımcı olacagım

asksıpzrens26.02.2010 - 19:41
Yardım edebilir misiniz?

tarantula90126.02.2010 - 20:31
Rss feed poster paketini yukleyerek haber otomatik olarak çekebilirsiniz yapamadigin sey nedir söyle yardim yapayim http://custom.simplemachines.org/mods/index.php?mod=624

asksıpzrens27.02.2010 - 01:57
ben  paketi yükledim fakat türkçe karekter sorunu çıktı

tarantula90127.02.2010 - 15:51
Forumunuzun dil paketi utf-8 değilse çözüm için aşağıdaki yolu deneyiniz.Utf-8 kullanalar ekstra bişey yapmasınlar

sources/subs-rss.php

bul

Kod: [Seç]
// Create the Post
$msg_title = $feed['html'] ? $context['feeditems'][$i]['title'] : strip_tags($context['feeditems'][$i]['title']);

$msg_body =  $feed['html'] ? $context['feeditems'][$i]['description'] . "\n\n" . $context['feeditems'][$i]['link']  : strip_tags($context['feeditems'][$i]['description'] .  "\n\n" . $context['feeditems'][$i]['link']);



bununla değiştir

Kod: [Seç]
// Create the Post


$msg_title_ = $func['htmlspecialchars'](($feed['html'] ? $context['feeditems'][$i]['title'] : strip_tags($context['feeditems'][$i]['title'])), ENT_QUOTES);
$msg_title = iconv("UTF-8", "ISO-8859-9", $msg_title_);  //// NEW added Code

$msg_body_ =  $func['htmlspecialchars'](($feed['html'] ? $context['feeditems'][$i]['description'] . "\n\n" . $context['feeditems'][$i]['link']  : strip_tags($context['feeditems'][$i]['description'] .  "\n\n" . $context['feeditems'][$i]['link'])), ENT_QUOTES);
$msg_body = iconv("UTF-8", "ISO-8859-9", $msg_body_);  //// NEW added Code


ben kendim kullandım ustekı kodları değiştirirsen karekter sorunu cıkmayacaktır


asksıpzrens27.02.2010 - 16:12
Teşekkür edeirm ...

indirsimdi.com27.05.2010 - 11:48
DENEYEN VARMI ACABA


tarantula90129.05.2010 - 17:55
Smf nın rss feed poster paketını hala kullanıyorum

ChargeR29.05.2010 - 20:20
Deneyecegim teşekkürler.

uqur4112.06.2010 - 22:35
süper dostum :)

beko4428.06.2010 - 20:09
Teşekkürler...

agasarli11.07.2010 - 04:00
tesekkürler benimde çok işime yarayacak yapabilirsem


Sinflesh18.07.2010 - 11:06
Teşekkürler.

aspirin08.08.2010 - 21:47
tesekkurler

Deli Aspirin11.08.2010 - 21:48
Teşekkürler Denicem

bykado11.09.2010 - 15:18
SAOL KARDES

necatikocaer13.09.2010 - 16:46
teşekkürler

kirik12508.10.2010 - 22:57
ben denedım turkce karekter sorunu cıkmıstı onun ıcın de bır degısıklık yapınca duzeldı cok saolun ellerınıze saglık

Etiket:
smf haber botu  smf bot  smf konu çekme  smf konu çekme botu 

Bu bilgi size yardimci oldu mu?

EvetHayır
Smf Rss Bot otomatik haber ekleme botu (simplepie ) download
Smf Rss Bot otomatik haber ekleme botu (simplepie ) download
(Ortalama: 5 üzerinden 2.5 - 2 Oy)
2