vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Integration with vBulletin - Webprocafe.com - Latest posts in html site (https://vborg.vbsupport.ru/showthread.php?t=217296)

saltedm8 06-27-2009 10:00 PM

Webprocafe.com - Latest posts in html site
 
1 Attachment(s)
If you are running a static site with vbulletin, this will pull the last 15 post titles from vbulletin using javascript and display the linked titles on your normal html site or any other page you want it to.. here it is working http://webprocafe.com/latest.html

Please feel free to adjust the styles and play with it how you like, but the result will be a list of your latest titles posted



Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Latest Posts</title>
<style type="text/css">
<!--
* { margin: 0; padding: 0; }

body { background-color: #E5DCC0; }

#list {
   
        width:90%;
        background-color:#E5DCC0;
        padding:10px;
}

a {  color:#524125;
        font-weight:bold;
        text-decoration: none; }
       
a:hover {  color:#524125;
        font-weight:bold;
        text-decoration:underline; }
-->
</style>
</head>

<body>
<div id="list">
<script type="text/javascript" src="external.php?type=js"></script>
<script type="text/javascript">
<!--
for (var x in threads)
{
document.writeln("<a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a><br />");
}
//-->
</script>

</div>
</body>
</html>


sebil 06-28-2009 01:19 PM

this is nice..

can i add this code just under my domain.. not under forum..
i tried but itz not working

but when i added like forum/text.html /// itz working.. :)

macc 06-28-2009 03:31 PM

Hello!

how and where adjust numbers of threads - i get 15 threads with names and 45 - named - undefined -

reg

macc

deadlySniper 06-28-2009 03:35 PM

Nice, thanks.

Sweeks 06-28-2009 04:16 PM

Installed mate, thanks :up:
________
VAPORIZER HEALTH

deadlySniper 06-28-2009 04:17 PM

Nice, thanks!

Sweeks 06-28-2009 04:17 PM

Quote:

Originally Posted by deadlySniper (Post 1838933)
Nice, thanks!

Double nice I guess :p
________
Lincoln Mkx History

saadessa 06-28-2009 06:36 PM

Installed mate, thanks

saltedm8 06-28-2009 11:03 PM

Quote:

Hello!

how and where adjust numbers of threads - i get 15 threads with names and 45 - named - undefined -

reg
This is really pulling from external.php, it is listing all of what is on your rss feed unless you can shorten the list in external.php you cant shorten the list. sorry

Quote:

this is nice..

can i add this code just under my domain.. not under forum..
i tried but itz not working

but when i added like forum/text.html /// itz working..
I am guessing your forum is within a folder on its own and your site is outside this folder, that means you will need to change the root from here

Code:

src="external.php?type=js">
to here
Code:

src="/forums/external.php?type=js">
forums needs to be the name of the folder that vbulletin is in

also, you need to change this

Code:

document.writeln("<a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a><br />");
to something like this

Code:

document.writeln("<a href=\"forums\showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"  </a><br />");
I cant be sure that is the exact format because I dont know javascript that well, but it should be something like that, dont forget to replace forums with whatever the folders name is that vbulletin is in

DNG 07-02-2009 10:44 AM

thanks,,


All times are GMT. The time now is 02:49 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.01627 seconds
  • Memory Usage 1,736KB
  • 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
  • (5)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete