SMFHacks.com
SMFHacks
Community Suite
SMF Gallery Pro
SMF Store
SMF Classifieds
Newsletter Pro
Downloads System Pro
Ad Seller Pro
Hacks and Mods
Latest SMF Hacks
TopTen Hacks
Styles and Themes
Add a Hack
Manage Hacks
Earn Money from Your Forum with these tips
SMF Theme Generator
SMF Package Parser
Free SMF Hosting
HostRocket Webhosting for SMF
Site Showcase
Search Forums
Advanced search
User
Welcome,
Guest
. Please
login
or
register
.
May 23, 2012, 05:42:14 am
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Stats
Members
Total Members: 10069
Latest:
tetsujrock
Stats
Total Posts: 28682
Total Topics: 4975
Online Today: 94
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 72
Total: 72
SMFHacks.com
Forum
SMF Gallery Pro
Support
Latest comments
0 Members and 1 Guest are viewing this topic.
« previous
next »
Pages:
[
1
]
2
3
4
Author
Topic: Latest comments (Read 13901 times)
smartmouse
Newbie
Offline
Posts: 21
Latest comments
«
on:
January 15, 2008, 12:26:01 am »
Hello, any way to create a tp module that shows latest comments added?
Thank you.
Logged
smartmouse
Newbie
Offline
Posts: 21
Re: Latest comments
«
Reply #1 on:
January 15, 2008, 02:57:06 pm »
Is it possible to do it?
Logged
SMFHacks
Administrator
Hero Member
Offline
Posts: 9676
Re: Latest comments
«
Reply #2 on:
January 15, 2008, 07:58:32 pm »
Yes it is would require checking the gallery comments table with a database query
Logged
smartmouse
Newbie
Offline
Posts: 21
Re: Latest comments
«
Reply #3 on:
January 16, 2008, 07:52:20 am »
I can't do it... is it easy for you create that query?
Logged
smartmouse
Newbie
Offline
Posts: 21
Re: Latest comments
«
Reply #4 on:
January 17, 2008, 10:57:44 am »
Please some one can help me to create a php module that show latest comments?
Logged
rumboogy
SMF Gallery Pro Customer
Full Member
Offline
Posts: 215
Re: Latest comments
«
Reply #5 on:
January 17, 2008, 12:23:48 pm »
I like that idea...but unfortunately it would take more expertise than I have...interesting though...I will watch this thread. You could also check over at the
TP Site
.
Wally
«
Last Edit: January 17, 2008, 12:25:59 pm by rumboogy
»
Logged
Rumboogy
"Yeah, I got way too many irons in the fire"
Biker Site:
http://www.razorbiker.com
Biker Site:
http://www.arkansasbiker.net
Zumo GPS:
http://www.zumoforums.com
Personal Site:
http://www.wallyjarratt.com
smartmouse
Newbie
Offline
Posts: 21
Re: Latest comments
«
Reply #6 on:
January 18, 2008, 05:56:26 am »
@admin: can you create a module like this?
http://www.smfhacks.com/index.php/topic,125.msg8845.html#msg8845
I think you can modify it to make it showing latest comments instead of random images.
Am i right or maybe it is more difficult than i think?
I hope can do it.
Thank you.
Logged
smartmouse
Newbie
Offline
Posts: 21
Re: Latest comments
«
Reply #7 on:
January 20, 2008, 05:47:23 pm »
Anyone (maybe a programmer) can help me?
Logged
smartmouse
Newbie
Offline
Posts: 21
Re: Latest comments
«
Reply #8 on:
March 10, 2008, 10:20:13 am »
I'm here again!
I tried my best to write this:
Code:
function ssi_lastcom ($cat)
{
global $scripturl,$db_prefix;
$cat = (int) $cat;
$request = db_query("SELECT comment, date, ID_MEMBER, ID_PICTURE FROM {$db_prefix}gallery_comment GROUP BY comment ORDER BY date DESC LIMIT 5", __FILE__, __LINE__);
$row = mysql_fetch_assoc($request);
mysql_free_result($request);
echo' <a href="', $scripturl, '?action=gallery;sa=view;id=', $row['ID_PICTURE'], '"><small>', $row['comment'], '</small></a><br />Written by: <strong>', $row['ID_MEMBER'], ' '
;}
It works, but it shows only 1 comment...
So, do you know how to make it to show more than 1 comment? I write LIMIT 5 but it does not work!
In addition, do you know how to show member name instead of member id ?
Logged
SMFHacks
Administrator
Hero Member
Offline
Posts: 9676
Re: Latest comments
«
Reply #9 on:
March 10, 2008, 07:29:55 pm »
Try this
Code:
function ssi_lastcom ($cat)
{
global $scripturl,$db_prefix;
$cat = (int) $cat;
$request = db_query("SELECT comment, date, ID_MEMBER, ID_PICTURE FROM {$db_prefix}gallery_comment ORDER BY date DESC LIMIT 5", __FILE__, __LINE__);
while($row = mysql_fetch_assoc($request))
{
echo' <a href="', $scripturl, '?action=gallery;sa=view;id=', $row['ID_PICTURE'], '"><small>', $row['comment'], '</small></a><br />Written by: <strong>', $row['ID_MEMBER'];
}
mysql_free_result($request);
}
«
Last Edit: March 10, 2008, 08:09:12 pm by SMFHacks
»
Logged
rumboogy
SMF Gallery Pro Customer
Full Member
Offline
Posts: 215
Re: Latest comments
«
Reply #10 on:
March 10, 2008, 07:51:26 pm »
I tried smartmouse's code and got no errors, but I also got no comment.
I tried Mr. Hacks code...and got the same thing. Just curious...and you may or may not want to develop this or work on it...but to me it seems like it would have more meaning if the block ALSO included the image that was being commented on...
Thanks.
Wally
Logged
Rumboogy
"Yeah, I got way too many irons in the fire"
Biker Site:
http://www.razorbiker.com
Biker Site:
http://www.arkansasbiker.net
Zumo GPS:
http://www.zumoforums.com
Personal Site:
http://www.wallyjarratt.com
smartmouse
Newbie
Offline
Posts: 21
Re: Latest comments
«
Reply #11 on:
March 11, 2008, 08:49:35 am »
My friend help me and now it works. Here is the working code:
Code:
function ssi_lastcom ($cat)
{
global $scripturl,$db_prefix;
$cat = (int) $cat;
$request = db_query("SELECT comment, date, ID_MEMBER, ID_PICTURE FROM {$db_prefix}gallery_comment GROUP BY comment ORDER BY date DESC LIMIT 5", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request)) {
echo' <a href="', $scripturl, '?action=gallery;sa=view;id=', $row['ID_PICTURE'], '"><small>', $row['comment'], '</a><br />Scritto da: <strong>', $row['ID_MEMBER'], '<br /><br /></strong></small> ';
}
mysql_free_result($request);
}
Now i have to fix just the last thing: how to show member name instead of member id?
It results in messages like
"Hello world" written by: 2
, instead of
"Hello world" written by: John
.
Do you understand what i mean? How to fix it?
Logged
smartmouse
Newbie
Offline
Posts: 21
Re: Latest comments
«
Reply #12 on:
March 11, 2008, 08:51:56 am »
Ehm.. it is the same code posted by SMFHacks.
Anyway how to fix my problem?
Logged
rumboogy
SMF Gallery Pro Customer
Full Member
Offline
Posts: 215
Re: Latest comments
«
Reply #13 on:
March 11, 2008, 10:32:57 am »
Quote from: smartmouse on March 11, 2008, 08:51:56 am
Ehm.. it is the same code posted by SMFHacks.
Anyway how to fix my problem?
Smartmouse...I only get a blank block with your new code.
Also...don't you think the block should also include the image with the last comment? yes, no?
Maybe I am missing something, the function ssi_lastcom ($cat)...is that something that should be in my SSI.php file?
Wally
Logged
Rumboogy
"Yeah, I got way too many irons in the fire"
Biker Site:
http://www.razorbiker.com
Biker Site:
http://www.arkansasbiker.net
Zumo GPS:
http://www.zumoforums.com
Personal Site:
http://www.wallyjarratt.com
smartmouse
Newbie
Offline
Posts: 21
Re: Latest comments
«
Reply #14 on:
March 11, 2008, 12:33:04 pm »
I added the code that i posted above at the end of SSI.php file.
Then i create a new block in TPortal and i added the following code:
Code:
ssi_lastcom();
It works.
Logged
Pages:
[
1
]
2
3
4
« previous
next »
Jump to:
Please select a destination:
-----------------------------
SMFHacks.com
-----------------------------
=> News
=> Site Discussion
===> Suggestions
===> Bugs
-----------------------------
SMF Gallery Pro
-----------------------------
=> Announcements
=> Presales
=> Support
===> Bugs
===> Feature Requests
-----------------------------
SMF Store
-----------------------------
=> Announcements
=> Presales
=> Support
===> Guides and Tips
===> Feature Requests
===> Bugs
-----------------------------
SMF Classifieds
-----------------------------
=> Announcements
=> Presales
=> Support
===> Bugs
===> Feature Requests
-----------------------------
Downloads System Pro
-----------------------------
=> Announcements
=> Presales
=> Support
===> Feature Requests
===> Bugs
-----------------------------
Ad Seller Pro
-----------------------------
=> Presales
=> Support
-----------------------------
Newsletter Pro
-----------------------------
=> Presales
=> Support
===> Feature Requests
-----------------------------
Social Login Pro
-----------------------------
=> Presales
-----------------------------
Badge Awards
-----------------------------
=> Presales
-----------------------------
Tweet Topics/FB Post System
-----------------------------
=> Presales
-----------------------------
SMF Gallery Lite
-----------------------------
=> SMF Gallery Lite
-----------------------------
Modifications/Themes
-----------------------------
=> General SMF Forum
=> Modifications Talk
===> Latest Mods
===> Modification Showcase
=> Theme Talk
===> Theme Showcase
===> Latest Themes
Recent
Store IPN AMOUNT CHANGE
by
ApplianceJunk
[May 21, 2012, 08:54:11 am]
Transferring Db data from...
by
~ Phåråoh ~
[May 20, 2012, 11:06:52 am]
SMF vs PhpBB
by
channgam
[May 20, 2012, 05:58:11 am]
Any news?
by
SMFHacks
[May 19, 2012, 06:16:58 pm]
Social Login Pro domain c...
by
SMFHacks
[May 19, 2012, 05:42:37 pm]
licence information and q...
by
SMFHacks
[May 18, 2012, 03:08:38 pm]
no pictures after upgrade
by
SMFHacks
[May 17, 2012, 06:07:46 pm]
Viewers?
by
ApplianceJunk
[May 17, 2012, 02:22:07 pm]
Incorrect download counts...
by
SMFHacks
[May 17, 2012, 12:38:16 pm]
SMF V2.0.2 compatibility ...
by
~ Phåråoh ~
[May 15, 2012, 09:32:27 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Loading...