Closed (fixed)
Project:
Shoutbox
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
12 Jan 2012 at 07:58 UTC
Updated:
18 Mar 2016 at 10:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dcomfort commentedI've tried putting links into shoutbox and I cannot generate html links. There is no option in Shoutbox 7.x.1.x-dev to choose which input filter to use at admin/config/shoutbox
Comment #2
drupik commentedYou can do it by hardcode ;)
in shoutbox.theme.inc replace line 103
$post .= '<span class="shoutbox-shout">' . $shout->shout . $approval_message . '</span>';with
$post .= '<span class="shoutbox-shout">' .check_markup(($shout->shout), 'html') . $approval_message . '</span>';'html' is yours text format, eg. for plain text will be: 'plain_text'
Comment #3
dcomfort commentedThanks! That works.
Comment #4
snsace commentedHow do you set BBcode as input filter?
Comment #5
snsace commentedThis module doesn't seem to be working for anything but plain text. I also tried #2 and still did not get url's to realize. The only thing I can figure is need more details on the correct arrangement of text format filters (although I've tried several combinations).
I have only tried alpha 2.
Is there a difference in the 7.x-1.x-dev and alpha 2 code right now? I figured not since the same release dates.
Comment #6
drupik commented@ssace You must install bbcode first and enable it in input filters.
I have the solution #2 for the past few months, I know that it is not perfect, but it works. Any filter You want will work, even smileys.
Comment #7
snsace commentedI do have bbcode enabled. Here are the bbcode filters enabled and in this order:
Convert line breaks into HTML
Convert BBCode to HTML
Convert URLs into links
Smileys filter
---------------------------------------------------------
My input formats are arranged in this order:
Filtered HTML
PHP code
Full HTML
BBCode
Plain text
----------------------------------------------------------
If this all looks right. My only other question is how to enable the bbcode filter in the shoutbox. Would I use #2 above but put bbcode in the check markup?
Thank you,
AJ
Comment #8
drupik commentedNo, just put in check markup name of filter with bbcode enabled. 'filtered_html' , or 'full_html' ....
so if you have BBcode filter enabled and configured, change line 103:
$post .= '<span class="shoutbox-shout">' .check_markup(($shout->shout), 'bbcode') . $approval_message . '</span>';Comment #9
snsace commentedWhen I change line 103, my shouts disappear from the shoutbox and only shows the user's name that posted the shout. like this:
Comment #10
drupik commentedCheck that input filter on node, maybe something wrong with it, try another filter like 'full_html'.
Comment #11
snsace commentedThe BBCode input filter is working fine on nodes. Smileys, URL's, email addresses all work correctly in my nodes & comments.
Comment #12
drupik commentedSo I don't know how to help u. I tried all my formats and it work, not working only when I put incorrect name of input format, then I see the same view like on Your screenshot.
Make sure You put correct name of filter, when You go to edit filter page, on address bar see:
http://localhost/admin/config/content/formats/full_htmlThe last word after slash is your input filter name, in this case: full_html.
Here there is nothing to non-functioning, 'check_markup' is a standard Drupal feature, it must work.
Sry 4 my poor English ;P
Comment #13
snsace commentedIt works! Thank you! very much drupik. #12 clued me in to find my problem...
The input filter name was wrong. I'm sure other's will have the same problem. I am working off a fresh install of Drupal 7.
For me the filter names are a follows:
Filtered HTML: input name is '1'
found at: admin/config/content/formats/1
PHP code: input name is '2'
found at: admin/config/content/formats/2
Full HTML: input name is '3'
found at: admin/config/content/formats/3
BBCode: input name is '4'
found at: admin/config/content/formats/4
Plain text: input name is '6'
found at: admin/config/content/formats/6
Not sure why my filter names are not spelled out descriptively as mentioned earlier. Maybe because I'm not using Pathauto module.
Comment #14
coderintherye commentedWould shoutbox maintainers accept a patch?
If so, how about we use #2 except variable_get here for the filter, and have an admin setting to set it. It could default to the site's default filter. I'll make the patch if there's a chance of it getting in.
Comment #15
aschiwi commented#2 works but the code is in a theme.inc, which means there is no need to hack the module's file, you can put the function that contains that part in your theme's template.php.
Comment #16
micahw156Marked #1811134: Extra feature as a duplicate of this issue.
Comment #17
micahw156Marked #1445410: smiley's not showing in shouts as a duplicate of this issue.
Comment #18
micahw156Marked #1386180: Input format as a duplicate of this issue.
Comment #19
Delivron_dg commentedFor me check_markup didn't solve the problem, but htmlspecialchars_decode did it. Finally I decided to use both these functions - the second for fixing the problem and the first by security reasons:
Still I wonder what part or the code (apart of the text formats) may screen links like this:
<a href="about">about</a>Any suggestions?Comment #20
Northern_Girl commentedHi,
will the output of url in live links will be committed to a new version?
Thanks.
Comment #21
vitalblue commentedHi,
hopefully yes I will do my best :-)
thanks a lot
Comment #22
Northern_Girl commented:) cool!
Happiness is a complete shoutbox!
By the way, I found Shoutbox more intesting than Statuses because we can erase old shouts. Also, someone somewhere asked for a counter of remaining characters. Statuses has a counter... could it be used to code faster a counter for Shoutbox?
NG
Comment #23
Yezid commentedThank You very much for relevant informations – IT WORKS!;)
Comment #24
miroslaw.krawczyk commentedThe problem still exists, because the _shoutbox_filter_form () function is disabled (in shoutbox.module):
My solution, in shoutbox.module replace line 950
$shout->shout = check_plain($shout->shout);with
$shout->shout = check_markup(($shout->shout), 'full_html');It works perfectly :)
Comment #25
vitalblue commentedHi, I will do that today and upload a new version.
Thanks a lot
Comment #27
vitalblue commentedHi , to all.
Added new feature to define if shouts are going to escape all HTML or not. In the configuration section (SHOUTBOX INPUT FORMAT) you enable or disable this feature.
New version will be soon available :-)
Comment #28
vitalblue commentedComment #29
vitalblue commented