vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Select Forum ID help (https://vborg.vbsupport.ru/showthread.php?t=281439)

betts02 04-11-2012 10:22 PM

Select Forum ID help
 
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:

Code:

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

Code:

<!--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 [DATE]1334262053[/DATE] at [TIME]1334262053[/TIME] ---------------

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

Quote:

Originally Posted by betts02 (Post 2319514)
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


All times are GMT. The time now is 08:52 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.00992 seconds
  • Memory Usage 1,738KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)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