Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-09-2005, 05:53 PM
delds delds is offline
 
Join Date: Oct 2003
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 09-15-2005, 07:22 AM
azmi's Avatar
azmi azmi is offline
 
Join Date: May 2003
Location: Germany
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>");
}
//--> 
Reply With Quote
  #3  
Old 09-15-2005, 03:34 PM
delds delds is offline
 
Join Date: Oct 2003
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, just what I was looking for

just have find out what 'Erstellt am' is in english
Reply With Quote
  #4  
Old 09-15-2005, 06:53 PM
azmi's Avatar
azmi azmi is offline
 
Join Date: May 2003
Location: Germany
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 10-08-2005, 07:45 AM
solokron solokron is offline
 
Join Date: Mar 2003
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>");
}
//--> 
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:37 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04314 seconds
  • Memory Usage 2,225KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete