Content Beschreibung auslesen
Schreibe gerade mal wieder etwas um
habe aber Probleme die Content Beschreibung auslesen zu lassen
was ist hier zu ändern auf die 1.6.4 ? pkStringCut alleine hat nicht geholfen
Harald
habe aber Probleme die Content Beschreibung auslesen zu lassen
was ist hier zu ändern auf die 1.6.4 ? pkStringCut alleine hat nicht geholfen
|
|
Quellcode |
1 |
$content_text = pkStringCut(strip_tags($PARSE->parse($contentinfo['content_text'],1,1,1,1)), $max_download_text); |
Harald
hier bei den top 10
alles klappt nur halt der Text nicht
alles klappt nur halt der Text nicht
|
|
Quellcode |
1 2 3 4 5 6 |
$content_title = pkStringCut($contentinfo['content_title'], $max_download_title);
$content_titlemo = htmlentities($contentinfo['content_title']);
$content_text = pkStringCut(strip_tags($PARSE->parse($contentinfo['content_text'],1,1,1,1)), $max_download_text);
$content_views = $contentinfo['content_views'];
eval("\$topdownloads .= \"".pkTpl("MyP/status/status-top-downloads")."\";");
}
|
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Jan-Lukas« (25. Februar 2008, 22:40)
Natürlich, bei mir steht da immer was Hier mal der Original Auszug aus der 1.6.03
ich habe dann aus cutstring wie es sich gehört ein pkStringCut gemacht (natürlich auch geändert getTemplate
)Das klappt ja auch alles, bis auf die Tabelle $contentinfo['content_text']
also muss da wohl auch noch der Teil (strip_tags($PARSE->parse verändert werden ?
kann es mir sonst nicht vorstellen, finde aber im 1.6.4 Quelltext nichts was so ähnlich ist
Die Fehlermeldung lautet übrigens
Fatal error: Call to a member function on a non-object in /is/htdocs/32042/www.mr-marker.de/pkinc/public/status-func.php on line 256
Habe damit das dann // auskommentiert, damit es so läuft
//$content_text = pkStringCut(strip_tags($PARSE->parse($contentinfo['content_text'],1,1,1,1)), $max_download_text);
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
########## Top Content ##########
//---> Downloads
$download_anzahl = 10; // Anzah der Downloads
$max_download_title = 20; // maximale Zeichenlänge des Titles
$max_download_text = 100; // maximale Zeichenlänge der Beschreibung
$getcontentinfo=$DB->query("SELECT ".$db_tab['content'].".content_id, ".$db_tab['content'].".content_title, ".$db_tab['content'].".content_text, ".$db_tab['content'].".content_views FROM ".$db_tab['content']." LEFT JOIN ".$db_tab['contentcat']." ON ".$db_tab['contentcat'].".contentcat_id=".$db_tab['content'].".content_cat WHERE ".$db_tab['content'].".content_option=4 AND ".$db_tab['content'].".content_status=1 AND (".$db_tab['content'].".content_expire>'".time()."' OR ".$db_tab['content'].".content_expire='0') AND ".$db_tab['content'].".content_time<'".time()."' AND ".sqlrights($db_tab['contentcat'].'.contentcat_rights')." ORDER by ".$db_tab['content'].".content_views DESC LIMIT ".$download_anzahl."");
while($contentinfo=$DB->fetch_array($getcontentinfo)) {
$content_title = cutstring($contentinfo['content_title'], $max_download_title);
$content_titlemo = htmlentities($contentinfo['content_title']);
$content_text = cutstring(strip_tags($PARSE->parse($contentinfo['content_text'],1,1,1,1)), $max_download_text);
$content_views = $contentinfo['content_views'];
eval("\$topdownloads .= \"".getTemplate("MyP/status/status-top-downloads")."\";");
}
//---> Artikel
$artikel_anzahl = 10; // Anzah der Artikel
$max_artikel_title = 20; // maximale Zeichenlänge des Titles
$max_artikel_text = 100; // maximale Zeichenlänge der Beschreibung
$getcontentinfo=$DB->query("SELECT ".$db_tab['content'].".content_id, ".$db_tab['content'].".content_title, ".$db_tab['content'].".content_text, ".$db_tab['content'].".content_views FROM ".$db_tab['content']." LEFT JOIN ".$db_tab['contentcat']." ON ".$db_tab['contentcat'].".contentcat_id=".$db_tab['content'].".content_cat WHERE ".$db_tab['content'].".content_option=1 AND ".$db_tab['content'].".content_status=1 AND (".$db_tab['content'].".content_expire>'".time()."' OR ".$db_tab['content'].".content_expire='0') AND ".$db_tab['content'].".content_time<'".time()."' AND ".sqlrights($db_tab['contentcat'].'.contentcat_rights')." ORDER by ".$db_tab['content'].".content_views DESC LIMIT ".$artikel_anzahl."");
while($contentinfo=$DB->fetch_array($getcontentinfo)) {
$content_title = cutstring($contentinfo['content_title'], $max_artikel_title);
$content_titlemo = htmlentities($contentinfo['content_title']);
$content_text = cutstring(strip_tags($PARSE->parse($contentinfo['content_text'],1,1,1,1)), $max_artikel_text);
$content_views = $contentinfo['content_views'];
eval("\$topartikel .= \"".getTemplate("MyP/status/status-top-artikel")."\";");
}
//---> Links
$link_anzahl = 10; // Anzah der Links
$max_link_title = 20; // maximale Zeichenlänge des Titles
$max_link_text = 100; // maximale Zeichenlänge der Beschreibung
$getcontentinfo=$DB->query("SELECT ".$db_tab['content'].".content_id, ".$db_tab['content'].".content_title, ".$db_tab['content'].".content_text, ".$db_tab['content'].".content_views FROM ".$db_tab['content']." LEFT JOIN ".$db_tab['contentcat']." ON ".$db_tab['contentcat'].".contentcat_id=".$db_tab['content'].".content_cat WHERE ".$db_tab['content'].".content_option=3 AND ".$db_tab['content'].".content_status=1 AND (".$db_tab['content'].".content_expire>'".time()."' OR ".$db_tab['content'].".content_expire='0') AND ".$db_tab['content'].".content_time<'".time()."' AND ".sqlrights($db_tab['contentcat'].'.contentcat_rights')." ORDER by ".$db_tab['content'].".content_views DESC LIMIT ".$link_anzahl."");
while($contentinfo=$DB->fetch_array($getcontentinfo)) {
$content_title = cutstring($contentinfo['content_title'], $max_link_title);
$content_titlemo = htmlentities($contentinfo['content_title']);
$content_text = cutstring(strip_tags($PARSE->parse($contentinfo['content_text'],1,1,1,1)), $max_link_text);
$content_views = $contentinfo['content_views'];
eval("\$toplinks .= \"".getTemplate("MyP/status/status-top-links")."\";");
}
$topcontent1 = "Top ".$download_anzahl." Downloads"; // Überschrift Downloads
$topcontent2 = "Top ".$artikel_anzahl." Artikel"; // Überschrift Artikel
$topcontent3 = "Top ".$link_anzahl." Links"; // Überschrift Links
|
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Jan-Lukas« (17. Februar 2008, 15:15)
Ähnliche Themen
-
User Content | Addons »-
1.6.03 & 1.6.1 Erweiterte Teamansicht
(5. Februar 2008, 22:54)
-
alte Versionen [1.6.03|1.6.1|1.6.4] »-
welcome-text auslesen
(6. Februar 2008, 15:21)
-
Web | Programmierung »-
Wechselbanner ohne Datenbank?
(31. Januar 2008, 12:57)
-
User Content | Addons »-
1.6.03 & 1.6.1 Boardinfo
(5. Januar 2008, 19:55)


