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

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

0 Members and 1 Guest are viewing this topic.

Offline Michinator

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: [MOD] Last comments v1
« Reply #135 on: September 18, 2007, 10:31:05 PM »
Huhu, nobody there who can help me?  :lol:

How can I enlarge the space between the content of the cell and the cell wall? (look at the yellow lines) I tried it with cellpadding or cellspacing, but it's not working.



The code of "lastcomments_bit.html" is:

Code: [Select]
<tr class="row{row_bg_number}">
<td valign="top" align="left" height="80" width="90">
{comment_image}
<br>
<b>{comment_image_name}</b>
<br>
{image_cat_name}
<br>
Kommentare: {comment_total}
</td>
<td valign="top" align="left">
<font color="#FFFFE5">
{comment_date} &#x95; {comment_user_name}
</font>
<br>
{comment_text}
</td>
</tr>

Thank you in advance!  :D

Take care,
your Michinator.
Never be afraid to try something new. Remember that amateurs built the Ark. Professionals built the Titanic.

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Last comments v1
« Reply #136 on: September 19, 2007, 01:05:16 AM »
replace:

Quote
<tr class="row{row_bg_number}">
<td valign="top" align="left" height="80" width="90">
{comment_image}
<br>
<b>{comment_image_name}</b>
<br>
{image_cat_name}
<br>
Kommentare: {comment_total}
</td>
<td valign="top" align="left">
<font color="#FFFFE5">
{comment_date} &#x95; {comment_user_name}
</font>
<br>
{comment_text}
</td>
</tr>

with:

Code: [Select]
<tr class="row{row_bg_number}">
<td valign="top" align="left" height="80" width="90">
<img src="{template_url}/images/spacer.gif" width="8" height="8" alt="" />
{comment_image}
<br>
<b>{comment_image_name}</b>
<br>
{image_cat_name}
<br>
Kommentare: {comment_total}
</td>
<td valign="top" align="left">
<img src="{template_url}/images/spacer.gif" width="8" height="8" alt="" />
<font color="#FFFFE5">
{comment_date} &#x95; {comment_user_name}
</font>
<br>
{comment_text}
</td>
</tr>
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Tino23

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • LMJ - Motorsport
Re: [MOD] Last comments v1
« Reply #137 on: October 15, 2007, 06:49:10 PM »
Die Frage wurde zwar einige Postings zu vor schon mal gestellt, aber ich hab da noch keine Antwort gefunden in der main.php wird ein Eintrag gemacht $lang['last_comments_more'] = "More comments"; der nirgends mit eingebaut ist, im besagtem Teil2 dieses Mods All Comments (Alle Kommentare) V_1_3 kommt für diese Funktion ein neuer Eintrag $lang['all_comments'] = "Alle Kommentare"; so das doch er vorherige Eintrag "Sinnloß" ist und doch gelöscht werden könnte oder sehe ich das falsch?

9.12.2007  :?:
« Last Edit: December 09, 2007, 07:05:31 PM by Tino23 »

Offline NetRebel

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: [MOD] Last comments v1
« Reply #138 on: July 20, 2008, 03:24:44 PM »
Really Excellent MOD, thanks a lot! One tiny little remark/correction though...

I am using 4images for a (PSP) UMD movie list with info. Therefore I changed the image_id tag to umd_id in constants.php. (That way the URLs look nicer for a UMD specific site.) Because of this I had to change the line...

Code: [Select]
"comment_image" => ($view_image) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$row['image_id'])."\">".$thumb."</a>" : $thumb,
...to...

Code: [Select]
"comment_image" => ($view_image) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?umd_id=".$row['image_id'])."\">".$thumb."</a>" : $thumb,
Wouldn't it be better and more correct following the 4images structure to have this part in the code follow the settings in constants.php? That way your mod will work for anyone who also changed the image_id to something else.

For the rest, great mod, I like it a lot and it was very easy to implement. Thanks again!  :thumbup:

Offline Boatswain

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • Antique photo album
Re: [MOD] Last comments v1
« Reply #139 on: September 04, 2008, 06:42:02 PM »
Just installed this mod and it seems to work fine  :wink:
Only one problem, the captcha/image verification image doesn't show up anymore on the comment page. You can only see a x there were the image is supposed to be.
Version 1.7.4
I hope you can help me.

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
« Reply #140 on: September 05, 2008, 12:28:05 AM »
Can you create a temp category where guests can post comments so I could see it in action?
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 Boatswain

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • Antique photo album
Re: [MOD] Last comments v1
« Reply #141 on: September 05, 2008, 10:15:58 AM »
Can you create a temp category where guests can post comments so I could see it in action?


I just created a category called Temp with 5 images and comments for all.
When I upload the unedited files the captcha image is back again.
I'm using Old Style as template and English as language.

This is how the created last_comment_bit.html looks like:

              <TR class="row{row_bg_number}">
                <TD width="50" height="30" align="center" rowspan="2">
                  {comment_image}
                </TD>
                <TD rowspan="2" >{comment_image_name}</TD>
                <TD rowspan="2" >[{image_cat_name}]</TD>
                 <td rowspan="2" nowrap>
                  By: {comment_user_name}{if comment_guest} ({comment_guest}){endif comment_guest}<br />
                  {comment_date}
                </td>
               <TD>{comment_headline}</TD>
              </tr>
              <tr class="row{row_bg_number}">
                <TD>{comment_text}</TD>
              </TR>

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
« Reply #142 on: September 05, 2008, 03:15:58 PM »
If you save your files in UTF8/UTF16 (Unicode) encoding, you must make sure that the editor doesn't add so called BOM to the file. If editor doesn't have such feature add or not "BOM", then change the editor ;)
There is no need save php files in other encoding then ACSII unless its a language file.

Your captcha image generated with three extra bytes at the beginning (EF BB BF) which is BOM for UTF8 encoding (in fact all your pages generated with these three extra bytes). Save all php files that you have edited with that editor in ACSII encoding and it should fix the problem.
« Last Edit: September 05, 2008, 03:55:24 PM by V@no »
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 Boatswain

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • Antique photo album
Re: [MOD] Last comments v1
« Reply #143 on: September 05, 2008, 06:11:27 PM »
If you save your files in UTF8/UTF16 (Unicode) encoding, you must make sure that the editor doesn't add so called BOM to the file. If editor doesn't have such feature add or not "BOM", then change the editor ;)
There is no need save php files in other encoding then ACSII unless its a language file.

Your captcha image generated with three extra bytes at the beginning (EF BB BF) which is BOM for UTF8 encoding (in fact all your pages generated with these three extra bytes). Save all php files that you have edited with that editor in ACSII encoding and it should fix the problem.

At least I know now were to look for  :wink:
I used another editor and the captcha image is showing up again  :D Thanks !!
Now I have a different problem and can't figure it out what's causing it.
On top of the last comments it creates extra tables, the more number of last comments the more tables.
See picture here:  http://www.boatswain.nl/pictures/picture.jpg


« Last Edit: September 05, 2008, 07:35:07 PM by Boatswain »

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
« Reply #144 on: September 06, 2008, 12:26:44 AM »
Sorry, can't help with template issues, probably an extra <td> or <tr> somewhere..
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 Hello-world

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: [MOD] Last comments v1
« Reply #145 on: September 07, 2008, 04:50:49 PM »
 :mrgreen: nice mod... thanks

Offline Boatswain

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • Antique photo album
Re: [MOD] Last comments v1
« Reply #146 on: September 08, 2008, 03:06:54 PM »
Sorry, can't help with template issues, probably an extra <td> or <tr> somewhere..

I can't find the problem either so I removed the mod, allthought the mod itself works great !!
Thanks for your help anyway, it's realy appreciated  :D

Offline Boatswain

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • Antique photo album
Re: [MOD] Last comments v1
« Reply #147 on: September 09, 2008, 04:11:31 PM »
V@no

After one more try (because I wanted this mod so bad !!) I finally succeeded, no more extra rows/tables  :D
Thanks again for your support and this great mod  :thumbup:

Offline alekinna

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
    • Gallery of cross-stitching
Re: [MOD] Last comments v1
« Reply #148 on: September 24, 2008, 01:11:02 PM »
Hi, V@no!
Thank you for this great mod! It's work perfect, however as all your mods.
My question is about "image_cat_name"  :
how can I get parametre cat_parent_id from category table to display the parent category name?

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
« Reply #149 on: September 24, 2008, 01:53:44 PM »
will this kind of answer make any sense to you?
if ($cat_cache[$row['cat_id']]['cat_parent_id']) //make sure the category is a child and has parent category
{
  
$cat_parent_name $cat_cache[$cat_cache[$row['cat_id']]['cat_parent_id']]['cat_name'];
}
else
{
  
$cat_parent_name "";
}
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)