Page 1 of 2

Last X [img] on Forum

PostPosted: Mon 12. Apr 2010, 18:04
by Huchinotte
Hi 4seven ...........

wir hatten schon mal das vergnügen auf phpbb.de wegen einer Suchanfrage von mir, wo ich einen Mod suche der fast die Funktionen hat wie dein Last X [img] on Forum. Wie gesagt aber nur fast :smile:
Eventuell kann man ja mit einfachen mitteln (die mir aber wohl fehlen) deinen dem entsprechend umbauen.
Was ich suche ist eine Funktion wo ich in einem Post eine Url eingeben kann zu einem Pic welches dann im Index dargestellt wird. Ich mach mal nen Screen was ich meine
Image
Da kann man bei Portalbild einfach ne url zu einem Pic eingeben welches dann im Portal dargestellt wird. So würde ich mit das vorstellen nur halt auf dem Index.

Gruß Huch

Re: Last X [img] on Forum

PostPosted: Fri 16. Apr 2010, 09:16
by Huchinotte
Hi ........ 4seven,

wenn es obere Möglichkeit nicht gibt ne Frage zum vorhandenen Mod.
Wenn ich die Beschreibung richtig verstehe wird nur jedes 1 Bild im Thread im index dargestellt. Besteht die Möglichkeit das ich nur jedes 2 Bild im Thread darstellen kann? Es ist so das wir in bestimmten Foren ein Startimage im Thread haben und danach erst die eigentlichen Bilder. Demnach würde jetzt ja nur das Startimage dargestellt werden und nicht das eigentliche Bild.

Re: Last X [img] on Forum

PostPosted: Fri 16. Apr 2010, 23:44
by 4seven
du könntest im code zb gif ausschließen und dann das erste bild als gif einfügen...

So würde ich mit das vorstellen nur halt auf dem Index.

das wäre ein neuer mod für eine einzelne person. dafür habe ich unentgeltlich keine zeit.

Re: Last X [img] on Forum

PostPosted: Mon 19. Apr 2010, 08:32
by Huchinotte

4seven wrote:
du könntest im code zb gif ausschließen und dann das erste bild als gif einfügen...

Hm könntest du mir dazu den code sagen? Bin leider nicht so bewandert damit ........ wäre nett


4seven wrote:
das wäre ein neuer mod für eine einzelne person. dafür habe ich unentgeltlich keine zeit.

Das verstehe ich natürlich!

Gruß Huch

Re: Last X [img] on Forum

PostPosted: Mon 19. Apr 2010, 10:47
by 4seven

Huchinotte wrote:
könntest du mir dazu den code sagen


ersetze in beiden dateien..

last_x_img_on_forum_orphan.php
last_x_img_on_forum.php

das

Code: Select all
(.*?).png|(.*?).gif


mit dem

Code: Select all
(.*?).png

Re: Last X [img] on Forum

PostPosted: Mon 19. Apr 2010, 11:05
by Huchinotte
Hi .........

hm funzt leider nicht, bekomme dabei folgende Meldung im Header
Code: Select all
[phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php  on line 153: preg_match_all() [function.preg-match-all]: Compilation failed: missing ) at offset 59
[phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 155: Invalid argument supplied for foreach()
[
phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 153: preg_match_all() [function.preg-match-all]: Compilation failed: missing ) at offset 59
[phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 155: Invalid argument supplied for foreach()
[
phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 153: preg_match_all() [function.preg-match-all]: Compilation failed: missing ) at offset 59
[phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 155: Invalid argument supplied for foreach()
[
phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 153: preg_match_all() [function.preg-match-all]: Compilation failed: missing ) at offset 59
[phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 155: Invalid argument supplied for foreach()
[
phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 153: preg_match_all() [function.preg-match-all]: Compilation failed: missing ) at offset 59
[phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 155: Invalid argument supplied for foreach()
[
phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 153: preg_match_all() [function.preg-match-all]: Compilation failed: missing ) at offset 59
[phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 155: Invalid argument supplied for foreach()
[
phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 153: preg_match_all() [function.preg-match-all]: Compilation failed: missing ) at offset 59
[phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 155: Invalid argument supplied for foreach()
[
phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 153: preg_match_all() [function.preg-match-all]: Compilation failed: missing ) at offset 59
[phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 155: Invalid argument supplied for foreach()
[
phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 153: preg_match_all() [function.preg-match-all]: Compilation failed: missing ) at offset 59
[phpBB Debug] PHP Notice: in file /includes/last_x_img_on_forum.php on line 155: Invalid argument supplied for foreach() 


Den Code habe ich in beiden Dateien abgeändert und sieht nun so aus:
Code: Select all
preg_match_all('#\[img:(.*?)\]((.*?).jpg|(.*?).jpeg|(.*?).png\[\/img:(.*?)\]#i', $row_img['post_text'], $current_posted_img); 


Auch wird dadurch kein Thumbnail mehr erstellt im Ordner images\last_x_img

Gruß Huch

Re: Last X [img] on Forum

PostPosted: Mon 19. Apr 2010, 11:10
by 4seven

Huchinotte wrote:
Den Code habe ich in beiden Dateien abgeändert und sieht nun so aus:
Code: Select all
preg_match_all('#\[img:(.*?)\]((.*?).jpg|(.*?).jpeg|(.*?).png\[\/img:(.*?)\]#i', $row_img['post_text'], $current_posted_img); 

du hast falsch editiert, besser gesagt > die schließende klammer wegeditiert: (.*?).png)

ich sagte nichts davon, die schließende klammer zu löschen ;-)


4seven wrote:
ersetze in beiden dateien..

last_x_img_on_forum_orphan.php
last_x_img_on_forum.php

das

Code: Select all
(.*?).png|(.*?).gif


mit dem

Code: Select all
(.*?).png

Re: Last X [img] on Forum

PostPosted: Mon 19. Apr 2010, 11:23
by Huchinotte

4seven wrote:
ich sagte nichts davon, die schließende klammer zu löschen ;-)

Hm .... wie wahr ..... da hat doch irgend jemand mir die schließende Klammer geklaut :lol: . Danke für deine Geduld und Hilfe

Gruß Huch

Re: Last X [img] on Forum

PostPosted: Mon 19. Apr 2010, 13:45
by 4seven
diese frage
https://www.phpbb.de/community/viewtopi ... 3#p1175613
hättest du auch hier stellen können

Re: Last X [img] on Forum

PostPosted: Mon 19. Apr 2010, 19:13
by Huchinotte

4seven wrote:
diese frage
https://www.phpbb.de/community/viewtopi ... 3#p1175613
hättest du auch hier stellen können

Jo auch wieder war ;-)

Hab aber trotzdem noch eine Frage zu den Settings in der last_x_img_on_forum
Wenn ich den crawl effekt einschalte wird mir je nach Bildschirmauflösung eine verschiedene Anzahl von Thumbnails dargestellt. Schalte ich den Crawl Effekt aus dann werden mir 9 Thumbnail Bilder angezeigt.
In den Einstellungen habe ich aber
Code: Select all
// number of max pics to show 
// (important if user have no javacript enabled or $detect_java_screen  is set to 'no';)
$max_img_to_show  = 11;
// enter as given 9 or 12 etc.  

eingestellt.
So die Fragen wären, warum werden mit crawl je nach Auflösung eine verschiedene Anzahl angezeigt und ohne Crawl nur 9. Welche Funktion hat dann die oben gepostete Einstellung?
Danke für Info! Ach ja kann man auch das so coden das gesperrte Topics nicht berücksichtig werden? Das wäre genial.

Gruß Huch