vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Are these 2 things possible? (https://vborg.vbsupport.ru/showthread.php?t=167789)

r_sole 01-15-2008 03:51 AM

Are these 2 things possible?
 
1 - Auto thread creation:
---------------------------------
I want to have my forum somehow automatically create a thread for me each day, with info from one of my databases (a separate database to the one Vbulletin uses).

2 - Latest thread appear on my sites front page:
---------------------------------------------------------
Since my site isn't primarily a forum I was wondering if it's possible to have the latest thread from a certain one of my forums (the 'news and announcements forum) appear on the front page of my site.

Are these 2 things possible? How do I do it? Is there a plugin or something (Im using VB 3.6.8)

Dismounted 01-15-2008 04:07 AM

1. Yes, it is possible, but you will either have to code it yourself, or hire a coder to code it for you. It would be a script that pulls that info, and then hooks itself into vBulletin's database to post the information. It would be run as a cron job.

2. Yes, it is possible, but you will either have to code it yourself, or hire a coder to code it for you. You will just have to open a connection to vBulletin's database and run a SQL query to fetch the data. I believe a modification called "vBExternal" should help.

r_sole 01-15-2008 04:19 AM

Im quite comfortable with html/php/mysql so coding it myself is really a problem.

1. Can you give me some idea of what sort of mysql statement id need to run to post a new thread? I've looked at around and some people refer to 'build_new_post() in functions_newpost.php', but those are all old threads (2004) so I'm not sure if that's outdated.

2. vBExternal looks good. Thanks, I'll look into it.

Dismounted 01-15-2008 05:23 AM

The preferred way to create new threads is through the ThreadPost Datamanager. I believe there is an article that shows how to do this.

r_sole 01-15-2008 05:40 AM

Would the script on this page (if edited to suit) be what I'm after?
http://www.vbulletin.com/forum/showthread.php?t=224561

Dismounted 01-15-2008 07:00 AM

Yes, but disregard the second post in that thread as it is correct in the first example.

r_sole 01-15-2008 07:31 AM

Awesome thanks man :up:

r_sole 01-19-2008 01:04 AM

Alright I did this (the auto-thread creation) and it works. There's just one thing, the thread gets created, but on the main page of the forum the 'last post' part doesn't get updated. So I'll be able to add the new thread, but no-one will know it's been added unless they actually go into that forum.

Dismounted 01-21-2008 03:58 AM

I believe you need to run the function build_forum_counters() to rebuild the cache.


All times are GMT. The time now is 02:43 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.00999 seconds
  • Memory Usage 1,724KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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