vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   External data using javascript (https://vborg.vbsupport.ru/showthread.php?t=95940)

delds 09-09-2005 05:53 PM

External data using javascript
 
Looking to be able to post links to the latest threads or latest threads that were posted to,
---------------
<script src="http://www.selfhelpforums.com/external.php?type=js" type="text/javascript"></script>
<script type="text/javascript">
<!--
for (i in threads)
{
document.writeln(threads[i].title + " (" + threads[i].poster + ")<br />");
}
//-->
</script>
-------------------

This gives me I believe the last 15 threads, not sure if it is the last 15 threads created or last 15 threads that were posted to.

But they are not clickable (no actual link), is it possible to change the number displayed and can they be made a clickable link. trying to use it in .htm page.

running vb 3.5 rc 2, which will within the next day be rc 3

azmi 09-15-2005 07:22 AM

just try this (code from our german vb forum)
have a look to see how it works (left site)
http://koelnboard.de

PHP Code:

<!--
var 
max 13;
if(
threads.length maxmax threads.length;
for(
0maxi++)

if (
threads[i].title.length 50)
threads[i].title threads[i].title.substring(020) + '...'; }
document.writeln("<li><a href=\"http://www.yourforum.com/forum/showthread.php?t=" threads[i].threadid "\" style=\" color:black; \">" threads[i].title "</a><br> (" threads[i].poster " - Erstellt am: " threads[i].threaddate ") <br><br></li>");
}
//--> 


delds 09-15-2005 03:34 PM

Thank you, just what I was looking for

just have find out what 'Erstellt am' is in english

azmi 09-15-2005 06:53 PM

Quote:

Originally Posted by delds
just have find out what 'Erstellt am' is in english

sorry, i forgot to translate it
i hope it works ;)

solokron 10-08-2005 07:45 AM

Hmmm I have enabled External Javascript in the acp and incorporated this js into my page with the domain changes of course and have had no success. It simply does not list for me.

Quote:

Originally Posted by azmi
just try this (code from our german vb forum)
have a look to see how it works (left site)
http://koelnboard.de

PHP Code:

<!--
var 
max 13;
if(
threads.length maxmax threads.length;
for(
0maxi++)

if (
threads[i].title.length 50)
threads[i].title threads[i].title.substring(020) + '...'; }
document.writeln("<li><a href=\"http://www.yourforum.com/forum/showthread.php?t=" threads[i].threadid "\" style=\" color:black; \">" threads[i].title "</a><br> (" threads[i].poster " - Erstellt am: " threads[i].threaddate ") <br><br></li>");
}
//--> 




All times are GMT. The time now is 07:09 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.01194 seconds
  • Memory Usage 1,749KB
  • 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
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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