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

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

0 Members and 1 Guest are viewing this topic.

Offline ucladidas

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: [MOD] Last comments v1
« Reply #165 on: March 11, 2009, 10:57:30 AM »
Is there a way to display the user first and last name instead of user name?  I have the additional custom db fields of user_firstname and user_lastname.  How can I have these show up instead of the username.

Thanks.

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 #166 on: March 11, 2009, 02:25:40 PM »
Re-do step 1 and customize your template to your needs (the list of new tags you can find at the bottom of first post)
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 AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] Last comments v1.1.0
« Reply #167 on: March 11, 2009, 03:24:55 PM »
Replying to the correct thread...

how do we get the user flag to display on home.html wise one :)
As long as I can finish my site before I die.

Offline ucladidas

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: [MOD] Last comments v1.1.0
« Reply #168 on: March 12, 2009, 02:02:17 AM »
V@no,

Thank you for your quick reply and posting a new code.  The {comment_additionalUserFieldName} and {image_user_additionaUserFieldName} don't seem to be working.  I just get blanks.  The additional field name I use (which is inputted in registration page and subsequently does show up in member profile pages) are user_firstname and user_lastname.  When I try using those tags (i.e., {comment_user_firstname} and even {comment_firstname}) nothing shows up on the webpage.

Do you have any ideas what might be going on?  Thank you for your help.

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.1.0
« Reply #169 on: March 12, 2009, 03:07:59 AM »
hmmm strangely not all changes I've made in my editor endup here...sorry about that,
Re-do step 1 again.
In your case {comment_user_firstname} is what you are looking for.

P.S.
I did not test the changes myself, hopefully I didn't mess it up.
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 ucladidas

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: [MOD] Last comments v1.1.0
« Reply #170 on: March 13, 2009, 10:44:00 PM »
Hi V@no,

I tried re-pasting your changes, but now I get a "DB error", saying that there is an error in my SQL syntax...

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.1.0
« Reply #171 on: March 14, 2009, 01:15:08 AM »
I'm sorry, put an extra comma at the end:
Code: [Select]
$sql = "SELECT c.image_id, c.comment_id, c.user_id as comment_user_id, c.user_name as guest_user_name, c.comment_headline, c.comment_text, c.comment_date, i.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_thumb_file".get_user_table_field(", u.", "user_name")." as user_name".get_user_table_field(", s.", "user_name")." as comment_user_name, $additional_sql

Correct line is:
Code: [Select]
$sql = "SELECT c.image_id, c.comment_id, c.user_id as comment_user_id, c.user_name as guest_user_name, c.comment_headline, c.comment_text, c.comment_date, i.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_thumb_file".get_user_table_field(", u.", "user_name")." as user_name".get_user_table_field(", s.", "user_name")." as comment_user_name $additional_sql

I've updated the original post with the correct line.
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 ucladidas

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: [MOD] Last comments v1.1.0
« Reply #172 on: March 16, 2009, 08:41:18 AM »
I still get blanks.  Nothing shows up on the webpage when I try using the {comment_user_firstname} tag...

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.1.0
« Reply #173 on: March 16, 2009, 01:26:23 PM »
ok, I found what I did wrong. Re-do step 1 one more time. it should work now.
Sorry about that.

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 ucladidas

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: [MOD] Last comments v1.1.0
« Reply #174 on: March 16, 2009, 07:04:56 PM »
Perfect!  Thank you so much!  Your skills are unparalleled...

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] Last comments v1.1.0
« Reply #175 on: April 01, 2009, 03:12:16 PM »
Greetigns...

Two questions

1) I tried to get user flags to work with this mod, but they always show the lan.gif.... even though the user flags mods works in the other comment areas...

And...

how can you get the google Ajax translation from this thread http://www.4homepages.de/forum/index.php?topic=24018.new#new

to work on this? I tried to change the code by replacing this in

<div id="translate_comment_{comment_id}">{comment_text}</div>


last_comment_bit.html

and I added this

<p>View this Comment in: <a href="javascript:google_translate('en','comment',{comment_id});"><img src="{template_url}/images/gb.png" border="0"></a> <a href="javascript:google_translate('de','comment',{comment_id});"><img src="{template_url}/images/de.png" border="0"></a> <a href="javascript:google_translate('fr','comment',{comment_id});"><img src="{template_url}/images/fr.png" border="0"></a></p>

I can see the flags but it doesnt translate....

however the mod does work fine in the normal comment_bit template....



Thanks great master for your input.... :)
As long as I can finish my site before I die.

Offline 4ella

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • http://www.dancersrecruit.com/pictures/
Re: [MOD] Last comments v1.1.0
« Reply #176 on: April 18, 2009, 04:00:43 PM »
Gotta say compliments to the authors of this Mod , works perfectly , easy 5 minuts instalation . Thought that most Mods here are only till 1.7.2 - 1.7.4 because I see mostly very old posts , but maybe I was wrong . Wanted to ask the people who create those Mods (authors) : Are you always trying the update the original (first )posts? I'm new here and I like many MOds here , but I'm forced to read all the pages from the year 2002 till 2009 if the Mod is also working in latest  1.7.6 version ,  Thanks again !!!

http://www.dancersrecruit.com/pictures/
4IMAGES 1.7.6 version/default theme
Apache version   2.2.11 (Unix)
PHP version   5.2.9
MySQL version   5.0.75-community-log
Architecture   x86_64
Operating system   Linux

Offline rescue911

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: [MOD] Last comments v1.1.0
« Reply #177 on: April 19, 2009, 01:12:52 PM »
i already have this mod installed for a while and it works just perfectly.
however today i switched over to "thumbnail_openwindow" which also works ok. however i had to modify the top.html to make it work there.

but my problem now is that when i click on the pictures or text links from the last comments, it does not open a pop-up but opens directly in the same window.
so my question: what do i need to modify there?

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.1.0
« Reply #178 on: April 19, 2009, 09:03:00 PM »
re-do step 1 and use {comment_image_openwindow} and {comment_image_name_openwindow} tags in last_comment_bit.html template
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 #179 on: April 19, 2009, 09:57:09 PM »
ok now it does not open anymore in the same window. i now get it in a new tab of my browser.
but...how to make to get it as a pop-up, just like the details pages with "thumbnail_openwindow"?