• [MOD] Last comments v1.2.0 4 0 5 1
Currently:  

Author Topic: [MOD] Last comments v1.2.0  (Read 250706 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Last comments v1.2.0
« Reply #180 on: April 19, 2009, 10:12:34 PM »
ok, try again re-do step 1
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline rescue911

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: [MOD] Last comments v1.2.0
« Reply #181 on: April 19, 2009, 10:36:30 PM »
*perfect*
« Last Edit: April 19, 2009, 11:06:18 PM by rescue911 »

Offline sanko86

  • Sr. Member
  • ****
  • Posts: 310
    • View Profile
    • Elemegim
Re: [MOD] Last comments v1.2.0
« Reply #182 on: June 14, 2009, 10:51:18 AM »
thank you.Perfect mod.

Demo:www.elemegim.info
Web site:http://www.anlatiyoruz.com
Hayat zorluklarla doludur.Ama en zoru insanýn insana düþmanlýðýdýr.

Offline daymos

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: [MOD] Last comments v1.2.0
« Reply #183 on: July 05, 2009, 04:07:33 PM »
Hi All!
How to display {user_avatar_current}?

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [MOD] Last comments v1.2.0
« Reply #184 on: July 10, 2009, 12:13:52 AM »
Thanx for this mod... Just this tiny question:

I've already added this part:
Code: [Select]
 if (strlen($text) > $text_len)
  {
    $text = substr($text, 0, $text_len)."...";
  }

with this one below...

Code: [Select]
 if (strlen($row['image_name']) > 19)
  {
    $row['image_name'] = substr($row['image_name'], 0, 19)."...";
  }

With that, the image-title is not so long (in this case 19) and fits to the size of my thumb.

Update: I guess it's not the best version, but I've found a solution. Open thumbnail_bit.html in the template-order and replace {image_name} with
Code: [Select]
<?
    $shortname = "{image_name}";
  if (strlen($shortname) > 19)
  {
    $shortname = substr($shortname, 0, 19)."...";
  }
  echo $shortname;
?>
...to limit it to 19 signs.



But still need support with:

NOW I'd like to delete the <br /> which are included sometimes, if an user made a
"word wrap". But the following code doesn't work (Below line 77 in the index.php, where
$text = $row['comment_text']; is shown)

Code: [Select]
$text = str_replace("<br />","",$text);
Any ideas, what I made wrong?  :(



Something else: How to avoid double-posts? So that max. one thumb appears (in the home.html), when 2 or more comments are in one photo?
« Last Edit: July 11, 2009, 12:10:22 AM by Schnick und Schnack »

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [MOD] Last comments v1.2.0
« Reply #185 on: July 12, 2009, 01:30:14 PM »
Hi V@no,

you should change the following part in the index.php
Code: [Select]
  if (strlen($text) > $text_len)
  {
    $text = substr($text, 0, $text_len)." ...";
  }
to this...
Code: [Select]
  if (strlen($text) > $text_len)
  { $text = strip_tags($text);
    $text = substr($text, 0, $text_len)." ...";
  }
...in case you've allowed your users to write comments in HTML.
Otherwise (and with $text_len) it will destroy your layout.

Offline Tino23

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • LMJ - Motorsport
Re: [MOD] Last comments v1.2.0
« Reply #186 on: July 18, 2009, 11:31:15 AM »
Hi, der Mod läuft bei mir schon seit einiger Zeit super. Hab bloß leztens mal bemerkt, das der BBCode in den Kommentaren nicht richtig angezeigt wird... Gibts da eine Möglichkeit sich den BBCODe auch in der Übersicht der letzten Kommentare richtig anzeigen zu lassen?

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [MOD] Last comments v1.2.0
« Reply #187 on: July 19, 2009, 03:43:44 AM »
Hi, der Mod läuft bei mir schon seit einiger Zeit super. Hab bloß leztens mal bemerkt, das der BBCode in den Kommentaren nicht richtig angezeigt wird... Gibts da eine Möglichkeit sich den BBCODe auch in der Übersicht der letzten Kommentare richtig anzeigen zu lassen?
Wie meinst Du das, "nicht richtig"? Manchmal ja, manchmal nein?
Meines Erachtens liegt nämlich das Hauptproblem in der Variable
Code: [Select]
$text_len = 200; //max lenght of the text to show (bbcode and html are counted too)Die Textlänge bezieht sich auf alles, also auch auf den BBCode und schneidet dann stumpf ab.

Offline Tino23

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • LMJ - Motorsport
Re: [MOD] Last comments v1.2.0
« Reply #188 on: July 25, 2009, 10:42:22 AM »
Na wenn ich unter den Bildern ein Kommentar Schreibe, welches BBD Code enthält zum Beispiel, wenn ich einen Link angeben ähnlich in HTML <a href="home.html">Link</a> wird mit dann unter Nachrichten ja Link angezeigt unt darunter ferbirgt sich dann die eigentliche URL. In dem Fenster letzte Nachrichten wird mir aber nur die eigentliche URL angezeigt und nicht wie gewollt dort auch nur der Schriftzug Link

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [MOD] Last comments v1.2.0
« Reply #189 on: July 25, 2009, 06:10:25 PM »
Hast Du denn den BBCode für Kommentare erlaubt?

Offline Tino23

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • LMJ - Motorsport
Re: [MOD] Last comments v1.2.0
« Reply #190 on: July 26, 2009, 10:53:03 AM »
Ja, in der Galerie selber geht es ja auch, nur auf der Startseite, wo die letzten Kommentare angezeigt werden, geht es nicht.

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [MOD] Last comments v1.2.0
« Reply #191 on: July 26, 2009, 03:54:48 PM »
Dann hängt es mit der Textbegrenzung zusammen (siehe ein paar Beiträge vorher).

Offline Tino23

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • LMJ - Motorsport
Re: [MOD] Last comments v1.2.0
« Reply #192 on: July 30, 2009, 08:04:34 PM »
Danke genau das war es. Hatte bei mir Max. 100 Zeichen eingestellt...

Offline sterroa

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: [MOD] Last comments v1.2.0
« Reply #193 on: August 22, 2009, 10:11:38 PM »
kann ich dieses mod auch bei 4images 1.7.6 oder 1.7.7 installieren, was muss ich anders machen?


Offline CorFie

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: [MOD] Last comments v1.2.0
« Reply #194 on: October 15, 2009, 11:20:51 AM »
Ich habs gerade getestet in 1.7.7 funktioniert er auch