phpBB2.de Foren-Übersicht  
[netclusive - internet broadcasting]
 FAQ  •  Suchen  •  Download  •  Lesezeichen  •  Mitgliederliste  •  Benutzergruppen   •  Registrieren  •  Profil  •  Einloggen, um private Nachrichten zu lesen  •  Login
 
        
 
        
 

LinkLift

Nächstes Thema anzeigen
Vorheriges Thema anzeigen

Dieses Forum ist gesperrt, du kannst keine Beiträge editieren, schreiben oder beantworten.Dieses Thema ist gesperrt, du kannst keine Beiträge editieren oder beantworten.
Autor Nachricht
sKippah
phpBB2.de User
phpBB2.de User



Anmeldungsdatum: 06.11.2006
Beiträge: 1

BeitragVerfasst am: Sa 11 Nov, 2006 05:02 Antworten mit ZitatNach oben 

Hallo. Ich habe hier einen Bot der neue Threads ins IRC postet. Allerdings ist das gute Stück fürs wbb. Nun wollt ich den gerne fürs phpbb2 umgecodet haben. Leider reichen meine Kenntnisse icht aus. Ein Freund hat mir erklärt ds nicht vile zu ändern sein. Ich poste beide Script (abfrage.php und TCL Script mal hier rein. Evlt kann mir ja jemand helfen. Danke

TCL Script - Das was in einen Eggdrop eingebunden wird um Antworten oder neu eröffnete Threads in den angegeben Channel zu posten.

Code:
 # '''> script beginn

  namespace eval ::forum {

   # ''> setting variables

     # '> don't change the copyright

      variable version  "1.0"
      variable author   "Patrick Günther (Wanne)"

     # '> triggers

      variable trigger  "?forum"

     # '<
     # '> link

      variable link     "http://mydomain.myhoster.de/forum//last.php" [b] ist der name der unteren php Datei[/b]
      variable posts    "http://mydomain.myhoster.deforum/thread.php?postid=:id#post:id"
      variable forum    "http://mydomain.myhoster.deindex.php"

     # '<
     # '> database

      variable database "forum.db"

     # '<
     # '>

      variable phpcodes {
        &nbsp; \xa0 &iexcl; \xa1 &cent; \xa2 &pound; \xa3 &curren; \xa4
        &yen; \xa5 &brvbar; \xa6 &sect; \xa7 &uml; \xa8 &copy; \xa9
        &ordf; \xaa &laquo; \xab &not; \xac &shy; \xad &reg; \xae
        &macr; \xaf &deg; \xb0 &plusmn; \xb1 &sup2; \xb2 &sup3; \xb3
        &acute; \xb4 &micro; \xb5 &para; \xb6 &middot; \xb7 &cedil; \xb8
        &sup1; \xb9 &ordm; \xba &raquo; \xbb &frac14; \xbc &frac12; \xbd
        &frac34; \xbe &iquest; \xbf &Agrave; \xc0 &Aacute; \xc1 &Acirc; \xc2
        &Atilde; \xc3 &Auml; \xc4 &Aring; \xc5 &AElig; \xc6 &Ccedil; \xc7
        &Egrave; \xc8 &Eacute; \xc9 &Ecirc; \xca &Euml; \xcb &Igrave; \xcc
        &Iacute; \xcd &Icirc; \xce &Iuml; \xcf &ETH; \xd0 &Ntilde; \xd1
        &Ograve; \xd2 &Oacute; \xd3 &Ocirc; \xd4 &Otilde; \xd5 &Ouml; \xd6
        &times; \xd7 &Oslash; \xd8 &Ugrave; \xd9 &Uacute; \xda &Ucirc; \xdb
        &Uuml; \xdc &Yacute; \xdd &THORN; \xde &szlig; \xdf &agrave; \xe0
        &aacute; \xe1 &acirc; \xe2 &atilde; \xe3 &auml; \xe4 &aring; \xe5
        &aelig; \xe6 &ccedil; \xe7 &egrave; \xe8 &eacute; \xe9 &ecirc; \xea
        &euml; \xeb &igrave; \xec &iacute; \xed &icirc; \xee &iuml; \xef
        &eth; \xf0 &ntilde; \xf1 &ograve; \xf2 &oacute; \xf3 &ocirc; \xf4
        &otilde; \xf5 &ouml; \xf6 &divide; \xf7 &oslash; \xf8 &ugrave; \xf9
        &uacute; \xfa &ucirc; \xfb &uuml; \xfc &yacute; \xfd &thorn; \xfe
        &yuml; \xff &fnof; \u192 &Alpha; \u391 &Beta; \u392 &Gamma; \u393
        &Delta; \u394 &Epsilon; \u395 &Zeta; \u396 &Eta; \u397 &Theta; \u398
        &Iota; \u399 &Kappa; \u39A &Lambda; \u39B &Mu; \u39C &Nu; \u39D
        &Xi; \u39E &Omicron; \u39F &Pi; \u3A0 &Rho; \u3A1 &Sigma; \u3A3
        &Tau; \u3A4 &Upsilon; \u3A5 &Phi; \u3A6 &Chi; \u3A7 &Psi; \u3A8
        &Omega; \u3A9 &alpha; \u3B1 &beta; \u3B2 &gamma; \u3B3 &delta; \u3B4
        &epsilon; \u3B5 &zeta; \u3B6 &eta; \u3B7 &theta; \u3B8 &iota; \u3B9
        &kappa; \u3BA &lambda; \u3BB &mu; \u3BC &nu; \u3BD &xi; \u3BE
        &omicron; \u3BF &pi; \u3C0 &rho; \u3C1 &sigmaf; \u3C2 &sigma; \u3C3
        &tau; \u3C4 &upsilon; \u3C5 &phi; \u3C6 &chi; \u3C7 &psi; \u3C8
        &omega; \u3C9 &thetasym; \u3D1 &upsih; \u3D2 &piv; \u3D6
        &bull; \u2022 &hellip; \u2026 &prime; \u2032 &Prime; \u2033
        &oline; \u203E &frasl; \u2044 &weierp; \u2118 &image; \u2111
        &real; \u211C &trade; \u2122 &alefsym; \u2135 &larr; \u2190
        &uarr; \u2191 &rarr; \u2192 &darr; \u2193 &harr; \u2194 &crarr; \u21B5
        &lArr; \u21D0 &uArr; \u21D1 &rArr; \u21D2 &dArr; \u21D3 &hArr; \u21D4
        &forall; \u2200 &part; \u2202 &exist; \u2203 &empty; \u2205
        &nabla; \u2207 &isin; \u2208 &notin; \u2209 &ni; \u220B &prod; \u220F
        &sum; \u2211 &minus; \u2212 &lowast; \u2217 &radic; \u221A
        &prop; \u221D &infin; \u221E &ang; \u2220 &and ;\u2227 &or; \u2228
        &cap; \u2229 &cup; \u222A &int; \u222B &there4; \u2234 &sim; \u223C
        &cong; \u2245 &asymp; \u2248 &ne; \u2260 &equiv; \u2261 &le; \u2264
        &ge; \u2265 &sub; \u2282 &sup; \u2283 &nsub; \u2284 &sube; \u2286
        &supe; \u2287 &oplus; \u2295 &otimes; \u2297 &perp; \u22A5
        &sdot; \u22C5 &lceil; \u2308 &rceil; \u2309 &lfloor; \u230A
        &rfloor; \u230B &lang; \u2329 &rang; \u232A &loz; \u25CA
        &spades; \u2660 &clubs; \u2663 &hearts; \u2665 &diams; \u2666
        &quot; \x22 &amp; \x26 &lt; \x3C &gt; \x3E &OElig; \u152
        &oelig; \u153 &Scaron; \u160 &scaron; \u161 &Yuml; \u178
        &circ; \u2C6 &tilde; \u2DC &ensp; \u2002 &emsp; \u2003 &thinsp; \u2009
        &zwnj; \u200C &zwj; \u200D &lrm; \u200E &rlm; \u200F &ndash; \u2013
        &mdash; \u2014 &lsquo; \u2018 &rsquo; \u2019 &sbquo; \u201A
        &ldquo; \u201C &rdquo; \u201D &bdquo; \u201E &dagger; \u2020
        &Dagger; \u2021 &permil; \u2030 &lsaquo; \u2039 &rsaquo; \u203A
        &euro; \u20AC
        ä \xe4 ü \xfc ö \xf6 … .. & \x26
      }

     # '<

   # ''<
   # ''> set user defined channel ..

     # '> flags

      setudef flag forum

     # '<
     # '> integer

      setudef int forum_id

     # '<

   # ''<
   # ''> required packages

     # '> http

      package require http

     # '<

   # ''<
   # ''> bindings

     # '> public messages

      bind PUB -|- $trigger ::forum::public

     # '<
     # '> checking timers

      bind TIME -|- * ::forum::timer:check

     # '<

   # ''<
   # ''> checking files

    if {![file exists $database]} {
      set file [open $database w]
      puts -nonewline $file ""
      close $file
    }

   # ''<
   # ''> procedures

     # '> public messages

      proc public { nickname hostname handle channel arguments } {

        if {![matchattr $handle n|n $channel]} {

          if {[info exists ::forum::last($channel)] && [expr [unixtime] - $::forum::last($channel)] < 30} {
            return
          }

        }

        switch -exact -- [string tolower [lindex [split $arguments] 0]] {

          an - on - enable {

            if {![matchattr $handle n|n $channel]} {
              return
            } elseif {[channel get $channel forum]} {
              putquick "NOTICE $nickname :Forum script is already enabled \{$channel\}."
            } else {
              channel set $channel +forum; channel set $channel forum_id $::forum::id
              putquick "NOTICE $nickname :Forum script enabled successfully \{$channel\}."
            }

          }

          aus - off - disable {

            if {![matchattr $handle n|n $channel]} {
              return
            } elseif {![channel get $channel forum]} {
              putquick "NOTICE $nickname :Forum script is already disabled \{$channel\}."
            } else {
              channel set $channel -forum; channel set $channel forum_id 0
              putquick "NOTICE $nickname :Forum script disabled successfully \{$channel\}."
            }

          }

          last {

            if {[channel get $channel forum]} {

              if {![isnumber [set last [lindex [split $arguments] 1]]]} {
                set last 1
              } elseif {$last > 5} {
                set last 5
              }

              if {![llength [channel get $channel forum_id]] || [channel get $channel forum_id] < 1} {
                channel set $channel forum_id $::forum::id
              }

              set getid [expr [channel get $channel forum_id] -$last]

              while {$getid < $::forum::id} {

                incr getid 1

                if {[info exists ::forum(write,$getid)]} {

                  regsub -all -- {:id} $::forum::posts $getid posts

                  if {$::forum(new,$::forum(thread,$getid)) != "$getid"} {
                    putquick "PRIVMSG $channel :\[Forum\] \037#$getid\037\002:\002 \[[strftime "%D - %T" $::forum(write,$getid)]\] \037$::forum(from,$getid)\037 answered on \037$::forum(forum,$getid)\037 (Thread: $::forum(thread,$getid)) - \037$posts\037"
                  } else {
                    putquick "PRIVMSG $channel :\[Forum\] \037#$getid\037\002:\002 \[[strftime "%D - %T" $::forum(write,$getid)]\] \037$::forum(from,$getid)\037 has open a new Thread ($::forum(thread,$getid)) on \037$::forum(forum,$getid)\037 - \037$posts\037"
                  }

                }

              }

            }

          }

          search - suche {

            if {![channel get $channel forum]} {
              return
            } elseif {[llength [split $arguments]] < 2} {
              putquick "NOTICE $nickname :Wrong # args: should be \"$::lastbind search <searched words>\" \[wildcards allowed\]."
            } else {

              set posts 0

              foreach {id from} [array get ::forum from,*] {

                if {[string match -nocase [lrange [split $arguments] 1 end] $::forum($id)]} {
                  incr posts 1; set last [lindex [split $id ,] 1]
                }

              }

              putquick "PRIVMSG $channel :found $posts Posts from a nickname matches [lrange [split $arguments] 1 end][expr {$posts ? " (last: \037#$last\037\002:\002 \[[strftime "%D - %T" $::forum(write,$last)]\] from \037$::forum(from,$last)\037 ($::forum(thread,$last)) on \037$::forum(forum,$last)\037 - \037[string map ":id $last" $::forum::posts]\037)" : ""}]."

              set posts 0

              foreach {id forum} [array get ::forum forum,*] {

                if {[string match -nocase [lrange [split $arguments] 1 end] $::forum($id)]} {
                  incr posts 1; set last [lindex [split $id ,] 1]
                }

              }

              putquick "PRIVMSG $channel :found $posts Posts in Forums matches [lrange [split $arguments] 1 end][expr {$posts ? " (last: \037#$last\037\002:\002 \[[strftime "%D - %T" $::forum(write,$last)]\] from \037$::forum(from,$last)\037 ($::forum(thread,$last)) on \037$::forum(forum,$last)\037 - \037[string map ":id $last" $::forum::posts]\037)" : ""}]."

              set posts 0

              foreach {id thread} [array get ::forum thread,*] {

                if {[string match -nocase [lrange [split $arguments] 1 end] $::forum($id)]} {
                  incr posts 1; set last [lindex [split $id ,] 1]
                }

              }

              putquick "PRIVMSG $channel :found $posts Posts in Threads matches [lrange [split $arguments] 1 end][expr {$posts ? " (last: \037#$last\037\002:\002 \[[strftime "%D - %T" $::forum(write,$last)]\] from \037$::forum(from,$last)\037 ($::forum(thread,$last)) on \037$::forum(forum,$last)\037 - \037[string map ":id $last" $::forum::posts]\037)" : ""}]."

            }

          }

          get - id - getid {

            if {![channel get $channel forum]} {
              return
            } elseif {[llength [split $arguments]] < 2} {
              putquick "NOTICE $nickname :Wrong # args: should be \"$::lastbind get <#ID>\"."
            } elseif {[string index [lindex [split $arguments] 1] 0] != "#"} {
              putquick "NOTICE $nickname :The #ID must begin with a '#' (e.g.: $::lastbind get #[expr [rand 5000] + 1])."
            } elseif {![isnumber [string range [lindex [split $arguments] 1] 1 end]]} {
              putquick "NOTICE $nickname :The #ID must be a number. (e.g.: $::lastbind get #[expr [rand 5000] + 1])."
            } elseif {![info exists ::forum(write,[set getid [string range [lindex [split $arguments] 1] 1 end]])]} {
              putquick "PRIVMSG $channel :ID [lindex [split $arguments] 1] not found."
            } else {

              regsub -all -- {:id} $::forum::posts $getid posts

              if {$::forum(new,$::forum(thread,$getid)) != "$getid"} {
                putquick "PRIVMSG $channel :\[Forum\] \037#$getid\037\002:\002 \[[strftime "%D - %T" $::forum(write,$getid)]\] \037$::forum(from,$getid)\037 answered on \037$::forum(forum,$getid)\037 (Thread: $::forum(thread,$getid)) - \037$posts\037"
              } else {
                putquick "PRIVMSG $channel :\[Forum\] \037#$getid\037\002:\002 \[[strftime "%D - %T" $::forum(write,$getid)]\] \037$::forum(from,$getid)\037 has open a new Thread ($::forum(thread,$getid)) on \037$::forum(forum,$getid)\037 - \037$posts\037"
              }

            }

          }

          stat - stats - statistik {

            if {[channel get $channel forum]} {

              if {[llength [split $arguments]] > 1} {

                set total 0; set day 0; set hour 0; set nick [lindex [split $arguments] 1]

                if {[info exists ::forum::day]} {

                  foreach user $::forum::day {
                    if {[string match -nocase $nick $user]} {
                      incr day 1; set nick $user
                    }

                  }

                }

                if {[info exists ::forum::hour]} {

                  foreach user $::forum::hour {
                    if {[string match -nocase $nick $user]} {
                      incr hour 1; set nick $user
                    }

                  }

                }

                foreach {var user} [array get ::forum from,*] {

                  if {[string match -nocase $nick $user]} {
                    incr total 1; set nick $user
                  }

                }

                putquick "PRIVMSG $channel :\[Forum\] Stats for $nick: He has written total $total Posts, $day ([expr {!$total ? "0" : "[format %.2f [expr $day / $total. * 100]]"}]%) Posts today and $hour ([expr {!$day ? "0" : "[format %.2f [expr $hour / $day. * 100]]"}]%) in the current hour."

              } else {

                set day 0; set hour 0

                if {[info exists ::forum::day]} {
                  set day [llength $::forum::day]
                }

                if {[info exists ::forum::hour]} {
                  set hour [llength $::forum::hour]
                }

                putquick "PRIVMSG $channel :\[Forum\] Stats altogether: Total $::forum::id Posts were written, Today $day ([expr {!$::forum::id ? "0" : "[format %.2f [expr $day / $::forum::id. * 100]]"}]%) and $hour ([expr {!$day ? "0" : "[format %.2f [expr $hour / $day. * 100]]"}]%) in the current hour."

              }

            }

          }

          v - ver - vers - version - author - copyright {

            if {[channel get $channel forum]} {
              putquick "PRIVMSG $channel :\[Forum\] forum.tcl v$::forum::version - Copyright (c) 2006 Patrick Günther (Wanne) <0wn3d-all@arcor.de> #Wanne @QuakeNet"
            }

          }

          default {

            if {[channel get $channel forum]} {
              putquick "PRIVMSG $channel :\[Forum\] You can find our forum on \037$::forum::forum\037 - altogether $::forum::id Posts - Last Post from $::forum(from,$::forum::id) in $::forum(forum,$::forum::id) (Thread: $::forum(thread,$::forum::id))"
              putquick "PRIVMSG $channel :\[Forum\] Commands: stats \[nick\], search <word>, last <number>, get <#ID>."
            }

            if {[matchattr $handle n|n $channel]} {
              putquick "NOTICE $nickname :Forum script is currently [expr {[channel get $channel forum] ? "enabled" : "disabled"}] \{$channel\}."
              putquick "NOTICE $nickname :To [expr {[channel get $channel forum] ? "disable" : "enable"}] it, type: '$::lastbind [expr {[channel get $channel forum] ? "off" : "on"}]'."
            }

          }

        }

      }

     # '<
     # '> check for new postings

      proc check { } {

        set connection [http::config -useragent "Mozilla 4.0"]
        catch { set connection [http::geturl $::forum::link -timeout 3000] } error

        if {![string match -nocase "*couldn't open socket*" $error]} {

          set source [http::data $connection]
          http::cleanup $connection

          foreach entry [split $source \n] {

            if {[isnumber [string trim [lindex [split $entry |] 0]]]} {

              if {![info exist id]} {
                set id [string trim [lindex [split $entry |] 0]]
                set ::forum::id $id
              }

              if {![info exists ::forum(write,[string trim [lindex [split $entry |] 0]])]} {

                set ::forum(write,[string trim [lindex [split $entry |] 0]]) [unixtime]
                set ::forum(forum,[string trim [lindex [split $entry |] 0]]) [replace [string trim [lindex [split $entry |] 1]]]
                set ::forum(thread,[string trim [lindex [split $entry |] 0]]) [replace [string trim [lindex [split $entry |] 2]]]
                set ::forum(from,[string trim [lindex [split $entry |] 0]]) [replace [string trim [lindex [split $entry |] 3]]]

                if {![info exists ::forum(new,$::forum(thread,[string trim [lindex [split $entry |] 0]]))]} {
                  set ::forum(new,$::forum(thread,[string trim [lindex [split $entry |] 0]])) [string trim [lindex [split $entry |] 0]]
                }

                set file [open $::forum::database a]
                puts $file [encrypt database "$entry | [unixtime]"]
                close $file

                lappend ::forum::hour [replace [string trim [lindex [split $entry |] 3]]]
                lappend ::forum::day [replace [string trim [lindex [split $entry |] 3]]]

              }

            }

          }

          if {[info exists id]} {

            foreach channel [channels] {

              if {[channel get $channel forum]} {

                if {![llength [channel get $channel forum_id]] || [channel get $channel forum_id] < 1} {
                  channel set $channel forum_id [expr $id -1]
                }

                set getid [channel get $channel forum_id]

                while {$getid < $id} {

                  incr getid 1

                  if {[info exists ::forum(write,$getid)]} {

                    regsub -all -- {:id} $::forum::posts $getid posts

                    if {$::forum(new,$::forum(thread,$getid)) != "$getid"} {
                      putquick "PRIVMSG $channel :\[Forum\] \037#$getid\037\002:\002 \037$::forum(from,$getid)\037 answered on \037$::forum(forum,$getid)\037 (Thread: $::forum(thread,$getid)) - \037$posts\037"
                    } else {
                      putquick "PRIVMSG $channel :\[Forum\] \037#$getid\037\002:\002 \037$::forum(from,$getid)\037 has open a new Thread ($::forum(thread,$getid)) on \037$::forum(forum,$getid)\037 - \037$posts\037"
                    }

                  }

                }

                channel set $channel forum_id $id

              }

            }

          }

        }

        utimer 1 [list ::forum::check]

      }

     # '<
     # '> replace

      proc replace { string } {

        regsub -all {:evil:} $string {>:|} string
        regsub -all {:baby:} $string {:O} string
        regsub -all {:rolleyes:} $string {^^} string

        return [string map $::forum::phpcodes $string]

      }

     # '<
     # '> timer check

      proc timer:check { minute hour day month year } {

        if {![string match timer* [utimerexists [list ::forum::check]]]} {
          utimer 1 [list ::forum::check]
        }

        if {!$minute} {

          if {[info exists ::forum::hour]} {
            unset ::forum::hour
          }

          if {!$hour && [info exists ::forum::day]} {
            unset ::forum::day
          }

        }

      }

     # '<
     # '> relaod variables

      proc reload { } {

        set file [open $::forum::database r]

        while {![eof $file]} {

          if {[set entry [decrypt database [gets $file]]] != ""} {

            set ::forum(write,[string trim [lindex [split $entry |] 0]]) [string trim [lindex [split $entry |] 4]]
            set ::forum(forum,[string trim [lindex [split $entry |] 0]]) [replace [string trim [lindex [split $entry |] 1]]]
            set ::forum(thread,[string trim [lindex [split $entry |] 0]]) [replace [string trim [lindex [split $entry |] 2]]]
            set ::forum(from,[string trim [lindex [split $entry |] 0]]) [replace [string trim [lindex [split $entry |] 3]]]

            if {![info exists ::forum(new,$::forum(thread,[string trim [lindex [split $entry |] 0]]))]} {
              set ::forum(new,$::forum(thread,[string trim [lindex [split $entry |] 0]])) [string trim [lindex [split $entry |] 0]]
            }

          }

        }

        close $file

      }

      reload

     # '<

   # ''<
   # ''> timers

    if {![string match timer* [utimerexists [list ::forum::check]]]} {
      utimer 1 [list ::forum::check]
    }

   # ''<
   # ''> copyright informations

    putlog "forum.tcl v$version loaded successfully - $author"

   # ''<

  }


URLs müssen entsprechen angepasst werden

und hier das php abfrage Script das in den Root ordner des Forums geladen wird

PHP:
<? 
<?    
  
define('mysql_hostname''localhost');
  
define('mysql_username''');
  
define('mysql_password''');
  
define('mysql_database''');
  
  
  function 
connect_to_mysql() {
      
mysql_connect(mysql_hostnamemysql_usernamemysql_password) OR        
          die(&
quot;<b>ERROR:</bKann keine Verbindung zur Datenbank herstellenBitte kontaktieren sie einen <a href=&quot;mailto:Eure@Mail.de&quot;>Administrator</a>!<br /><br />n&quotWink;     
  
      
mysql_select_db(mysql_database) OR
          die(&
quot;<b>ERROR:</bKann keine Verbindung zur Datenbank herstellenBitte kontaktieren sie einen <a href=&quot;mailto:Eure@Mail.de&quot;>Administrator</a>!<br /><br /><br />n&quotWink
  }
  
  
connect_to_mysql();   
  
  
$sql      = &quot;SELECT p.postidt.topicb.titlep.username
                                      FROM bb1_posts p
bb1_boards bbb1_threads t
                                      WHERE b
.boardid t.boardid AND
                                      
p.threadid t.threadid
                                      ORDER BY p
.postid DESC LIMIT 05; &quot;;
  
$result   mysql_query($sql);
  
$row      mysql_fetch_assoc($result);

  while(
$row) {
    echo &
quot;
      &
quot;.$row['postid'].&quot; | &quot;.$row['title'].&quot; | &quot;.$row['topic'].&quot; | &quot;.$row['username'].&quot;
    &
quot;;
    echo &
quot;<br />&quot;;
    
$row mysql_fetch_assoc($result);
  }
  
mysql_free_result($result);
?>


Wie gesagt. In der Form funktioniert es NICHT fürs phpbb. Hoffe das kann jemand anpassen...

Danke
OfflineBenutzer-Profile anzeigenPrivate Nachricht senden
Google







Verfasst am: Nach oben

TerraTux
Support Team Member
Support Team Member



Anmeldungsdatum: 02.08.2002
Beiträge: 1026
Wohnort: Delitzsch

BeitragVerfasst am: Di 21 Nov, 2006 02:43 Antworten mit ZitatNach oben 

Kannst Du das evtl. ein Stück näher erläutern?
Was wird im Chan angezeigt, wenn das Dinge losfeuert?

Im Moment fehlt mir noch ein ausgefülltes Feld, weiß nicht ob das ein Stück vom Thementext sein soll...

Ist wirklich sehr rudimentär, keine Prüfung auf Zugriffsrechte nichts...schaffst dann aber sicher noch auszubauen Wink
PHP:
<?php
define 
('IN_PHPBB'TRUE);

$phpbb_root_path './';
$phpEx substr(strrchr(__FILE__'.'), 1);
require (
$phpbb_root_path .'common.'$phpEx);

$sql 'SELECT t.*, u.username 
        FROM '
TOPICS_TABLE .' t, 'USERS_TABLE .' u
        WHERE t.topic_poster = u.user_id
        ORDER BY t.topic_id DESC LIMIT 0, 5'
;
$query $db->sql_query($sql);
while (
$row $db->sql_fetchrow($query))
{
    echo 
'&quot;'$row['topic_poster'] .'&quot; | &quot;'$row['topic_title'] .'&quot; | &quot;Irgend n Titel&quot; | &quot;'$row['username'] .'&quot;<br />'

$db->sql_freeresult($query);
?>


An dem TCL-Script muss nicht wirklich was geändert werden. Sprech zwar kein TCL, aber so wie es ausschaut, ruft das Teil nur das PHP-Script auf und verarbeitet dessen Ausgabe, welche ja nicht wirklich verändert wurde.

Probier es mal aus, und gib Bescheid.

Gruß,
TT

_________________
software is like sex, it's better if it's free
Image
Kein Support per PM || EMail || Messenger
OfflineBenutzer-Profile anzeigenPrivate Nachricht sendenWebsite dieses Benutzers besuchenICQ-Nummer
DarkloOrd
phpBB2.de User
phpBB2.de User



Anmeldungsdatum: 19.11.2006
Beiträge: 14

BeitragVerfasst am: Mo 27 Nov, 2006 18:56 Antworten mit ZitatNach oben 

Hatt das jetzt mal einer getestet?
Ich würde es gerne mal einbauen habe aber noch keinen eggdrop!

mfg
OfflineBenutzer-Profile anzeigenPrivate Nachricht senden
Beiträge der letzten Zeit anzeigen:      
Dieses Forum ist gesperrt, du kannst keine Beiträge editieren, schreiben oder beantworten.Dieses Thema ist gesperrt, du kannst keine Beiträge editieren oder beantworten.

Nächstes Thema anzeigen
Vorheriges Thema anzeigen
Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst Dateien in diesem Forum posten
Du kannst Dateien in diesem Forum herunterladen