The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
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. |
#12
|
|||
|
|||
Glad you have it working.
|
#13
|
|||
|
|||
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? |
#14
|
|||
|
|||
Custom Message:
Code:
// plugin at global_start hook if (THIS_SCRIPT == 'news_index' AND !$vbulletin->options['bbactive']) { // either turn board on or set custom message // $vbulletin->options['bbactive'] = 1; // $vbulletin->options['bbclosedreason'] = 'msg'; } Code:
// set a replacement variable images/smilies/ => http://www.domain.com/forum/images/smilies/ |
#15
|
|||
|
|||
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! |
#16
|
|||
|
|||
1) Go to vB ACP -> Plugin System -> Add New Plugin:
Code:
Product: vBulletin Hook Location: global_start Title: news_index active Plugin PHP Code: code is below Plugin is Active: Yes if (THIS_SCRIPT == 'news_index' AND !$vbulletin->options['bbactive']) { // either turn board on or set custom message $vbulletin->options['bbactive'] = 1; // $vbulletin->options['bbclosedreason'] = 'msg'; } Code:
Style: your choice Search for Text: images/smilies/ Replace with Text: http://www.domain.com/forum/images/smilies/ |
#17
|
|||
|
|||
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.
|
#18
|
|||
|
|||
If you are going to use a replacement variable, try the following:
Code:
/* do one of the following */ $pagetext = process_replacement_vars($pagetext); // and then you echo /* or */ eval('print_output($pagetext);'); // does process_replacement_vars and echoes for you /* or */ eval('print_output("' . fetch_template('your_template') . '");'); // where your_template has $pagetext in it Code:
$pagetext = str_replace('images/smilies/', 'http://www.domain.com/forum/images/smilies/', $pagetext); // and then you echo |
#19
|
|||
|
|||
thank you gents
|
#20
|
|||
|
|||
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 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|