Changeset 14525


Ignore:
Timestamp:
04/29/12 16:58:53 (8 years ago)
Author:
mistic100
Message:

update for 2.4

Location:
extensions/bbcode_bar
Files:
6 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{ 
  • extensions/bbcode_bar/language/en_UK/plugin.lang.php

    r11873 r14525  
    11<?php 
     2 
     3$lang['Available options'] = 'Available options'; 
    24 
    35$lang['Paragraph : [p]Paragraph[/p]'] = 'Paragraph : [p]Paragraph[/p]'; 
  • extensions/bbcode_bar/language/fr_FR/plugin.lang.php

    r11873 r14525  
    11<?php 
     2 
     3$lang['Available options'] = 'Options disponibles'; 
    24 
    35$lang['Paragraph : [p]Paragraph[/p]'] = 'Paragraphe : [p]Paragraphe[/p]'; 
  • extensions/bbcode_bar/maintain.inc.php

    r10983 r14525  
    2626  if (!isset($conf['bbcode_bar'])) 
    2727  { 
    28     $q = "INSERT INTO " . CONFIG_TABLE . " (param,value,comment) 
    29       VALUES ('bbcode_bar','" . serialize($BBcode_default) . "','Parametres BBCode Bar');"; 
    30     pwg_query($q); 
     28    conf_update_param('bbcode_bar',serialize($BBcode_default)); 
    3129  } 
    3230} 
     
    5856    ); 
    5957     
    60     $q = "UPDATE " . CONFIG_TABLE . " 
    61       SET value='" . serialize($new_bbcode_bar) . "' 
    62       WHERE param='bbcode_bar';"; 
    63     pwg_query($q); 
     58    conf_update_param('bbcode_bar', serialize($new_bbcode_bar)); 
    6459  } 
    6560} 
     
    6762function plugin_uninstall() 
    6863{ 
    69   global $conf; 
    70  
    71   if (isset($conf['bbcode_bar'])) 
    72   { 
    73     pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param="bbcode_bar";'); 
    74   } 
     64  pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param="bbcode_bar";'); 
    7565} 
    7666 
  • extensions/bbcode_bar/template/bbcode_bar.tpl

    r11873 r14525  
    6363 
    6464jQuery(document).ready(function() {ldelim} 
    65   jQuery('#{$bbcode_texarea}').markItUp(BBCodeBar); 
     65  jQuery('#contentid').markItUp(BBCodeBar); 
    6666}); 
    6767{/footer_script} 
  • extensions/bbcode_bar/template/bbcode_bar_admin.tpl

    r11873 r14525  
    1 {html_head} 
    2 {literal} 
     1{html_head}{literal} 
    32<style type="text/css"> 
    43  form.properties span.property { 
    5     width:60%; 
     4    width:55%; 
     5    font-weight:normal; 
    66  } 
    77</style> 
    8 {/literal} 
    9 {/html_head} 
     8{/literal}{/html_head} 
    109 
    1110<div class="titrePage"> 
     
    1514<form method="post" action="" class="properties" ENCTYPE="multipart/form-data">  
    1615  <fieldset> 
    17     <legend>{'Parameters'|@translate}</legend> 
     16    <legend>{'Available options'|@translate}</legend> 
    1817    <ul> 
    1918      <li> 
Note: See TracChangeset for help on using the changeset viewer.