Das sieht vielversprechend aus ... Danke!!!Markus67 hat geschrieben:Hi ...
Kennst du den Beitrag schon?
http://smartor.is-root.com/viewtopic.php?t=12090
Markus
[img] geht nicht mehr mit Bildern des Fotoalbums!
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.1, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.1, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
-
- Mitglied
- Beiträge: 349
- Registriert: 13.08.2003 15:44
- Wohnort: Frankfurt am Main
- Kontaktdaten:
-
- Mitglied
- Beiträge: 349
- Registriert: 13.08.2003 15:44
- Wohnort: Frankfurt am Main
- Kontaktdaten:
Vielleicht hier nochmal kurz die Lösung:
Bei mir läuft es!
Gruss
Matthias
Code: Alles auswählen
BEGINNING OF HACK -----------------------------------------------------
HACK NAME: BJB1
HACK VERSION: 1.0
PHPBB2 VERSION: 2.0.11
PHOTO ALBUM VERSION: 2.0.53
OPEN
includes/bbcode.php
FIND
// [img]image_url_here[/img] code..
$text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
AFTER, ADD
//*****************************************************
// HACK: Allow embedded images from this server's photo album
// [img]http://www.example.com/forum_image_url[/img] code.
// Option 1:
$text = preg_replace("#\[img\](http://www\.example\.com/[^?[\]]*album_(pic|thumbnail)\.php\?pic_id=\d+)\[\/img\]#sie", "'[img:$uid]' . str_replace(' ', '%20', '\\1') . '[/img:$uid]'", $text);
//*****************************************************
IN THE ADDED LINE, FIND
example\.com
IN THE ADDED LINE, REPLACE WITH
<your_server_name>\.<your_server_domain>
(For example, to use "www.myserver.com", replace "example\.com" with
"myserver\.com".)
SAVE AND CLOSE ALL FILES
END OF HACK -----------------------------------------------------
Gruss
Matthias
-
- Mitglied
- Beiträge: 349
- Registriert: 13.08.2003 15:44
- Wohnort: Frankfurt am Main
- Kontaktdaten:
Re: Super
Bei mir auchgloriosa hat geschrieben:Hallo,
ich habe es soeben eingebaut !Funktioniert ebenfalls Super !
![]()
![]()

übrigens:
Code: Alles auswählen
$text = preg_replace("#\[img\](http://www\.example\.com/[^?[\]]*album_(pic|thumbnail)\.php\?pic_id=\d+)\[\/img\]#sie", "'[img:$uid]' . str_replace(' ', '%20', '\\1') . '[/img:$uid]'", $text);
Du kannst das "www\." weglassen oder das "com" ersetzen durch andere domainendungen. => Falls Dein Forum unter mehreren URL's erreichbar ist ...
Gruß
M.
hi leute ich finde die idee super nur was ist wenn ich bilder von andern und von meiner seite verwenden will
das mit dem
kalpt nicht ka warum ich denke das man woanderst noch was ändern muss
hat jemand noch ne andere alternatve
das mit dem
Code: Alles auswählen
$text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png|php|php?pic_id=*)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
hat jemand noch ne andere alternatve
-
- Mitglied
- Beiträge: 349
- Registriert: 13.08.2003 15:44
- Wohnort: Frankfurt am Main
- Kontaktdaten:
SchaTTen hat geschrieben:hi leute ich finde die idee super nur was ist wenn ich bilder von andern und von meiner seite verwenden will
das mit demkalpt nicht ka warum ich denke das man woanderst noch was ändern mussCode: Alles auswählen
$text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#"\n\r\t<]*?(\.(jpg|jpeg|gif|png|php|php?pic_id=*)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
hat jemand noch ne andere alternatve
http://smartor.is-root.com/viewtopic.php?t=12090
ich glaube ich bin zu doof für den scheiß ich habe auch schon auf http://smartor.is-root.com/viewtopic.php?t=12090 gesucht aber da habe ich auch schon 10 verschiedene möglichkeiten durch aber es klapt einfach nicht oder muss ich was ändern wenn ich will die URL einbinden:Latinoportal hat geschrieben:Vielleicht hier nochmal kurz die Lösung:
Bei mir läuft es!Code: Alles auswählen
BEGINNING OF HACK ----------------------------------------------------- HACK NAME: BJB1 HACK VERSION: 1.0 PHPBB2 VERSION: 2.0.11 PHOTO ALBUM VERSION: 2.0.53 OPEN includes/bbcode.php FIND // [img]image_url_here[/img] code.. $text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text); AFTER, ADD //***************************************************** // HACK: Allow embedded images from this server's photo album // [img]http://www.example.com/forum_image_url[/img] code. // Option 1: $text = preg_replace("#\[img\](http://www\.example\.com/[^?[\]]*album_(pic|thumbnail)\.php\?pic_id=\d+)\[\/img\]#sie", "'[img:$uid]' . str_replace(' ', '%20', '\\1') . '[/img:$uid]'", $text); //***************************************************** IN THE ADDED LINE, FIND example\.com IN THE ADDED LINE, REPLACE WITH <your_server_name>\.<your_server_domain> (For example, to use "www.myserver.com", replace "example\.com" with "myserver\.com".) SAVE AND CLOSE ALL FILES END OF HACK -----------------------------------------------------
Gruss
Matthias
Code: Alles auswählen
http://www.sttweb.de/mx/modules/mx_smartor/album.php?smartor_mode=album_picm&pic_id=1
Code: Alles auswählen
[img]http://www.sttweb.de/mx/modules/mx_smartor/album.php?smartor_mode=album_picm&pic_id=1[/img]
-
- Mitglied
- Beiträge: 349
- Registriert: 13.08.2003 15:44
- Wohnort: Frankfurt am Main
- Kontaktdaten:
Theory of Operation, Part One: The original phpBB2 code looks at the URL in between [img]and[/img] tags and checks to see whether it matches a certain pattern. Specifically the pattern says the URL must end in ".gif", ".jpg", ".jpeg", or ".png". Because Photo Album image URLs don't match this pattern, they don't get converted into inline images. phpBB2 does this because embedding PHP web pages is a security risk.
Theory of Operation, Part Two: The hack doesn't change the original phpBB2 code or its matching behavior. Instead, it works by adding a second check, matching URLs that look like Photo Album image URLs. To minimize the security risk, it tries to allow only those URLs from a certain web server.
Limitations of the hack include:
1. Only works with albums on www.example.com, not other servers.
2. Must use http; can't use ftp, https, ftps.
3. Must use www.example.com; can't use example.com.
4. Might not work with nonstandard-but-valid URL variations, like http://www.example.com/////forum///albu ... &&pic_id=3 (The 99.5% of people who use normal URLs should be fine.)
To get around Limitation 1, for every server you want to allow, just add an additional line of code. The line will be a duplicate of the hack code with the server name replaced. For example, to add "www.another.net", replace "example\.com" with "another\.net". To reduce the security risk, you should only add servers that are trusted.
To get around Limitation 2, you can replace the Option 1 code with the following Option 2 code. It more closely resembles the original phpBB2 code. This has not been tested.
Code:
// Option 2:
To get around Limitation 3, you can replace the text "www\." with "(www\.)?". This has not been tested. Theory of operation: the replacement code makes "www." optional.
Option: To limit embedded images to thumbnail images (full-size images not allowed), you can replace the text "album_(pic|thumbnail)" with "album_thumbnail". This has not been tested. Theory of operation: the replacement code only allows "album_thumbnail" instead the two variations.
Option: You can replace "[^?[\]]*" with ".*?". This should also work, though it hasn't been tested. Theory of operation: To avoid matching multiple sets of image tags, the first solution's match omits certain characters that should be at the end of the URL, "?", "[", and "]". The second solution's match includes all characters, but the terminating "?" character causes the match to be as small as possible-- only one set of image tags.
Theory of Operation, Part Two: The hack doesn't change the original phpBB2 code or its matching behavior. Instead, it works by adding a second check, matching URLs that look like Photo Album image URLs. To minimize the security risk, it tries to allow only those URLs from a certain web server.
Limitations of the hack include:
1. Only works with albums on www.example.com, not other servers.
2. Must use http; can't use ftp, https, ftps.
3. Must use www.example.com; can't use example.com.
4. Might not work with nonstandard-but-valid URL variations, like http://www.example.com/////forum///albu ... &&pic_id=3 (The 99.5% of people who use normal URLs should be fine.)
To get around Limitation 1, for every server you want to allow, just add an additional line of code. The line will be a duplicate of the hack code with the server name replaced. For example, to add "www.another.net", replace "example\.com" with "another\.net". To reduce the security risk, you should only add servers that are trusted.
To get around Limitation 2, you can replace the Option 1 code with the following Option 2 code. It more closely resembles the original phpBB2 code. This has not been tested.
Code:
// Option 2:
Code: Alles auswählen
$text = preg_replace("#\[img\]((http|ftp|https|ftps)://)(www\.example\.com/[^?[\]]*album_(pic|thumbnail)\.php\?pic_id=\d+)\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
To get around Limitation 3, you can replace the text "www\." with "(www\.)?". This has not been tested. Theory of operation: the replacement code makes "www." optional.
Option: To limit embedded images to thumbnail images (full-size images not allowed), you can replace the text "album_(pic|thumbnail)" with "album_thumbnail". This has not been tested. Theory of operation: the replacement code only allows "album_thumbnail" instead the two variations.
Option: You can replace "[^?[\]]*" with ".*?". This should also work, though it hasn't been tested. Theory of operation: To avoid matching multiple sets of image tags, the first solution's match omits certain characters that should be at the end of the URL, "?", "[", and "]". The second solution's match includes all characters, but the terminating "?" character causes the match to be as small as possible-- only one set of image tags.
-
- Mitglied
- Beiträge: 349
- Registriert: 13.08.2003 15:44
- Wohnort: Frankfurt am Main
- Kontaktdaten:
"http://www\.example\.com"SchaTTen hat geschrieben:das ist ja ganz schön und gut aber es funzt nicht
eigendlich war das auch zu erwarten da ja in fast jeder 2ten zeile zu lesen war "This has not been tested"
kann mir noch jemand weiter helfen von der theorie sind die codes ja einleuchtend aber leider funzen sie in der praxis nicht
diesen Schnipsel des Codes musst Du ersetzen durch die Domain, die Du zulassen möchtest. Du kannst den Absatz, indem sich dieser Schnipsel befindet, auch mehrfach mit verschiedenen Domains einfügen ...
Gruß
Matthias