Aehnliche Themen [mod by Flavius] |
mrbasket
Mitglied
Dabei seit: 26.06.06
Beiträge: 86
Forenversion: 2.3
|
|
edit: problem gelöst!
MEIN TIPP: Mischt die beiden Hacks! Der hier basiert eh auf Relleks und Relleks hat nochmal ne Beta zu ner Erweiterung rausgebracht!
So läuft der hack bei mir!
Also nehmt die templates aus diesem hack und bearbeitet auch das thead.tpl wie in der anleitung! Allerdings die thread.php bearbeitet ihr so:
Zitat: |
Original von rellek
Wer am Beta-Test der neuen Version teilnehmen möchte, der ersetzt bitte den längeren Abschnitt zwischen den beiden
code: |
1:
|
/* Ähnliche Themen */ |
|
und
code: |
1:
|
/* Ähnliche Themen Ende */ |
|
mit:
code: |
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:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
|
/* Ähnlich Themen */
function GetAccessableForums() {
global $db, $n, $wbbuserdata, $boardcache;
if (!isset($boardcache) || !is_array($boardcache)) $boardcache = array();
$result = $db->query("SELECT boardid,boardorder,parentid,parentlist FROM bb".$n."_boards ORDER BY parentid ASC, boardorder ASC");
while ($row = $db->fetch_array($result)) {
$boardcache[$row['parentid']][$row['boardorder']][$row['boardid']] = $row;
}
$boardpermissions = getPermissions();
$boardids = '';
foreach ($boardcache as $key => $val) {
foreach ($val as $key2 => $val2) {
foreach ($val2 as $row) if ((!isset($boardpermissions[$row['boardid']]['can_view_board']) || $boardpermissions[$row['boardid']]['can_view_board'] != 0) && (!isset($boardpermissions[$row['boardid']]['can_enter_board']) || $boardpermissions[$row['boardid']]['can_enter_board'] != 0) && (!isset($boardpermissions[$row['boardid']]['can_read_thread']) || $boardpermissions[$row['boardid']]['can_read_thread'] != 0)) $boardids .= ",".$row['boardid'];
}
}
return $boardids;
}
/* Unset Used Vars To Avoid Hacking Attempts */
unset($similar_thread_bit);
unset($like_string);
$ttopic = str_replace("."," ",$threadtopic);
$ttopic = str_replace("!"," ",$ttopic);
$ttopic = str_replace("?"," ",$ttopic);
$ttopic = str_replace("/"," ",$ttopic);
$ttopic = str_replace("§"," ",$ttopic);
$ttopic = str_replace("$"," ",$ttopic);
$ttopic = str_replace("%"," ",$ttopic);
$ttopic = str_replace("&"," ",$ttopic);
$ttopic = str_replace("("," ",$ttopic);
$ttopic = str_replace(")"," ",$ttopic);
$ttopic = str_replace("="," ",$ttopic);
$ttopic = str_replace("\\"," ",$ttopic);
$ttopic = str_replace("?"," ",$ttopic);
$ttopic = str_replace("-"," ",$ttopic);
$ttopic = str_replace("*"," ",$ttopic);
$ttopic = str_replace("+"," ",$ttopic);
$ttopic = str_replace("#"," ",$ttopic);
$ttopic = str_replace("_"," ",$ttopic);
$ttopic = str_replace(","," ",$ttopic);
$ttopic = str_replace(":"," ",$ttopic);
$ttopic = str_replace(";"," ",$ttopic);
$ttopic = str_replace("<"," ",$ttopic);
$ttopic = str_replace(">"," ",$ttopic);
$ttopic = str_replace("|"," ",$ttopic);
$ttopic = str_replace("~"," ",$ttopic);
$ttopic = str_replace("'"," ",$ttopic);
$ttopic = str_replace('"',' ',$ttopic);
$ttopic = explode(" ",$ttopic);
$badwordlist = explode("\n",$badsearchwords);
$y = count($ttopic);
if($y>1) {
foreach($ttopic as $tt) {
if(!in_array($tt, $badwordlist)) {
if(strlen($tt)>=$minwordlength && strlen($tt)<=$maxwordlength) $x++;
if($x>1 && (strlen($tt)>=$minwordlength && strlen($tt)<=$maxwordlength)) $like_string .= " OR t.topic LIKE ";
if(strlen($tt)>=$minwordlength && strlen($tt)<=$maxwordlength) $like_string .= "'%".$tt."%'";
}
}
} else $like_string = "'%$threadtopic%'";
if($like_string) {
$similar = $db->query("SELECT
t.threadid, t.boardid, x.title, x.boardid, t.prefix, t.topic, t.starttime, t.starterid, t.starter, t.lastposttime, t.lastposterid, t.lastposter, t.replycount, t.views, t.attachments, t.closed, t.important, t.pollid
FROM bb".$n."_threads t, bb".$n."_boards x
LEFT JOIN bb".$n."_boards b ON (t.boardid=b.boardid)
WHERE t.visible='1'
AND t.closed <> 3
AND t.threadid <> $threadid
AND b.password=''
AND t.boardid=x.boardid
AND t.boardid IN (0".GetAccessableForums().")
AND (t.topic LIKE ".$like_string.")
ORDER BY t.lastposttime DESC
LIMIT 0, 5;");
}
if($like_string && $db->num_rows($similar)) {
$i = "0";
while ($row = $db->fetch_array($similar)) {
$i++;
$tdclass = getone($i, "tablea", "tableb");
$started = formatdate($wbbuserdata['dateformat'], $row['starttime'],1);
$started .= " <span class=\"time\">".formatdate($wbbuserdata['timeformat'], $row['starttime'])."</span>";
$lastreply = formatdate($wbbuserdata['dateformat'], $row['lastposttime'],1);
$lastreply .= " <span class=\"time\">".formatdate($wbbuserdata['timeformat'], $row['lastposttime'])."</span>";
if ($row['replycount'] >= 1000) $row['replycount'] = number_format($row['replycount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
if ($row['views'] >= 1000) $row['views'] = number_format($row['views'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
if (strlen($row['topic']) > 60) $row['topic'] = substr($row['topic'], 0, 54).' [...]';
$row['topic'] = htmlconverter($row['topic']);
eval("\$similar_thread_bit .= \"".$tpl->get("thread_similarthread_bit")."\";");
}
eval("\$similar_thread = \"".$tpl->get("thread_similarthread")."\";");
}
/* Ähnliche Themen Ende */ |
|
Auftretende Bugs bitte melden ! |
Dieser Beitrag wurde 1 mal editiert, zum letzten Mal von mrbasket: 20.02.07 19:55.
|
|
19.02.07 19:06 |
E-Mail
WWW
Finden
Als Freund hinzufügen
|
|
FT-Team
Mitglied
Dabei seit: 13.01.07
Beiträge: 68
Herkunft: Thüringen Forenversion: 2.3
|
|
Leider werden bei uns die ähnlichen Themen nicht angezeigt.
Den Fehler dafür können wir einfach nicht finden.
Auch haben wir alle verschiedenen Variationen durchgetestet und die Intallation mit der Anleitung verglichen. Ohne Erfolg.
Die Einstellungsmöglichkeit im ACP ist korrekt vorhanden.
Wir schicken mal die geänderten Dateien als txt mit. Vielleicht findet jemand den Fehler, den wir übersehen haben.
MfG
__________________
|
|
13.06.07 09:55 |
E-Mail
Finden
Als Freund hinzufügen
|
|
FT-Team
Mitglied
Dabei seit: 13.01.07
Beiträge: 68
Herkunft: Thüringen Forenversion: 2.3
|
|
hat niemand eine Idee?
Oder gibt es noch irgendwo einen ähnlichen Hack?
MfG
__________________
|
|
20.06.07 23:05 |
E-Mail
Finden
Als Freund hinzufügen
|
|
scaey
Mitglied
Dabei seit: 03.06.07
Beiträge: 5
|
|
Zitat: |
Original von Snoopy25
Ich habe es alles eingebaut und dann wenn ich thread öffne kommt das hier:
php: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
|
SQL-DATABASE ERROR
Database error in WoltLab Burning Board (2.3.6): Invalid SQL: SELECT t.threadid, t.boardid, x.title, x.boardid, t.prefix, t.topic, t.starttime, t.starterid, t.starter, t.lastposttime, t.lastposterid, t.lastposter, t.replycount, t.views, t.attachments, t.closed, t.important, t.pollid FROM bb1_threads t, bb1_boards x LEFT JOIN bb1_boards b ON (t.boardid=b.boardid) WHERE t.visible='1' AND t.closed <> 3 AND t.threadid <> 4 AND b.password='' AND t.boardid=x.boardid AND t.boardid IN (0,4,1,17,9,10,11,8,2,12,13,15,14,16,42,32,3,33,5,37,26,31,29,30,34,35,36,38,39,40,27,41,18,19,20,21,22,24,25) AND t.topic LIKE '%Wie habt ihr uns gefunden?%' ORDER BY t.lastposttime DESC LIMIT 0, ;
mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
mysql error number: 1064
mysql version: 4.1.13
php version: 4.4.0
Date: 17.11.2006 @ 06:19
Script: /thread.php?postid=6
Referer: http://extreme-gfx.ath.cx/index.php |
|
Na toll und was nu!
Edit: habe mir das Hack raus genommen da es mein ganzes Forum zerstört hatte
|
hab den selben fehler, wie bekomm ich den hack aus der db kann ihn dort net finden!
bitte um hilfe.
dringend
huch, hab nun was gefunden, so funz der hack mit mysql5 und dem wbb 2.3.6 pl2
http://board.rellek.org/hnliche-themen-t5106p5.html
Dieser Beitrag wurde 1 mal editiert, zum letzten Mal von scaey: 23.06.07 07:27.
|
|
23.06.07 06:53 |
E-Mail
Finden
Als Freund hinzufügen
|
|
Morgy
Technisches Genie
Dabei seit: 06.04.07
Beiträge: 7
Fähigkeiten: WBB2 Profi Herkunft: Deutschland Forenversion: 2.3
|
|
Zitat: |
Original von The-Storm
Bekannte Fehler:
- der Hack ist MySQL 5 INkompatibel |
Ich kann den Hack also nicht mit 5.0.45-Dotdeb_0.dotdeb.1-log (Server Version;5.0.45 MySQL-Client-Version) benutzen?
|
|
31.01.08 01:42 |
E-Mail
WWW
Finden
Als Freund hinzufügen
|
|
Agi
TEAM - PHP Freak
Dabei seit: 22.11.04
Beiträge: 2.628
Fähigkeiten: WBB3 Profi Forenversion: 3.1
|
|
Zitat: |
Original von Morgy
Zitat: |
Original von The-Storm
Bekannte Fehler:
- der Hack ist MySQL 5 INkompatibel |
Ich kann den Hack also nicht mit 5.0.45-Dotdeb_0.dotdeb.1-log (Server Version;5.0.45 MySQL-Client-Version) benutzen?
|
Soweit ich weiß, nein. Aber auf myWBB oder so wurde irgendwann mal eine MySQL5 Lösung gepostet im dortigen Hackthread, bin mir aber nicht sicher ...
__________________
|
|
01.02.08 17:54 |
Finden
Als Freund hinzufügen
|
|
Morgy
Technisches Genie
Dabei seit: 06.04.07
Beiträge: 7
Fähigkeiten: WBB2 Profi Herkunft: Deutschland Forenversion: 2.3
|
|
Zitat: |
Original von Agi
Soweit ich weiß, nein. Aber auf myWBB oder so wurde irgendwann mal eine MySQL5 Lösung gepostet im dortigen Hackthread, bin mir aber nicht sicher ... |
Die Lösung für rellek's Hack habe ich gefunden: Klick mich!
Aber.. gilt das auch für diesen Hack?!
|
|
02.02.08 19:52 |
E-Mail
WWW
Finden
Als Freund hinzufügen
|
|
Agi
TEAM - PHP Freak
Dabei seit: 22.11.04
Beiträge: 2.628
Fähigkeiten: WBB3 Profi Forenversion: 3.1
|
|
Zitat: |
Original von Morgy
Zitat: |
Original von Agi
Soweit ich weiß, nein. Aber auf myWBB oder so wurde irgendwann mal eine MySQL5 Lösung gepostet im dortigen Hackthread, bin mir aber nicht sicher ... |
Die Lösung für rellek's Hack habe ich gefunden: Klick mich!
Aber.. gilt das auch für diesen Hack?!
|
Eher nicht; sonst nimm einfach relleks Hack, der macht genau das Gleiche und dort gibts ne passende Lösung.
__________________
|
|
02.02.08 21:58 |
Finden
Als Freund hinzufügen
|
|
|