Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Smilies with WYSIWYG editor disabled
sasha
Posted on 16 Aug 2012, 20:10:40

Access: Member
Total Posts: 5
Joined: 2012-03-14

Hello; I hope someone can help me.

I wanted to insert smilies in my article made without using the WYSIWYG editor, but I failed; I tried with copy-pasting the smilie keycode in the article, but it didn't work.

Does someone know how to insert smilies in my articles when the WYSIWYG editor is disabled?

Thank you in advance.

#3942
Last edited by sasha at 2012-08-16 22:51:58 Reason: Try to explain the issue better
Chris
Posted on 16 Aug 2012, 21:30:19

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

If you edit the bbparser.php file, around line 120~ you'll see this block of code

    $match = array('#\<img(.*?)\/\>#se');
    $replace = array("'' . resizeimg2('$1') . ''");
    $str = preg_replace($match, $replace, $str);   

    return $str;

If you replace it with this code

    $match = array('#\<img(.*?)\/\>#se');
    $replace = array("'' . resizeimg2('$1') . ''");
    $str = preg_replace($match, $replace, $str);   
    foreach(unserialize(SMILIES) AS $smiley){
        $str = str_replace($smiley['keycode'], "<img src=\"" . $smiley['path'] . "\" alt=\"" . $smiley['keycode'] . "\" />", $str);
    }       
    return $str;

The smilies should now show even with the wysiwyg editor disabled.

#3943
sasha
Posted on 16 Aug 2012, 22:25:42

Access: Member
Total Posts: 5
Joined: 2012-03-14

They works, now; thank you.

Now, I also have a problem with categories, so I'm gonna search for some help in the forum.

Thank you again, Chris.

#3944
Last edited by sasha at 2012-08-16 22:26:12 Reason: Make it better-looking.
sasha
Posted on 16 Aug 2012, 22:51:58

Access: Member
Total Posts: 5
Joined: 2012-03-14

Fixed the categories problem.

[Every article was assigned to a single different category, but all articles showed up in all the categories. I solved it by using this integration.

<?php
  $nppage = '1'; 
  $cat[] = 'updates'; 
  include 'news/index.php'; 
?>

It worked immediately.]

#3945
Last edited by sasha at 2012-08-16 22:56:59 Reason: Make it better-looking
Network-13.com © 2013