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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 07-15-2012, 09:20 AM
Mko's Avatar
Mko Mko is offline
 
Join Date: May 2009
Location: East Coast, USA
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
Hmm...well I was thinking you might be able to fix the problem on the php side by changing what value you're giving the RULES var, and that would require another plugin instead of just using $vboptions[ishout_rules] directly in a template. But maybe I don't understand what the issue is. Is it all working except that InfernoShoutbox.userframe doesn't show the right value, or does it not work at all because the "var RULES = " line isn't valid js?
Forgive me, I might've been unclear, haha

Basically, here's what I've got (my whole .js code):
http://paste2.org/p/2073301#line-549
As you can see, I'm already modifying the variable RULES on line 549 to change all \n tags to be <br />.

Now, the RULES var is called from an option in a setting on my Forum. In this setting, as you can probably guess, you can input a description of your rules that will display.

I have the following defined in a template:
Code:
var RULES = "$vboptions[ishout_rules]";
Before I go on, someone on another forum told me:
Quote:
A JavaScript error is probably occurring. Based on the limited information that I have, I would guess that this is due to the way you're loading the rules value into JavaScript. You probably have a variable definition that looks like:
Code:
var RULES = 'a
b';
...leading me to understand that I'm bringing in invalid js.

So, the contents of the ishout_rules option that are like:

...would in fact not be valid js and cause an error.


So, if I were to design a Plugin, what hook location should I use and what should it contain? Also, how would I get a custom variable to be accessible by a template?
Or, is there a way to fix the js error?


Thanks,
Mark
Reply With Quote
 


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 06:48 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.08216 seconds
  • Memory Usage 2,664KB
  • Queries Executed 12 (?)
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
  • (12)bbcode_code
  • (6)bbcode_php
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (13)post_thanks_box
  • (13)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (13)post_thanks_postbit_info
  • (13)postbit
  • (13)postbit_onlinestatus
  • (13)postbit_wrapper
  • (1)showthread_list
  • (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_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • 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_threaded
  • showthread_threaded_construct_link
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete