Ignore:
Timestamp:
Apr 29, 2012, 4:58:53 PM (9 years ago)
Author:
mistic100
Message:

update for 2.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/bbcode_bar/bbcode_bar.inc.php

    r11377 r14525  
    11<?php
    22if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    3  
     3
     4// add BBCodeBar to textarea
    45function set_bbcode_bar()
    56{
     
    1415    if ($conf_bbcode_bar[$key]) $template->assign('BBC_'.$key, true);
    1516  }
    16  
    17   // edit field has different id
    18   // if (
    19     // (isset($_GET['action']) AND $_GET['action'] == 'edit_comment')
    20     // OR (isset($page['body_id']) AND $page['body_id'] == 'theCommentsPage')
    21   // ) {
    22     // $template->assign('bbcode_texarea', 'contenteditid');
    23   // } else {
    24     // $template->assign('bbcode_texarea', 'contentid');
    25   // }
    26   $template->assign('bbcode_texarea', 'contentid');
    27 
    28   // smilies
    29   if (isset($pwg_loaded_plugins['SmiliesSupport']))
    30   {
    31     $template->assign('BBC_smilies', true);
    32   }
    3317
    3418  $template->assign('BBCODE_PATH', BBcode_PATH);
    3519  $template->set_prefilter('picture', 'set_bbcode_bar_prefilter');   
    3620
    37   // smilies support > 2.2.f ## must be parsed after bbcode_bar, because the javascript must be after bbc's one
     21  // smilies support > 2.3 ## must be parsed after bbcode_bar, because the javascript must be after bbc's one
    3822  if (isset($pwg_loaded_plugins['SmiliesSupport']))
    3923  {
     24    $template->assign('BBC_smilies', true);
    4025    set_smiliessupport();
    4126  } 
     
    4429function set_bbcode_bar_prefilter($content, &$smarty)
    4530{
    46   $search = "<label>{'Comment'|@translate}";
     31  $search = '<div id="commentAdd">';
    4732  $replace = file_get_contents(BBcode_PATH.'/template/bbcode_bar.tpl').$search;
    4833  return str_replace($search, $replace, $content);
     
    5035
    5136
    52 //Check tags and eventually close malformed tags, return BBCoded String
     37// check tags and eventually close malformed tags, return BBCoded String
    5338function CheckTags($str)
    5439{
Note: See TracChangeset for help on using the changeset viewer.