![]() |
Parse BBCode
Hello,
I am currently trying to syndicate news from a certain forum. Take a look at my script (yes, I do have my own db class): PHP Code:
|
You basically need to make a vB page out of your non-vB page. Here is an outline. Hope it helps. :)
Code:
<?php |
Thanks so much!
However, the vBulletin template is pulled up and the 'pagetext' still isn't outputted. How do I get it so it just... a page, with the news pulled up (without the vB template). I defined THIS_SCRIPT as 'news_index' so, do I need to set up a template or file for news_index somewhere? Sorry, never done anything like this with vB! Thanks so much, I truly do appreciate it. EDIT: Wait, the "vB template" that I am referring to is the "board offline" page. Whenever I login as admin (so I can view the forums and don't get the nasty offline error), I can view the page, but it spits an error out: Quote:
|
Try the following:
Code:
replace: $db-> |
Didn't do anything... I suspected that I shouldn't because I have my own DB class. ;)
|
Agreed, try replacing the vB query_read with your class equivalent.
|
In class_bbcode.php? Where?
|
If your DB class is for the same database where vB is located, it might just be easier to be rid of your class. Otherwise you can try a class_bbcode.php file edit, replacing query_read with just query, but if you are going to file edit, then maybe set a constant in your script, and then file edit the vB script, so that for your script $db->query is used and for vB, it uses what it uses.
|
Okay, I edit line 472... it READ (past tense):
PHP Code:
PHP Code:
|
If that's the only file edit you made, then it should be fine as vB also can do a $db->query that acts like a $db->query_read when SELECT is in the query.
|
EXCELLENT! Thank you SOOO much for your help. ;) I cannot tell you how much I want to syndicate news -- and now we've done it!
Thanks again. For your paitence too. |
Glad you have it working. :)
|
Hello,
I have yet another question. Is there a way to display a custom message if the board is offline? Because if the board is offline, it replaces the WHOLE page with the "vBulletin Message - Board Offline" page, which is not good. Smilies also seem to have some trouble displaying themselves. They try and pull the images from images/smilies, but because my page is in the '/beta/' directory, it pulls it from /beta/images/smilies, which is an invalid URL. How can I correct the image path for the smilies on my syndicated news page? |
Custom Message:
Code:
// plugin at global_start hook Code:
// set a replacement variable |
Err, where should I put that 'custom message' piece of coding? I have it right under the require_once(global.php), but it doesn't seem to be turning the board on.
EDIT: I'm a complete n00b to modding vB, so I have no idea what do to with that smilie image path piece of coding. Again, thank you for your paitence! |
1) Go to vB ACP -> Plugin System -> Add New Plugin:
Code:
Product: vBulletin Code:
Style: your choice |
Plugin works and I think the replacement variable manager works too, but it doesn't seem to be replacing the URL of the smilies on that news script.
|
If you are going to use a replacement variable, try the following:
Code:
/* do one of the following */ Code:
$pagetext = str_replace('images/smilies/', 'http://www.domain.com/forum/images/smilies/', $pagetext); // and then you echo |
thank you gents :)
|
Hi to all, I'm trying to write a method for a MVC framework. But when i'm writing the news method i get this error:
Code:
Fatal error: Call to a member function query_first() on a non-object in /var/www/forum/htdocs/includes/functions.php on line 1041 |
All times are GMT. The time now is 06:47 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|