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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-28-2016, 02:57 AM
Inked_Mono Inked_Mono is offline
 
Join Date: Jan 2015
Location: Canada
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Inferno Shoutbox - Backslashes on Apostrophes? ( "\")

Hey there! I'm having an issue with my shoutbox where any time an apostrophe is used, it seems to add a backslash as well. This also happens with quotes.

http://i.imgur.com/Pb4TrHL.png

Any idea what the cause might be?
Reply With Quote
  #2  
Old 08-28-2016, 05:02 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would suggest asking about this in the modification's thread...that way the devloper of the mod will be more likely to see your question.
Reply With Quote
  #3  
Old 08-28-2016, 04:35 PM
Inked_Mono Inked_Mono is offline
 
Join Date: Jan 2015
Location: Canada
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
I would suggest asking about this in the modification's thread...that way the devloper of the mod will be more likely to see your question.
I'd be extremely surprised if they were still offering support, haha. Thanks though, I'll give it a shot!
Reply With Quote
  #4  
Old 08-28-2016, 05:15 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Inked_Mono View Post
I'd be extremely surprised if they were still offering support, haha. Thanks though, I'll give it a shot!
Even if the developer is long gone from vBorg, others who have installed and using it would be more likely to see your question there as well.

In general we ask that questions regarding mods that are available here be posted in the thread pertaining to the mod, not only for the reasons I stated, but it is better for site organization as well.
Reply With Quote
  #5  
Old 08-29-2016, 03:41 AM
Inked_Mono Inked_Mono is offline
 
Join Date: Jan 2015
Location: Canada
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey, I know this was in the wrong section to begin with, but in case someone searches up the same thing, I thought I'd post the fix I was able to come up with!

Search tags: Inferno Shoutbox V3 AJAX

Fix:

In the infernoshout.php file look for the method in charge of submitting the shout:

Code:
if ($_POST['do'] == 'shout' && ($message = trim($_REQUEST['message'])) != '')
{
	$vbulletin->input->clean_array_gpc('r', array(
		'message'	=> TYPE_STR,
	));

	$message = trim($vbulletin->GPC['message']);
	
	if ($vbulletin->userinfo['userid'] > 0)
	{
		$infernoshout->load_engine('shout');

		$shout = new shout;
		$shout->process($message);
	}
}
Call the stripslashes() method on the message call. Stripslashes() is generally used with the PHP directive magic_quotes_gpc is toggled on (which is generally set to on by default before PHP 5.4). Your code will look something like this:

Code:
if ($_POST['do'] == 'shout' && ($message = trim($_REQUEST['message'])) != '')
{
	$vbulletin->input->clean_array_gpc('r', array(
		'message'	=> TYPE_STR,
	));

	$message = trim($vbulletin->GPC['message']);
	
	if ($vbulletin->userinfo['userid'] > 0)
	{
		$infernoshout->load_engine('shout');

		$shout = new shout;
		$shout->process(stripslashes($message));
	}
}
This will return your string with blackslashes stripped off. (\' becomes ' and so on.) Double backwards (\\) are made into a single backslash (\).

Cheers!
Reply With Quote
Благодарность от:
MarkFL
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 07:52 AM.


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.03946 seconds
  • Memory Usage 2,206KB
  • Queries Executed 13 (?)
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
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (1)post_thanks_box_bit
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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_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
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete