PDA

View Full Version : Integration with vBulletin - Webprocafe.com - Latest posts in html site


saltedm8
28 Jun 2009, 01:32
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



<!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
28 Jun 2009, 15:19
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
28 Jun 2009, 17:31
Hello!

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

reg

macc

deadlySniper
28 Jun 2009, 17:35
Nice, thanks.

Sweeks
28 Jun 2009, 18:16
Installed mate, thanks :up:
________
VAPORIZER HEALTH (http://vaporizer.org)

deadlySniper
28 Jun 2009, 18:17
Nice, thanks!

Sweeks
28 Jun 2009, 18:17
Nice, thanks!

Double nice I guess :p
________
Lincoln Mkx History (http://www.ford-wiki.com/wiki/Lincoln_MKX)

saadessa
28 Jun 2009, 20:36
Installed mate, thanks

saltedm8
29 Jun 2009, 01:03
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

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

src="external.php?type=js">
to here
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

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

to something like this

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
02 Jul 2009, 12:44
thanks,,

saltedm8
06 Jul 2009, 13:42
your welcome

genesisdnb
11 Aug 2009, 13:48
Does this work on different domains?

saltedm8
13 Aug 2009, 00:33
it would, but you need to change the address in the javascript to the address you require

genesisdnb
13 Aug 2009, 09:26
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
13 Aug 2009, 10:22
because its javascript, you need to change the address to be javascript based.. i think this is it

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

to this
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
13 Aug 2009, 11:07
got an error now saying 'threads' is undefined

saltedm8
13 Aug 2009, 16:22
where is your rss feed located ?

genesisdnb
13 Aug 2009, 21:59
I dont know if I have one?

saltedm8
13 Aug 2009, 22:18
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
14 Aug 2009, 08:17
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
14 Aug 2009, 20:08
try swapping it with this

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

MagicThemeParks
26 Sep 2009, 17:48
How can I have something like this with a URL of an RSS feed?

m2006
18 May 2010, 07:22
Java scripts do not content support the search engin

Been Told
28 Jun 2010, 13:39
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
29 Nov 2010, 18:21
Doesn't work for me.

marshal_ramdev
29 Nov 2010, 18:54
thanks will try it out ;)

fatdr
11 Dec 2010, 23:34
nice working thanks