Announcement

Collapse
No announcement yet.

Still Accurate Code?

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

  • Still Accurate Code?

    http://www.vbulletin.com/forum/showthread.php?t=158895

    Is this still accurate for later versions, mine is 3.6 for example?

    Thank you Floris or Colin, or whoever else.

    Legion of Angels

  • #2
    Wow that seems like it could be very useful.
    - TomJames

    Comment


    • #3
      I just copied this javascript block the other day to http://wetalk.tv/ for our prison break theme .. and worked instantly. So yes. on 3.6 and 3.7. and will probably on 3.8 too. It won't work on 4.0 most likely.

      Comment


      • #4
        In that Customization you're showing us how to do Newest Posts, and how to limit them, and how to assign them to specific forums.

        Isn't there a small coding change that would allow us to "find Newest Poll", as well?

        I think that would be a great customization tip helpful to all vb owners.

        If you know how to modify it for that, could you share with the rest of us?

        Thank you,

        Legion of Angels

        Comment


        • #5
          No, you can do what the rss2 feed offers. You can't 'make up' data without writing a custom script.. which surely vborg might have.

          Comment


          • #6
            i'm trying to get that code to work for legion and i'm stuck. can someone let me know if i'm specifying the directories correctly cause i'm not using this in the same location as the forum


            Code:
            <!-- show latest active threads -->
              <table cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
              <tbody>
              <tr>
              <td colspan="2">
              <a href="forum/search.php?do=getnew">Latest Active Threads</a>
              </td>
              </tr>
              </tbody>
              <tbody>
              <tr>
             
              <td width="100%">
             
              <div>
              <script type="text/javascript" src="forum/external.php?forumids=15&type=js"></script>
              <script language="" type="text/javascript">
              <!--
              for (x = 0; x < 10; x++)
              {
            document.writeln("<a href=\"forum/showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> (Posted By: "+threads[x].poster+")<br />");
            }
              //-->
              </script>
              </div>
             
              </td>
              </tr>
              </tbody>
              <!-- show latest active threads -->
            you can see where i tried to add forum/ before some of the hrefs and src's.

            thansk in advanced.

            the site is www.legionofangels.net

            and i'm trying to add it to the bottom left container on the page. thx again.

            Comment


            • #7
              Originally posted by Floris View Post
              No, you can do what the rss2 feed offers. You can't 'make up' data without writing a custom script.. which surely vborg might have.
              I'm surprised it would be so different as to be called a "custom" script. Granted if there is anything different it could be considered custom, but from what little knowledge I have in the coding realm, I would imagine it would be something very similar to what you already have.

              Instead of it $fetching or fetch latest posts, it's actually fetching the latest poll or polls. I guess the poll array, or showing the graphics would be a different code, but just actually fetching the latest thread with poll, or latest poll I thought would be a minor change to the code.

              -----------------------------------------------

              We're only asking because it's your QT & Customization and since you made it with help from a few others maybe, that you might be able to troubleshoot it.

              Would you prefer that we ask at vb.org instead?

              -----------------------------------------------

              Lastly, they sadly don't have a code to put the latest poll on a non-vb page. I did a search on it, and everyone wants it in like 3 or 4 threads I found, but no one has ever made it or released it. The only ones you can use are aftermarket or non-vb one's so they have to manually be constructed on the topic to make up for a custom code auto-pulling from your forum.

              Even if you construct a poll with an aftermarket choice, the votes won't match your forum votes on the same thread.

              The other choice is vbadvanced, which is just sad, and the code will still have to be ripped out of that product to be used as a standalone.

              So yeah, I wouldn't have asked here had it not been your Quick Tip customization, and had it been already existed on vb.org.

              Thanks,

              LoA

              -----------------------------------------------------

              Or would you prefer we ask these questions in another forum?
              Last edited by legionofangels2; Wed 3 Sep '08, 9:02am.

              Comment


              • #8
                Code:
                    <!--3    for (var x in threads)
                    {
                  document.writeln("<a href=\"showthread.php?t="+threads[x].threadid+"&goto=newpost\"><img class=\"inlineimg\" src=\"images/buttons/firstnew.gif\" alt=\"\" border=\"0\" /></a> <a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> <br />");
                    }
                    //-->
                And change the url from forum/ to the full url
                and use &count=10
                to limit it to 10 items.

                Comment


                • #9
                  I'm surprised it would be so different as to be called a "custom" script.
                  I am telling you that this javascript uses what external.php offers.
                  If you want different results you have to see what external.php does, to my knowledge there's no &instead=newpollsplz

                  If you want custom stuff to it, write it. It's not in it, so the javascript can't work with it.

                  Nothing I can do about it.

                  Since it is just javascript (clientside) you can go to wetalk.tv and see the prison break theme in the top and right click the page and copy that into your own template on the forum. The same javascript should work on non standard pages.

                  And otherwise use the php solution

                  Comment


                  • #10
                    Originally posted by Floris View Post
                    I am telling you that this javascript uses what external.php offers.
                    If you want different results you have to see what external.php does, to my knowledge there's no &instead=newpollsplz

                    If you want custom stuff to it, write it. It's not in it, so the javascript can't work with it.

                    Nothing I can do about it.

                    Since it is just javascript (clientside) you can go to wetalk.tv and see the prison break theme in the top and right click the page and copy that into your own template on the forum. The same javascript should work on non standard pages.

                    And otherwise use the php solution
                    I wasn't expecting such a sarcastic answer, I literally meant what I said that I cannot believe the code is that different. But if it is, and you don't know it, we'll do it ourselves.

                    I did notice your Prison Break thing, and if we have to copy the code we can for that. Thanks

                    Comment


                    • #11
                      I have an additional question in regards to your array of forum id's.

                      Can I use the forum ID for a category, or do I have to use the array of the forum id's of what's in the category. Meaning for example if I have a structure like this

                      General Topics (id3)
                      -- Gen Discussion (id4)
                      -- Introductions (id5)
                      -- Debate (id6)
                      -- Photos (id7)

                      Can I use just 3 for the array, or do I have to use 4, 5, 6, and 7, since the posts are in those forums specifically?

                      Comment


                      • #12
                        To my knowledge it does not inherit, so you have to set all the forumids

                        Comment


                        • #13
                          Originally posted by Floris View Post
                          And change the url from forum/ to the full url
                          and use &count=10 to limit it to 10 items.
                          i have this so far. let me know if i did it right. and what i'm missing. (the posts still dont' show up. only the "latest active threads" is working)

                          Comment


                          • #14
                            The error seems to be in the fact that instead of it showing the posts, it's actually just creating a URL that relays to "new posts" of the whole forum. Completely ignoring the ID's, and it's as if you're pasting the New Posts button from the navbar onto the front page, instead of displaying the 10 latest posts made in those sections.

                            Code:
                            <a href="forum/search.php?do=getnew">Latest Active Threads</a>
                            It's as if that line of code is just turning into a URL hyperlink or something.

                            Comment


                            • #15
                              EDIT: plz disregard. while working with legion, i think he was giving me the wrong forum id's. -_- sorry
                              Last edited by Tact; Fri 5 Sep '08, 4:52pm.

                              Comment

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