vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How to parse smilies in Activity Stream? (https://vborg.vbsupport.ru/showthread.php?t=293257)

BasilFawlty 12-24-2012 02:57 PM

How to parse smilies in Activity Stream?
 
I just noticed that smilies are not parsed in my new VB install. Instead it only shows the smilie code. Does anyone know how to mod the VB so that smilies are parsed in the activity stream? I'm using v 4.2. It seems this is the default "as designed: behavior, but I'd really rather have the smilies display in Activity Stream (What's New). :confused:

kh99 12-24-2012 05:01 PM

You can do it, but you have to edit some files. In vb/activitystream/view/perm/forum/post.php around line 90 you can add code to do the parsing (added lines in red):

Code:

                $preview = strip_quotes($postinfo['pagetext']);
                $postinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(
                        fetch_trimmed_title(strip_bbcode($preview, false, true, true, true),
                                vb::$vbulletin->options['as_snippet'])
                ));

                global $vbulletin;
                require_once(DIR . "/includes/class_bbcode.php");
                $parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
                $postinfo['preview'] = $parser->parse_smilies($postinfo['preview'], false);

                $forumperms = fetch_permissions($threadinfo['forumid']);
                $show['threadcontent'] = ($forumperms & vB::$vbulletin->bf_ugp_forumpermissions['canviewthreads']);
                $userinfo = $this->fetchUser($activity['userid'], $postinfo['username']);


Then since that only takes care of replies, you need do the same thing in vb/activitystream/view/perm/forum/thread.php, except change postinfo to threadinfo (in two places).

I should also mention that although I tried this and it seems to display smilies on the activity stream page, it looks like the preview in the activity stream is meant to be plain text and inserting smilie images requires html, so I don't know what other effects these changes might have.

Soapchick 06-20-2013 02:41 AM

Very grateful for this info. Thanks you kh99.

MaxSof 09-19-2013 06:09 PM

how to make CMS?


All times are GMT. The time now is 10:17 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.01043 seconds
  • Memory Usage 1,714KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete