Benutzer-Werkzeuge

Webseiten-Werkzeuge


allgemeine-howtos:phpbb:kein-link-bei-suchergebnissen

Kein Link bei Suchergebnissen

Problem: phpBB3 setzt bei den Listings zu Suchergebnissen auf einen gesetzten Post-Titel. Dieser Post-Titel wird als Link formuliert, über den man direkt zum gezeigten Suchtreffer gelangt. Beim alten phpBB2 blieb der Post-Titel beim Antworten aber standardmäßig unbesetzt. Vollzieht man nun ein Upgrade auf phpBB3, bleiben diese leeren Felder bestehen. Eine Suche liefert zwar noch immer die entsprechenden Posts als Treffer, jedoch ohne auf den ersten Blick direkten Link zu diesen.

Abhilfe kann unten gelistetes kleines Script schaffen. Es selektiert in einem ersten Zug alle Posts bzw. die zugehörigen Topic ID's derselben, zu denen es ein leeres Titelfeld gibt. Für jeden einzelnen gefundenen Eintrag wird nun vom zugehörigen topic der Titel geladen. Dieser Titel wird nun mit einem vorangesetzten „Re: “ in das Titelfeld des Posts gesetzt. Fertig.

<?php
mysql_connect("localhost","phpbbuser","phpbbpasswort");
mysql_select_db("phpbbdatenbank");
 
$sql = "SELECT p.post_id, p.topic_id, p.forum_id, t.topic_title FROM phpbb3_posts p, phpbb3_topics t WHERE p.post_subject= AND t.topic_id=p.topic_id AND t.forum_id=p.forum_id";
$query = mysql_query($sql);
while ($entry = mysql_fetch_array($query)) {
  $sql2 = "UPDATE phpbb3_posts SET post_subject='Re: ".str_replace("'","\'",$entry['topic_title'])."' WHERE post_id='".$entry['post_id']."'";
  mysql_query($sql2);
}
?>

Achtung: Das Skript erhebt weder Anspruch auf Vollständigkeit noch Fehlerfreiheit. Es ist also in jedem Fall ratsam, vorher ein Backup der phpBB-Datenbank zu erstellen!

Das Skript wurde auch nicht auf Performance optimiert. Im eingesetzten Fall wurden aber knapp 40.000 posts in deutlich weniger als einer Minute abgehandelt. Daher war Performance kein Kriterium für den Code.

Cookies helfen bei der Bereitstellung von Inhalten. Durch die Nutzung dieser Seiten erklären Sie sich damit einverstanden, dass Cookies auf Ihrem Rechner gespeichert werden. Weitere Information

Diskussion

garryy123, 2023/09/07 15:42

[url=https://akamslinkphoneqr.com/]www.aka.ms/linkphoneqr[/url] is a software designed to easily sync your mobile device, Surface Duo to your PC and access its features. Using [url=https://akamslinkphoneqr.com/]www.aka.ms/linkphoneqr[/url] you can sync your smartphone to your windows computer and the possibilities become virtually limitless. Seamlessly transfer content between them, use mobile apps on PCs without hassle – there’s simply no limit! Moreover you can:

garryy123, 2023/09/07 15:43

www.akamsaddpc.com/ is an incredible feature that allows users to seamlessly combine their smartphones and PCs for an enhanced digital experience by using www.akamsaddpc.com/ Users can experience greater synchronization between devices by linking their PC with their phone, sharing files, notifications, etc, between both devices seamlessly. If you need assistance getting started or using Phone Link via www.akamsaddpc.com/, this guide is here to walk through every step involved.

garryy123, 2023/09/07 15:43

www.akams-addpc.com/ is a feature that connects Android phones and Windows PCs for an improved digital experience. By using www.akams-addpc.com/, you can sync files, notifications, and app alerts between devices – and use them both as a mouse or keyboard for each other – while simultaneously signing into both with the same Microsoft account and installing their companion app on each phone. Making the switch to a new computer has never been simpler!

 garryy, 2023/09/15 14:39

www.aka.ms/linkphoneqr is a software designed to easily sync your mobile device, Surface Duo to your PC and access its features. Using www.aka.ms/linkphoneqr you can sync your smartphone to your windows computer and the possibilities become virtually limitless. Seamlessly transfer content between them, use mobile apps on PCs without hassle – there’s simply no limit! Moreover you can:

 garryy, 2023/09/15 14:39

www.aka.ms/addpc is an incredible feature that allows users to seamlessly combine their smartphones and PCs for an enhanced digital experience by using www.aka.ms/addpc Users can experience greater synchronization between devices by linking their PC with their phone, sharing files, notifications, etc, between both devices seamlessly. If you need assistance getting started or using Phone Link via www.aka.ms/addpc, this guide is here to walk through every step involved.

 garryy, 2023/09/15 14:40

www.aka.ms/addpc is a feature that connects Android phones and Windows PCs for an improved digital experience. By using www.aka.ms/addpc , you can sync files, notifications, and app alerts between devices – and use them both as a mouse or keyboard for each other – while simultaneously signing into both with the same Microsoft account and installing their companion app on each phone. Making the switch to a new computer has never been simpler!

 garryy, 2023/09/15 14:40

aka.ms/linkpc is an integral component of Phone Link setup process for linking your mobile device with your PC, aka.ms/linkpc provides seamless experiences between smartphones and personal computers. If you’re unfamiliar with what this feature entails or how you should utilize it, look no further. Our comprehensive guide aims to demystify this short URL address to simplify digital life for you. The Phone Link Application connects your mobile phone and PC, enabling you to effortlessly sync notifications, messages, photos, and applications across both platforms. No longer do you have to email files back and forth or deal with cumbersome cables to share data across platforms!

 garryy, 2023/09/15 14:41

www.aka.ms/linkphoneqr is a software designed to easily sync your mobile device, Surface Duo to your PC and access its features. Using www.aka.ms/linkphoneqr you can sync your smartphone to your windows computer and the possibilities become virtually limitless. Seamlessly transfer content between them, use mobile apps on PCs without hassle – there’s simply no limit!

Geben Sie Ihren Kommentar ein. Wiki-Syntax ist zugelassen:
 
allgemeine-howtos/phpbb/kein-link-bei-suchergebnissen.txt · Zuletzt geändert: 2016/01/18 16:16 (Externe Bearbeitung)