Announcement

Collapse
No announcement yet.

'Latest post' code?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by floris
    No problem.
    You are setup to download attachments now.
    Glad I could help
    Many thanks for all your help and efforts, but would I be right in thinking this code is for vB 3.x? I am using 2.3.4, not sure if it will still work

    Comment


    • #17
      omg, lol
      I wrote it for version 3.x

      I overlooked that this is a question in the version 2.x forums.

      Uhm, it would require some modifications to work on version 2.
      i.e. you can't import the phrases :P

      Comment


      • #18
        Originally posted by floris
        omg, lol
        I wrote it for version 3.x

        I overlooked that this is a question in the version 2.x forums.

        Uhm, it would require some modifications to work on version 2.
        i.e. you can't import the phrases :P
        That's what I thought, coz there are some features in 3.x that aren't in 2.x

        Comment


        • #19
          Also, I think for version 2 this requires to join from the post table, and I am not such a big star with using JOIN in queries :>

          http://www.vbulletin.org/forum/showthread.php?t=40700

          I did find this .. which might throw you in the right direction perhaps.

          Comment


          • #20
            Originally posted by floris
            Also, I think for version 2 this requires to join from the post table, and I am not such a big star with using JOIN in queries :>

            http://www.vbulletin.org/forum/showthread.php?t=40700

            I did find this .. which might throw you in the right direction perhaps.
            I think I can probably get it to work with a bit of tinkering Many thanks once again for the help and work

            Comment


            • #21
              No problem, and sorry that I overlooked this was a vb2 question.

              Comment


              • #22
                We tried everything but unfortunately the last part, where you need to access Languages and Phrases just isn't possible because there is nothing comparable in v2.x, from what we've been able to discover. This hack will come in handy when we move to v.3 though

                Comment


                • #23
                  Hi there, instead of the phrases, you can just use the text.

                  Last Updated Topic: $threadlink by $threadstarter
                  (Last Post by $lastposter. Replies: $replies, Views: $views)

                  ^--- text

                  v--- result

                  Last Updated Topic: Hey by Dr. No
                  (Last Post by Dr. No. Replies: 10, Views: 43)



                  Instead of using phrases, just hard code it

                  Comment


                  • #24
                    Originally posted by floris
                    Hi there, instead of the phrases, you can just use the text.

                    Last Updated Topic: $threadlink by $threadstarter
                    (Last Post by $lastposter. Replies: $replies, Views: $views)

                    ^--- text

                    v--- result

                    Last Updated Topic: Hey by Dr. No
                    (Last Post by Dr. No. Replies: 10, Views: 43)



                    Instead of using phrases, just hard code it
                    The guy who is working on this with me had a further problem. This is what he said:

                    I can see how the code should work but it gives an SQL error. It's to do with the table name it looks up in the database. The one in his code doesn't match the one in our database. This is the error I'm getting:

                    Database error in vBulletin 2.3.4:

                    Invalid SQL:
                    SELECT *
                    FROM TABLE_PREFIXthread
                    ORDER BY lastpost
                    DESC LIMIT 1
                    mysql error: Table 'db95924569.TABLE_PREFIXthread' doesn't exist

                    mysql error number: 1146

                    The table prefix thing obviously needs changing but I don't know what to.


                    That might mean something to you but it's like a foreign language to me

                    Comment


                    • #25
                      Remove the table_prefix. This is a specific thing for vBulletin 3.
                      vBulletin 2 only uses the table : thread

                      Comment


                      • #26
                        Unfortunately it still doesn't work, but many thanks anyway

                        Comment


                        • #27
                          I think you are now best of asking support on vBulletin.org
                          Sorry that I couldn't help with version 2.

                          Comment

                          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                          Working...
                          X