vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   JS & external.php for vB3 (https://vborg.vbsupport.ru/showthread.php?t=59569)

gldtn 01-03-2004 03:04 PM

JS & external.php for vB3
 
Has anyone from here played around with this yet? I have a problem with the code I put together with a little help from vbulletin.com.. It grabs the post, but not the lastest post.. its always a couple of post behide and just now its showing the wrong post title, but the right poster... Strange huh? anyone has any idea of what this problem might be?

Note: I have this code repeated 3 times on the same page, but with different forum ids of course.. could this be a problem, or not?

Thanks

MOD; sorry if I'm not suppose to ask vb3 questions here yet..

gldtn 01-03-2004 03:07 PM

I have the following code:

<script type="text/javascript"src="http://www.cogumelosmagicos.org/forum/external.php?forumids=30,31,32,38,40&type=js">
</script>
<script type="text/javascript">
<!--
for (i = 0; i < 1; i++)
var titleAsString = new String(threads[i].title);
if (titleAsString.length > 27)
{
var newTitle = titleAsString.substring(0,27);
document.write("Tópico: <a href=\"http://www.cogumelosmagicos.org/forum/showthread.php?threadid="+threads[i].threadid+"\">"+newTitle + "..."+"</a><br />Autor: <a href=\"http://www.cogumelosmagicos.org/forum/member.php?u="+threads[i].poster+"\">"+threads[i].poster+"</a> - "+threads[i].threadtime+"<br />");
}
else
{
document.write("Tópico: <a href=\"http://www.cogumelosmagicos.org/forum/showthread.php?threadid="+threads[i].threadid+"\">"+titleAsString+"</a><br />Autor: <a href=\"http://www.cogumelosmagicos.org/forum/member.php?u="+threads[i].poster+"\">"+threads[i].poster+"</a> - "+threads[i].threadtime+"<br />");
}
//-->
</script>

gldtn 01-03-2004 03:13 PM

Uh, almost forgot to ask.. was anyone able to link to the poster? I can't get the poster id to link to it... just the poster username as you can see on part of the code:

Autor: <a href=\"http://www.cogumelosmagicos.org/forum/member.php?u="+threads[i].poster+"\">"+threads[i].poster+"</a>

gldtn 01-06-2004 05:26 AM

*bump* :)


All times are GMT. The time now is 06:28 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01014 seconds
  • Memory Usage 1,708KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete