Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 06-05-2006, 12:32 AM
mrTip mrTip is offline
 
Join Date: Apr 2006
Location: Columbus, Ohio
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #12  
Old 06-05-2006, 12:36 AM
calorie calorie is offline
 
Join Date: May 2003
Posts: 2,804
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad you have it working.
Reply With Quote
  #13  
Old 06-05-2006, 04:31 PM
mrTip mrTip is offline
 
Join Date: Apr 2006
Location: Columbus, Ohio
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #14  
Old 06-05-2006, 09:56 PM
calorie calorie is offline
 
Join Date: May 2003
Posts: 2,804
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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';
}
Smilie Image Path:
Code:
// set a replacement variable

images/smilies/ => http://www.domain.com/forum/images/smilies/
Reply With Quote
  #15  
Old 06-05-2006, 10:29 PM
mrTip mrTip is offline
 
Join Date: Apr 2006
Location: Columbus, Ohio
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #16  
Old 06-05-2006, 11:27 PM
calorie calorie is offline
 
Join Date: May 2003
Posts: 2,804
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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';
}
2) Go to vB ACP -> Styles & Templates -> Replacement Variable Manager -> Add New Replacement Variable:
Code:
Style: your choice
Search for Text: images/smilies/
Replace with Text: http://www.domain.com/forum/images/smilies/
Tip: also check out the vB online manual
Reply With Quote
  #17  
Old 06-06-2006, 01:54 PM
mrTip mrTip is offline
 
Join Date: Apr 2006
Location: Columbus, Ohio
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #18  
Old 06-06-2006, 02:23 PM
calorie calorie is offline
 
Join Date: May 2003
Posts: 2,804
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Otherwise be rid of the replacement variable and do something like:
Code:
$pagetext = str_replace('images/smilies/', 'http://www.domain.com/forum/images/smilies/', $pagetext); // and then you echo
Reply With Quote
  #19  
Old 11-08-2006, 09:38 PM
Star* Star* is offline
 
Join Date: Nov 2005
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you gents
Reply With Quote
  #20  
Old 03-12-2007, 10:58 PM
tassoman tassoman is offline
 
Join Date: Sep 2005
Location: Bologna, Italy
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:20 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04576 seconds
  • Memory Usage 2,245KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (7)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete