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,,

saltedm8 07-06-2009 11:42 AM

your welcome

genesisdnb 08-11-2009 11:48 AM

Does this work on different domains?

saltedm8 08-12-2009 10:33 PM

it would, but you need to change the address in the javascript to the address you require

genesisdnb 08-13-2009 07:26 AM

I done that but it didnt work.... Basically my site is www.xboxer360.com/forum and we just merged forums with www.gameshare.co.uk so I tryed to install that code on GameShare but it doesnt display any information?

saltedm8 08-13-2009 08:22 AM

because its javascript, you need to change the address to be javascript based.. i think this is it

change
Code:

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

document.writeln("<a href=\"http:\/\/www.gameshare.co.uk\/showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a><br />");
you just need to change the url to whichever you want to use

if it dont work, i guess its not possible to do

genesisdnb 08-13-2009 09:07 AM

got an error now saying 'threads' is undefined

saltedm8 08-13-2009 02:22 PM

where is your rss feed located ?

genesisdnb 08-13-2009 07:59 PM

I dont know if I have one?

saltedm8 08-13-2009 08:18 PM

you will have, but the question is, is it switched on, if you find it, it will look like this http://webprocafe.com/external.php.. i have re-written the url for that, you will have to either activate your or find it... the javascript wont work without it and having an rss feed is a good thing..

genesisdnb 08-14-2009 06:17 AM

ok well I fixed it, thanks :) but the url's are wrong... the urls point to http://www.xboxer360.com/showthread.php?t=1889 and not http://www.xboxer360.com/forum/showthread.php?t=1889

saltedm8 08-14-2009 06:08 PM

try swapping it with this

Code:

document.writeln("<a href=\"http:\/\/www.xboxer360.com\/forum\/showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a><br />");

MagicThemeParks 09-26-2009 03:48 PM

How can I have something like this with a URL of an RSS feed?

m2006 05-18-2010 05:22 AM

Java scripts do not content support the search engin

Been Told 06-28-2010 11:39 AM

What about permissions - could this show posts to users that they would normally not see?
Like for example, I have a moderators forum that regular members don't know of, can't see and can't access. Would regular members see posts from that forum?

Eplexx 11-29-2010 04:21 PM

Doesn't work for me.

marshal_ramdev 11-29-2010 04:54 PM

thanks will try it out ;)

fatdr 12-11-2010 09:34 PM

nice working thanks


All times are GMT. The time now is 06:25 PM.

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.01250 seconds
  • Memory Usage 1,768KB
  • 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
  • (8)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (27)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