PDA

View Full Version : Select Forum ID help


betts02
04-11-2012, 10:22 PM
OK i am trying to use a MOD from here but i want it to show ONLY 1 select forum id rather that all the threads

The code i have is:

<!--ticker-->
<div id="ticker-wrapper" class="no-js">
<ul id="js-news" class="js-hidden">
<script type="text/javascript" src="{vb:raw vboptions.bburl}/external.php?&type=js"></script>
<script type="text/javascript">
<!--
for (var i = 0; i < threads.length; i++)
{
document.write('<li><a href="{vb:raw vboptions.bburl}/showthread.php?t=' + threads[i]['threadid'] + '">' + threads[i]['title'] + '</a>' + '&nbsp;&nbsp;&nbsp;' + '<span style="color: red;">Posted By:</span>'+ '&nbsp;' + threads[i]['poster'] + '</a>' + '</li>');
}
//-->
</script>
</ul>
</div>
<!--ticker-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script src="js/jquery.ticker.js" type="text/javascript"></script>
<script type="text/javascript" src="{vb:raw vboptions.bburl}/external.php?&type=js"></script>
<script type="text/javascript">
$(function () {
$('#js-news').ticker();
});
</script>

Can anyone help on what i would add to make it show ONLY say forum ID 442 ?

Many thanks

kh99
04-12-2012, 12:07 PM
Try this:

<script type="text/javascript" src="{vb:raw vboptions.bburl}/external.php?&type=js&forumid=442"></script>


(add part in red to existing line - scroll right to see the part to be added).

betts02
04-12-2012, 04:32 PM
Ive added that but no change

kh99
04-12-2012, 06:21 PM
I missed that you were calling external twice. That's not necessary unless you want different forums for the recent threads and the ticker (or did you only mean to use one or the other?). In any case, try this:

<!--ticker-->
<div id="ticker-wrapper" class="no-js">
<ul id="js-news" class="js-hidden">
<script type="text/javascript" src="{vb:raw vboptions.bburl}/external.php?&type=js&forumid=442"></script>
<script type="text/javascript">
<!--
for (var i = 0; i < threads.length; i++)
{
document.write('<li><a href="{vb:raw vboptions.bburl}/showthread.php?t=' + threads[i]['threadid'] + '">' + threads[i]['title'] + '</a>' + '&nbsp;&nbsp;&nbsp;' + '<span style="color: red;">Posted By:</span>'+ '&nbsp;' + threads[i]['poster'] + '</a>' + '</li>');
}
//-->
</script>
</ul>
</div>
<!--ticker-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script src="js/jquery.ticker.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('#js-news').ticker();
});
</script>


This writes out links to the recent threads, and also sets up the ticker. If you don't mean to do both then you should remove some of that code.

betts02
04-12-2012, 06:53 PM
Its a MOD on here that some are having issues with
I have managed to fix 1 issues myself due to no answer from the original coder

It is meant to show a news ticker for latest threads BUT i ONLY want to show the forum id 442

So the ticker displays the threads from ONLY forum id 442

Cheers

kh99
04-12-2012, 06:59 PM
OK, if this is a mod then you should be asking for help in the mod thread.

betts02
04-12-2012, 07:05 PM
I have asked but no reply at all

As stated i fixed 1 issue others were having myself to get it showing correctly on my forums but its showing ALL threads when i want it to show ONLY forum ID 442

kh99
04-12-2012, 07:19 PM
I'm just telling you what the forum rules are. I should have noticed that you said it was a mod in your first post.

Also, if that's most or all of the code for the mod it shoudn't be posted here.

betts02
04-12-2012, 07:19 PM
It seems when i add "&forumid=442" it stops working

If i remove that, It shows ALL threads

--------------- Added 1334262053 at 1334262053 ---------------

So if the coder does not answer a support question i can not ask the community on how to make it work ?

kh99
04-12-2012, 07:51 PM
So if the coder does not answer a support question i can not ask the community on how to make it work ?

People can respond in the mod thread. If you'll post the link to the thread I'll try to help you there.

betts02
04-12-2012, 08:07 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=262910" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=262910</a>

Many thanks not just for me but others who seem to have the same issue