MyBB.de Forum
:Idee: <- Attachment Aufstellung aus einem bestimmten Forum - Druckversion

+- MyBB.de Forum (https://www.mybb.de/forum)
+-- Forum: Anpassungen (https://www.mybb.de/forum/forum-47.html)
+--- Forum: Plugin-Diskussionen (https://www.mybb.de/forum/forum-38.html)
+--- Thema: :Idee: <- Attachment Aufstellung aus einem bestimmten Forum (/thread-2021.html)

Seiten: Seiten: 1 2


RE:  :Idee: <- Attachment Aufstellung aus einem bestimmten Forum - happyspeedy - 15.05.2006

Ich gebe das Passwort auch mit an, ich bin total ratlos.


RE: :Idee: <- Attachment Aufstellung aus einem bestimmten Forum - Michael - 15.05.2006

Ich habe mir gerade nochmal deinen Code angesehen, jetzt wird mir einiges klar: Du verbindest dich ja gar nicht mit der DB:
PHP-Code:
mysql_connect($dbhost$dbuser$dbpassword) or die(mysql_error);
mysql_select_db($dbdatabase) or die(mysql_error); 



RE: :Idee: <- Attachment Aufstellung aus einem bestimmten Forum - happyspeedy - 15.05.2006

Perfekt !!! Es funzt !!!! Bin begeistert Big Grin

Noch eine bitte, wenn es nicht unverschämt klingt Shy

Geht das auch bestimmte Attachments listen zu lassen, also eine bestimmte Dateiendung, wäre lieb, wenn dieses noch umsetzbar wäre Rolleyes


RE: :Idee: <- Attachment Aufstellung aus einem bestimmten Forum - Michael - 15.05.2006

Das kannst du direkt über den Query lösen (Beispiel GIF):
Über Dateityp:
PHP-Code:
$query mysql_query("SELECT aid,filename FROM mybb_attachments WHERE visible = '1' AND pid IN (".$pids.") AND filetype = 'image/gif' ORDER BY aid DESC LIMIT 0,".$limit.""); 
Oder über Dateieindung:
PHP-Code:
$query mysql_query("SELECT aid,filename FROM mybb_attachments WHERE visible = '1' AND pid IN (".$pids.") AND filename LIKE '%.gif' ORDER BY aid DESC LIMIT 0,".$limit.""); 



RE: :Idee: <- Attachment Aufstellung aus einem bestimmten Forum - happyspeedy - 15.05.2006

Das klappt super !

Kann man eigentlich auch mehrere Querys stellen, d.h. wenn ich beispielweise jetzt noch eine forum id dazu nehmen will?

Und dann quasi mit dem Text auststatten würde

Forum 1 Uploads

Attachment.xxx

Forum 2 Uploads

Attachment.xxx

würde so in etwa dann aussehen.


RE: :Idee: <- Attachment Aufstellung aus einem bestimmten Forum - Michael - 15.05.2006

Ist das eine Frage? Wenn ja: Ja, das geht. Wenn du es nicht trennen willst, kannst du auch mehrere IDs im Query angeben:
PHP-Code:
$query mysql_query("SELECT pid FROM mybb_posts WHERE visible = '1' AND fid in (x,y,z) ORDER BY pid DESC"); 



RE:  :Idee: <- Attachment Aufstellung aus einem bestimmten Forum - happyspeedy - 16.05.2006

Hi!!!

Ja doch, ich wollte es eigentlich trennen, so wie oben beschrieben. Smile