Verfasst: 06.06.2005 09:53
Das sieht vielversprechend aus ... Danke!!!Markus67 hat geschrieben:Hi ...
Kennst du den Beitrag schon?
http://smartor.is-root.com/viewtopic.php?t=12090
Markus
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Das sieht vielversprechend aus ... Danke!!!Markus67 hat geschrieben:Hi ...
Kennst du den Beitrag schon?
http://smartor.is-root.com/viewtopic.php?t=12090
Markus
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 -----------------------------------------------------
Bei mir auchgloriosa hat geschrieben:Hallo,
ich habe es soeben eingebaut !Funktioniert ebenfalls Super !
![]()
![]()
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);
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);
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
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]
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);
"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