• Evgura
    Posts: 42
    Joined: 4 years ago
    Thu Jan 03 2019, 20:56  Evgura
    How to link to box around highlighted in color, like on this page. (lilac under the spoiler)

  • Jimako
    Main Admin
    Posts: 329
    Joined: 2 years ago
      
    @Evgura It's normal Readmore button with boostrap class. And it's not spoiler, it's summary of page, so shortcodes are used.

    But if you need it in forum posts with link created with bbcode link, you can use style bbcode-link class. Unfortunately you can't send class as parameter with bbcode link. But you can use span tags around it and then you could have different styles. If you point me to exact example what you need, I could try it (one link, all links, what colour etc)



  • Evgura
    Posts: 42
    Joined: 4 years ago
    Thu Jan 03 2019, 22:12  Evgura
    I mean it as in the picture, how to make the background of the links to purple,
    red
    ,
    green
    , etc.
    https://yadi.sk/i/opKCP8kFVodPcg
    BBcode "Labels" How to do?
  • Jimako
    Main Admin
    Posts: 329
    Joined: 2 years ago
    Thu Jan 03 2019, 22:46  Jimako
    Ok, I put this into some other plugin I use, it was attempt to use bootstrap classes with bbcodes... Create file label.bb
    return "<div class='{$parm}'> {$code_text}</div> ";
    In file e_bb.php (it's tricky if this file already exists - if you plan to use spoiler plugin for this) This is for display list options:
    $bootstrap_classes = array('default','primary','success','info','warning','danger');
    $i = 0;
    
    $labelselect = "<select class='btn btn-default btn-secondary e-bb bbcode_buttons e-pointer' id='labelselect'
    title='Format text' onchange=\"addtext(this.value);this.value=''\">
    <option value=''>Labels</option>";
       //{$class}
    foreach ($bootstrap_classes as $class) {
      ++$i;
      $bb[$i]['name'] =  'label-'.$class;
      $bb[$i]['onclick_var'] =  "[label=label label-{$class}][/label]";
      $bb[$i]['menutext'] = "Label ".$class;
      $bb[$i]['helptext']    = "Help: [label=class]Text to be displayed as label[/label]";
      $labelselect .= "<option value='[label=label label-{$class}][/label]' style='font-size:12px;' class='label label-{$class}'>".$bb[$i]['menutext']."</option>\n";
      
      $eplug_bb[] =  $bb[$i];
    } 
    $labelselect .= "</select>";
    ++$i;
    To parse:
    $eplug_bb[] =  $bb[$i];       
    $BBCODE_TEMPLATE .= $labelselect;
    $BBCODE_TEMPLATE_SUBMITNEWS .= $labelselect;
    $BBCODE_TEMPLATE_NEWSPOST .= $labelselect;
    $BBCODE_TEMPLATE_ADMIN .= $labelselect;
    $BBCODE_TEMPLATE_CPAGE .= $labelselect;
    But now there is new template for forum, if I am not mistaken.
  • Evgura
    Posts: 42
    Joined: 4 years ago
      
    It turns out three files (label.php, e_bb.php and even what the). Where to place? \e107_core\bbcodes\ ?
  • Jimako
    Main Admin
    Posts: 329
    Joined: 2 years ago
      
    Inside some plugin. I haven't downloadable version, sorry. For example - I put it inside jmshortcode plugin myself.
  • Evgura
    Posts: 42
    Joined: 4 years ago
      
    @Jimako Do you have already configured plugin (jmshortcode) to work on "Labels" ?
  • Jimako
    Main Admin
    Posts: 329
    Joined: 2 years ago
      
    Only because it's you. You need to be log in. It will be removed soon and read Warning.

    [sp]Link[/sp]
  • Evgura
    Posts: 42
    Joined: 4 years ago
      
    Downloaded.
  • Evgura
    Posts: 42
    Joined: 4 years ago
      
    Yes.... it works. Thanks, buddy.

    Interestingly, this code ( label-success) and other search engines see and understand?