Thread Info
Wer ist hier? 1 Gäste
|
Shoutcast anzeige im Header einabuen
|
|
| DjKuschelteufel |
Geschrieben am 02.11.2009 00000011 18:59
|
|
Mitglied ![]() Beiträge: 128 Registriert am: 19.03.09 Fusioneer: 17 years 1 months 2 weeks 15 days 18 hours 17 minutes 28 seconds |
Hallo, undzwar möchte ich gern eine shoutcast anzeige in meine theme.php im headerbereich einfügen, allerdings weiss ich nicht was für ein code ich nutzen muss bzw wo er dann auch eingebaut werden kann??? Bitte um hilfe |
|
|
|
| SC-Ad-Bot | Advertisement |
| |
| Dat Tunes |
Geschrieben am 02.11.2009 00000011 19:59
|
|
Moderator ![]() Beiträge: 477 Registriert am: 08.12.08 Fusioneer: 17 years 4 months 3 weeks 26 days 2 hours 17 minutes 7 seconds |
Huhu, schau dir mal den beitrag an , vielleicht hilft dir das weiter. http://www.phpfusion-supportclub.de/c...ad_id=1286 Gruss Mystik Leute ohne Macke, sind Kacke ![]() Oh Herr, schmeiss Grundwissen von Himmel ! |
|
|
|
| DjKuschelteufel |
Geschrieben am 03.11.2009 00000011 14:57
|
|
Mitglied ![]() Beiträge: 128 Registriert am: 19.03.09 Fusioneer: 17 years 1 months 2 weeks 15 days 18 hours 17 minutes 28 seconds |
tut mir leid es geht leider nicht, wie ich schon sagte wär schön wenn mir jemand sagen könnte welchen code ich wo einfügen muss :-) |
|
|
|
| Dat Tunes |
Geschrieben am 03.11.2009 00000011 15:01
|
|
Moderator ![]() Beiträge: 477 Registriert am: 08.12.08 Fusioneer: 17 years 4 months 3 weeks 26 days 2 hours 17 minutes 7 seconds |
Bekommst du gar nix angezeigt ? Schau mal nach ob bei dir in der theme.php die funktion showbanner vorhanden ist. Wenn nicht such dir mal ein theme, wo die funktion dabei ist und bau es dann ein und versuche es dann noch mal. Hatte bei mir damals auch geklappt Leute ohne Macke, sind Kacke ![]() Oh Herr, schmeiss Grundwissen von Himmel ! |
|
|
|
| DjKuschelteufel |
Geschrieben am 03.11.2009 00000011 15:53
|
|
Mitglied ![]() Beiträge: 128 Registriert am: 19.03.09 Fusioneer: 17 years 1 months 2 weeks 15 days 18 hours 17 minutes 28 seconds |
nein bekomme nix angezeigt |
|
|
|
| Dat Tunes |
Geschrieben am 03.11.2009 00000011 19:25
|
|
Moderator ![]() Beiträge: 477 Registriert am: 08.12.08 Fusioneer: 17 years 4 months 3 weeks 26 days 2 hours 17 minutes 7 seconds |
Hab hier noch nen Code für V6, kannst ja mal gucken ob du dir den evtl. anpassen kannst , ist auch mit bildanzeige. Hab den auch mal von jemanden bekommen , aber nie ausprobiert unter v7. Kannst ja dein Gluck mal versuchen. [geshi=php]$serverioIP = "IP Adresse"; $serverioPORT = "Port"; //Shoutcas serverio portas $naujienos = BASEDIR."news.php"; $komanda = BASEDIR."viewpage.php?page_id=1"; $forumas = BASEDIR."forum/index.php"; $pageidavimai = BASEDIR."infusions/suggestion_box/suggestion_box.php"; $galerija = BASEDIR."photogallery.php"; $top20 = BASEDIR."infusions/song_charts/charts.php"; $laidosz = BASEDIR."#"; $kontaktai = BASEDIR."contact.php"; $body_text = "#000000"; $body_bg = "#000000"; $theme_width = "900"; $theme_width_l = "170"; $theme_width_r = "170"; function render_header($header_content) { global $theme_width,$settings,$serverioIP,$serverioPORT,$naujienos,$komanda,$forumas,$pageidavimai,$galerija,$top20,$laidosz,$kontaktai; //////////////// //Radio info/// ////////////// error_reporting(1); class Radio { var $fields; var $very_first_str; var $domain, $port; var $errno, $errstr; var $trackLists = array(); function Radio($domain, $port) { $this->domain = $domain; $this->port = $port; $this->setOffset("Current Stream Information"); $this->setTableStart("<table border=0 cellpadding=2 cellspacing=2>"); $this->setTableEnd("</table>"); } function setFields($array=array()) { $this->fields = $array; } function setOffset($string) { $this->very_first_str = $string; } function setTableStart($string) { $this->tableStart = $string; } function setTableEnd($string) { $this->tableEnd = $string; } function getHTML($page) { $contents = ""; $domain = (substr($this->domain, 0, 7) == "http://") ? substr($this->domain, 7) : $this->domain; if ($fp = fsockopen($domain, $this->port, $this->errno, $this->errstr, 2)) { fputs($fp, "GET ".$page." HTTP/1.1\r\n". "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)\r\n". "Host: ".$domain."\r\n\r\n"); while (!feof($fp)) $contents .= fgets($fp, 256); fclose ($fp); return $contents; } else { return False; } } function getServerInfo($page="/", $display_array=null, $very_first_str=null) { if (!isset($display_array)) $display_array = $this->fields; if (!isset($very_first_str)) $very_first_str = $this->very_first_str; if ($html = $this->getHTML($page)) { // parsing the contents foreach ($display_array AS $key => $item) { $very_first_pos = stripos($html, $very_first_str); $first_pos = stripos($html, $item, $very_first_pos); $line_start = strpos($html, "<td>", $first_pos); $line_end = strpos($html, "</td>", $line_start) + 4; $difference = $line_end - $line_start; $line = substr($html, $line_start, $difference); $data[$key] = strip_tags($line); } return $data; } else { return $this->errstr." (".$this->errno.")"; } } function createHistoryArray($page) { if (!in_array($page, $this->trackLists)) { $this->trackLists[] = $page; if ($html = $this->getHTML($page)) { $fromPos = stripos($html, $this->tableStart); $toPos = stripos($html, $this->tableEnd); $tableData = substr($html, $fromPos, ($toPos-$fromPos)); $lines = explode("</tr><tr>", $tableData); $tracks = array(); $c = 0; foreach ($lines AS $line) { $info = explode ("</td><td>", $line); $time = trim(strip_tags($info[0])); if (substr($time, 0, 9) != "Copyright") { $this->tracks[$c]['time'] = $time; $this->tracks[$c++]['track'] = trim(strip_tags($info[1])); } } unset($this->tracks[0]); $this->tracks[1]['track'] = str_replace("Current Song", "", $this->tracks[1]['track']); } else { $this->tracks[0] = array("time"=>$this->errno, "track"=>$this->errstr); } } } function getHistoryArray($page="/played.html") { if (!in_array($page, $this->trackLists)) $this->createHistoryArray($page); return $this->tracks; } function getHistoryTable($page="/played.html", $timeColText=False, $trackColText=False, $class=False) { if (!in_array($page, $this->trackLists)) $this->createHistoryArray($page); $output = "<table".($class ? " class=\"".$class."\"" : "").">"; if ($timeColText && $trackColText) $output .= "<tr><td>".$timeColText."</td><td>".$trackColText."</td></tr>"; foreach ($this->tracks AS $trackArr) $output .= "<tr><td>".$trackArr['time']."</td><td>".$trackArr['track']."</td></tr>"; $output .= "</table>\n"; return $output; } } if (!function_exists("stripos")) { function stripos($haystack, $needle, $offset=0) { return strpos(strtoupper($haystack), strtoupper($needle), $offset); } } $display_array = array("Stream Title", "Stream Genre", "Stream URL", "Current Song", "Content Type", "Stream Status", "Server Status"); $radio = new Radio($serverioIP, $serverioPORT); $data_array = $radio->getServerInfo("/", $display_array); error_reporting(1); if ($data_array[0] == "A"){ $djimg = BASEDIR."images/djs/off.gif"; }else{ if (file_exists(BASEDIR."images/djs/".$data_array[1].".gif")) { $djimg = BASEDIR."images/djs/".$data_array[1].".gif"; }else{ $djimg = BASEDIR."images/djs/none.gif"; }} if($data_array[0] == "A"){ $dje = "Tyla"; }else{ $dje = $data_array[1]; $laida = $data_array[0]; } if($data_array[3] == "o"){ $dainaa = "Tyla"; }else{ $dainaa = $data_array[3]; } if($data_array[0] == "Server is currently down.") { $dje = "Tyla"; $dainaa = "Tyla"; $laida = ""; $djimg = BASEDIR."images/djs/off.gif"; } [/geshi] Wünsche dir viel Glück damit Leute ohne Macke, sind Kacke ![]() Oh Herr, schmeiss Grundwissen von Himmel ! |
|
|
|
| Anaconda |
Geschrieben am 04.11.2009 00000011 00:45
|
|
Jung Mitglied ![]() Beiträge: 13 Registriert am: 07.03.09 Fusioneer: 17 years 1 months 4 weeks 28 days 3 hours 50 minutes 58 seconds |
der code ist super kann den jemand auf v7 anpassen ??? weil dann würde ich das auch gerne nehmen .... |
|
|
|
| Springe ins Forum: |
Ähnliche Themen
| Thema | Forum | Antworten | Letzter Beitrag |
|---|---|---|---|
| Navigation im Header | Allgemeine Support Fragen | 6 | 08.08.2013 00000008 06:20 |
| Header link? | Allgemeine Support Fragen | 3 | 27.06.2013 00000006 06:23 |
| header wechseln hilfe? | Allgemeine Support Fragen | 2 | 26.06.2013 00000006 15:45 |
| forum threads list panel icon anzeige einbauen? | Infusionen | 10 | 13.03.2013 00000003 16:15 |
|  Anzeige im Profil | Allgemeine Diskussionen | 2 | 31.12.2012 00000012 21:51 |
Austria
Czech Republic
Germany
Denmark
Spain
France
Iran
Lithuania
Norway
Poland
Romania
Russia
Sweden
Slovakia
Turkey
United States
United Kingdom











