Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Last topic post

Asked Modified Viewed 3,989 times
S
Skulz
S
Skulz 10
  • Member, joined since
  • Contributed 76 posts on the community forums.
  • Started 20 threads in the forums
  • Started this discussions
asked
Member

Hello, I would like to add the topic name in the "last topic post" sections of the forum.
Like for example actually it is:
17-09-2013 14:56
by test

While i would like it to be:
17-09-2013 14:56
on informations about blabla
by test

Can it be done? How?
thz in advance :)
0 replies

5 posts

D
DrunkeN
D
  • Member, joined since
  • Contributed 161 posts on the community forums.
  • Started 18 threads in the forums
answered
Member

Hi try this.

Open forum/index.php

Find
      } else {
         $fim = "<img src='".get_image("folder")."' alt='".$locale['561']."' />";
      }


Add this after
      $ttdata = dbarray(dbquery("
                    SELECT tt.forum_id, tt.thread_id, tt.thread_subject, tt.thread_lastpostid, tt.thread_lastuser,
                 u.user_id, u.user_name, u.user_status
                 FROM ".DB_THREADS." tt
                 LEFT JOIN ".DB_USERS." u ON tt.thread_lastuser = u.user_id
                 WHERE tt.forum_id='".$data['forum_id']."' AND tt.thread_hidden='0'
                 ORDER BY thread_lastpost DESC"
               )
         );



Find
echo showdate("forumdate", $data['forum_lastpost'])."<br />\n";



Replace with this
          $tsubject = "<a href='".FORUM."viewthread.php?thread_id=".$ttdata['thread_id']."&amp;pid=".$ttdata['thread_lastpostid']."#post_".$ttdata['thread_lastpostid']."' title='".$ttdata['thread_subject']."'>".trimlink($ttdata['thread_subject'], 20)."</a>";
         echo showdate("forumdate", $data['forum_lastpost'])."<br />\n";
         echo "On ".$tsubject."<br />\n";



Done.

Save and upload forum/index.php
0 replies
S
Skulz
S
Skulz 10
  • Member, joined since
  • Contributed 76 posts on the community forums.
  • Started 20 threads in the forums
  • Started this discussions
answered
Member

It has some problems, it only works with old posts, writing a new one would cause this:
20-09-2013 00:33
On
by test

No thread name :|
0 replies
D
DrunkeN
D
  • Member, joined since
  • Contributed 161 posts on the community forums.
  • Started 18 threads in the forums
answered
Member

Quote

Skulz wrote:

It has some problems, it only works with old posts, writing a new one would cause this:
20-09-2013 00:33
On
by test

No thread name :|


Hmm did you do as i explained in my post? Or have you any other modifications in your forum/index.php file? It works great on my site (Starting new thread)
0 replies
S
Skulz
S
Skulz 10
  • Member, joined since
  • Contributed 76 posts on the community forums.
  • Started 20 threads in the forums
  • Started this discussions
answered
Member

Solved, i wrote the 1st code before the } instead of after it...my bad.
Thanks a lot really :). Using php fusion by a year but still can't make these little changes myself.
0 replies
D
DrunkeN
D
  • Member, joined since
  • Contributed 161 posts on the community forums.
  • Started 18 threads in the forums
answered
Member

Nice. No problem. I am always happy to help. You will learn with the time :)
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 5 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

D
D
  • Member, joined since
  • Contributed 161 posts on the community forums.
  • Started 18 threads in the forums
S
S
Skulz 10
  • Member, joined since
  • Contributed 76 posts on the community forums.
  • Started 20 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet