vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Small problem I cant seem to resolve (https://vborg.vbsupport.ru/showthread.php?t=172079)

JmZ 03-04-2008 03:40 PM

Small problem I cant seem to resolve
 
hey there,

I am currently coding a script which will post information automatically from specific "feeds".

The whole script is finished which means now, I have to integrate it into vBulletin.
Now this is generally easy, until I get the the "post insertion". The problem here is that my posts will contain HTML, so I need to figure out one of the following:

- How to set a specific user's posts to be directly posted, not filtered through anything which may change the content of the given post.

OR

- How to convert ALL HTML from a given post into friendly BBCode

Either of these means that my script will be complete, so any help is appreciated.

Thanks
JmZ

shovel 03-04-2008 06:04 PM

Try...

PHP Code:

require_once(DIR '/includes/functions_wysiwyg.php');
$your_text convert_wysiwyg_html_to_bbcode($your_textfalse); 


JmZ 03-04-2008 06:11 PM

ah great
ill give that a go, thanks shovel

shovel 03-04-2008 06:19 PM

Make sure that your point that require_once() method to the appropriate directory, that was a bit taken right out of the vBulletin source.

JmZ 03-04-2008 06:22 PM

ok here's what I get now:
Code:

Fatal error: Call to a member function clean_gpc() on a non-object
im guessing I need to include another file aswell as the current one?

shovel 03-04-2008 06:38 PM

Remember to go ahead and bring in your back-end if you haven't..

PHP Code:

require_once('./global.php');
require_once(
DIR '/includes/functions_newpost.php');
require_once(
DIR '/includes/functions_editor.php');
require_once(
DIR '/includes/functions_bigthree.php'); 


JmZ 03-04-2008 06:53 PM

oh perfect
it works great, hopefully it keeps working consistently without any errors

thanks a lot for the replies shovel

shovel 03-04-2008 07:01 PM

No problem. :)


All times are GMT. The time now is 10:33 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.01568 seconds
  • Memory Usage 1,721KB
  • 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_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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