vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Using VB as a feed for html (https://vborg.vbsupport.ru/showthread.php?t=283203)

amaarvell 05-20-2012 07:07 AM

Using VB as a feed for html
 
Hi Guys
I have a friend who wants to be able to use his website to display information on his website regarding his club. The problem is he knows nothing about HTML or any other programming language.

Is it possible for me to give him a dedicated area on my forum for him to do his news pages, and get his website to pick up automatically his forum posts and display them on his webpage. Just the info though. Preferably not any other forum information, barring maybe a link back.

Cheers

kh99 05-20-2012 02:09 PM

You might be able to use the external data provider. There's an example in the vbulletin manual here: https://www.vbulletin.com/docs/html/...r_implementing

amaarvell 05-20-2012 03:40 PM

i dont suppose you have an example of that working as I just tried it on a test page and nothing shows

trying to get this page .. http://www.parafly.co.uk/forumdisplay.php/44-Site-News

to show on this page as a test http://www.parafly.co.uk/testhac.html

anyone steer me right here please

cheers

kh99 05-20-2012 03:44 PM

Sorry, I guess that particular manual page doesn't mention that you need to set "Enable External Javascript" to Yes (in the adminCP, Settings -> Options -> External Data Provider).

Jhonnyf 05-20-2012 04:42 PM

I don't understand very well what do you try to do but:

Create a own test.php page => https://vborg.vbsupport.ru/showthread.php?t=228112

If you want to export your thread to a another website, you need to use RSS FEED and the another website process that information
Code:

youwebsite/external.php?type=RSS2&forumids=1,2,etc

amaarvell 05-20-2012 04:59 PM

at the moment the page is

Code:

<body>
<script src="http://www.parafly.co.uk/external.php?type=xml&forumids=44" type="text/javascript"></script>
<script type="text/javascript">
<!--
for (i in threads)
{
document.writeln(threads[i].title + " (" + threads[i].poster + ")<br />");
}
//-->
</script>

</body>


what do i need to change to add the threads in this forum http://www.parafly.co.uk/forumdisplay.php/44-Site-News


cheers

Jhonnyf 05-20-2012 05:12 PM

Ahh, you need to use PHP for do that...

If the test page is in the same website, you can do a SQL sentence and process the last thread, else (external website), with RSS you need to read the XML and process to show in that page.

I do that for some clients, I write some tutoriales (first case) but is in spanish and to vb3.x post #3 explaint to vb4

amaarvell 05-20-2012 05:46 PM

i dont know spanish, but thanks all the same

that looks a little too complex for me

kh99 05-20-2012 06:22 PM

Quote:

Originally Posted by amaarvell (Post 2331030)
at the moment the page is ...


If you change it to external.php?type=JS&forumids=4, then make sure Enable External Javascript is set to yes as I posted above, then it should work, although I'm not sure if it will be exactly what you want.

Of course you could use php to generate the page and/or use xml, but the js example in the manual is an easy way to get thread titles with links into a static html page.

Jhonnyf 05-20-2012 06:46 PM

Quote:

Originally Posted by kh99 (Post 2331050)
If you change it to external.php?type=JS&forumids=4, then make sure Enable External Javascript is set to yes as I posted above, then it should work, although I'm not sure if it will be exactly what you want.

Of course you could use php to generate the page and/or use xml, but the js example in the manual is an easy way to get thread titles with links into a static html page.

I did not know that the EXTERNAL.PHP can be give data as Javascript...

Thank you


All times are GMT. The time now is 01:05 AM.

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.01029 seconds
  • Memory Usage 1,732KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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