PDA

View Full Version : REAlly need help


pooffck
Tue 24th Jun '08, 1:20pm
Well no one at vbulletin.org helping me and i dont know whats wrong. I want to put latest posts on my forum home

i have used this coding

<if condition="$vbulletin->options['externaljs']">
<!-- show latest active threads -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_external')"><img
id="collapseimg_forumhome_external"
src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_external].gif" alt="" border="0" /></a>
<a href="search.php?$session[sessionurl]do=getnew">Latest Active Threads</a>
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_external" style="$vbcollapse[collapseobj_forumhome_external]">
<tr>

<td class="alt1" width="100%">

<div class="smallfont">
<script type="text/javascript" src="external.php?type=js"></script>
<script language="" type="text/javascript">
<!--
for (var x in threads)
{
document.writeln("<img class=\"inlineimg\" src=\"$stylevar[imgdir_button]/lastpost.gif\" alt=\"\" border=\"0\" /> <a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> <span class=\"time\">($vbphrase[posted_by]: "+threads[x].poster+")</span><br />");
}
//-->
</script></div>

</td>
</tr>
</tbody>
<!-- show latest active threads -->
</table>
<br />
</if>

___________

<div class="sidebar_tcat">
<div class="sidebar_right">
<a style="float:$stylevar[right];padding-right: 9px;" href="#top" onclick="return toggle_collapse('sidebar_latest')"><img id="collapseimg_sidebar_latest" src="$stylevar[imgdir_button]/collapse_tcat_sb$vbcollapse[collapseimg_sidebar_latest].gif" alt="" border="0" /></a>
<div class="sidebar_left">
Latest Threads
</div>
</div>
</div>
<table cellpadding="0" cellspacing="0" width="100%">
<tbody id="collapseobj_sidebar_latest" style="$vbcollapse[collapseobj_sidebar_latest]">
<tr>
<td class="sidebar_alt" align="center" colspan="4">
<div>
<script type="text/javascript" src="external.php?forumids=X,X,X&type=js"></script>
<script language="" type="text/javascript">
<!--
for (x = 0; x < 10; x++)
{
document.writeln("<a href=\"showthread.php?t="+threads[x].threadid+"\"> "+threads[x].title+"</a><br />");
}
//-->
</script></div></td>

______________

<script type="text/javascript" src="http://www.turbofsi.net/forum/external.php?type=js&lastpost=1"></script>
<script language="" type="text/javascript">
<!--
for (x = 0; x < 10; x++)
{
document.writeln("<li><a href=\"http://www.turbofsi.net/forum/showthread.php?t="+threads[x].threadid+"\" title=\""+threads[x].title+"\">"+threads[x].title+"</a></li>");
}
//-->
</script>

and this is how my Javascript looks,

http://i27.tinypic.com/2nqzgv8.jpg

Please help me!!!!!!!!!!!!!!!!!!!
Please help me!!!!!!!!!!!!!!!!!!!
Please help me!!!!!!!!!!!!!!!!!!!

Wayne Luke
Tue 24th Jun '08, 1:25pm
And what is the error that you are getting?

pooffck
Tue 24th Jun '08, 1:29pm
Nothing, i am getting nothing but a box

saying

LATEST THREADS and i can expand it and unexpand it
and the content is EMPTY.

I really think there is something is wrong with javascript as i have turn javascript on but its not working

pooffck
Tue 24th Jun '08, 2:01pm
anyone :(

Steve Machol
Tue 24th Jun '08, 2:02pm
Please wait at least 24 hours before bumping your posts. :)

From the forum rules:
http://www.vbulletin.com/forum/showthread.php?t=42918

Please wait a reasonable amount of time before bumping posts. For style changes and general 'how-to' questions this should be 24 hours. For specific troubleshooting issues, use 12 hours as a guideline.
We do not provide support for custom coding here. If you cannot get the help you want at www.vbuletin.org, then you should consider hiring someone to help you with this.

pooffck
Tue 24th Jun '08, 2:08pm
Sorry about bumping, but i think there is a problem with javascript on my board

Steve Machol
Tue 24th Jun '08, 2:10pm
Please reread post #5. This is not the place to get help with custom coding. Thank you for respecting this.

Wayne Luke
Tue 24th Jun '08, 2:11pm
Your external feed works fine:
http://www.turbofsi.net/forum/external.php?type=js

The problem is this bit of code when calling external.php:
forumids=X,X,X

X is not a valid forumid. You need to remove that portion or replace the multiple X characters with valid forumid numbers.

pooffck
Tue 24th Jun '08, 2:16pm
Your external feed works fine:
http://www.turbofsi.net/forum/external.php?type=js

The problem is this bit of code when calling external.php:
forumids=X,X,X

X is not a valid forumid. You need to remove that portion or replace the multiple X characters with valid forumid numbers.

Ok now i am dumb, can u look at this wayne

this is my site

http://www.hd-coderz.com/forum/external.php?type=js

Wayne Luke
Tue 24th Jun '08, 2:23pm
Use this code with nothing else. It is what is in the documentation and I personally fixed it so that it will work on any domain. Just place this code in an HTML file with nothing else and load that file in your browser.


<!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>
<title></title>
</head>

<body>
<script src="http://www.hd-coderz.com/forum/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>
</body>

</html>


However I am not getting any output at http://www.hd-coderz.net/forum/external.php?type=js and the link above actually goes to http://www.turbofsi.net/forum/external.php?type=js

If I use the second URL in my test file, I get:
http://www.rabidbadger.net/externaltest.html

pooffck
Tue 24th Jun '08, 2:27pm
Sorry it didnt

as you can see

this is my js in domain: http://www.hd-coderz.com/forum/external.php?type=js

and this is the guy who was trying to help me js: http://www.turbofsi.net/forum/external.php?type=js

Why isnt my doing the exact same thing?

Wayne Luke
Tue 24th Jun '08, 2:31pm
All of your forums are private and not viewable by guests. Therefore there is nothing to syndicate or output and you get a blank list of threads.

pooffck
Tue 24th Jun '08, 2:34pm
So there is no way to do this? even on forum home?

Wayne Luke
Tue 24th Jun '08, 2:36pm
Make your forums viewable by guests and it will all start working. Otherwise you need to have custom coding done in plugins.

pooffck
Tue 24th Jun '08, 2:37pm
Make your forums viewable by guests and it will all start working. Otherwise you need to have custom coding done in plugins.

Thanks alot for some great advice, i am turning it on for guests now

Thanks mate