Still Accurate Code?
Collapse
X
-
-
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
-
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 AngelsComment
-
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 -->
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
-
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
-
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 use &count=10
to limit it to 10 items.Comment
-
I'm surprised it would be so different as to be called a "custom" script.
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 solutionComment
-
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 did notice your Prison Break thing, and if we have to copy the code we can for that. ThanksComment
-
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
-
Code:<!--3 for (var x in threads) {document.writeln("<a href=\"[URL="http://www.legionofangels.net/forum/showthread.php?t="+threads[x].threadid+"&goto=newpost\"><img"][COLOR=#0000ff]http://www.legionofangels.net/forum/showthread.php?t="+threads[x].threadid+"&goto=newpost\"><img[/COLOR][/URL] class=\"inlineimg\" src=\"[URL="http://www.legionofangels.net/forum/images/buttons/firstnew.gif/"][COLOR=#0000ff]http://www.legionofangels.net/forum/images/buttons/firstnew.gif\[/COLOR][/URL]" alt=\"\" border=\"0\" /></a> <a href=\"[URL="http://www.legionofangels.net/forum/showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a"][COLOR=#0000ff]http://www.legionofangels.net/forum/showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a[/COLOR][/URL]> <br />");} //-->
Comment
-
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>
Comment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment