vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   php Functions: a) to get $forumid b) to create forum (https://vborg.vbsupport.ru/showthread.php?t=209583)

BRotondi 03-27-2009 07:31 AM

php Functions: a) to get $forumid b) to create forum
 
Hello

I'm working on a MediaWiki-link to vBulletin (MediaWiki/vBulletin Single Sign-On). Next Step: Hardlinks MediaWiki-Discussion -> vBulletin-Forum. (Each Article has his own Forum, not only a Thread)

After working me into the vBulletin-Code I realized, that simple SQL won’t update the vBulletin-Cache and perhaps is a too quick and dirty way to achieve my two goals:

a) How to determine the $forumid of a forum? ID_ParentForum and Page Title are known. The SQL-Query is:
PHP Code:

$sql 'SELECT `forumid` FROM `forum` WHERE `parentid` = "[ID_ParentForum]" AND `title` = "[Page Title]"; 

(here "dirty SQL" ignoring the cache won't do any harm)

b)
If there is no forum with this Name in ID_ParentForum I want to create it. vBulletin does this through forum.php > $_POST (line 246) but there is perhaps an easier way to achieve this without “emulating” the form.

I think there must be already code out there to achieve these two points...
Any help very appreciated! Thanks!
Bruno

Burgy 04-14-2009 09:52 AM

I am useing MediaWiki/vBulletin Bridge - you worked on so helpfully - and it does work flowless, even in combination with facebook Login. I do apreciate this a lot. Thanks first.

Secondly I am interested as well to generate and later syndicate an "Article-Discussion"-Thread below the Article in the Wiki. Even a quick reply box would complete this.

Syndication through RSS
I searched a lot for external syndication of threads, but did not find anything. My conclusion is, that the rss syndication of hole topics is not ment to be, in order to prevent authorisation. But an working rss feed could be the conclusion for the syndication part. the generate a new topic (or forum)-part would still have to be solved.

Syndication and posting through API
Sadly vbulleting does not have any api, elsewise the api functions could be used, but perhaps someone else is pushing the api thing.

php Hardcoding
1. Generate new topic (or forum) with some or all information from the article. With Semantic MediaWiki you can adress variables to an article. But it is amasingly difficult to catch these fariables in an hook. But through Semantic Media Wiki Forms it could be possibel to have an comment variable, wich is given over to the topic / forum creation plugin.

2. Remember the topic / forum for the article can be achieved through Semantic MediaWiki, just by setting an url variable to the topics url, or forums url through the plugin.

3. To write new topic in article-forum or reply / comment in article-thread would at last a real api think, as well as generating the forum / topic bevore.

As you can see, I solved none of the problems but gothered some thoughts about how to solve it. If you have questions conserning semantic mediawiki, please ask.

Sincerely yours
Burgy

BRotondi 09-17-2009 08:29 AM

Ups... forgot to thanks you for the answer! ... I skipped this one since it's not too easy for the moment.

Thanks & Greetings
Bruno


All times are GMT. The time now is 07:38 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.01001 seconds
  • Memory Usage 1,719KB
  • 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)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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