Long Description + BBcode 1.2

Adds a long description field to join form and edit pages to allow your members to spice up profile

  1. Basti
    • Staff

    Basti Administrator Staff Member

    Basti submitted a new resource:

    Long Description + BBcode - Adds a long description field to join form and edit pages to allow your members to spice up profile

    Read more about this resource...
  2. Basti
    • Staff

    Basti Administrator Staff Member

  3. xgcell

    xgcell Member

    I love this idea. I see a lot of topsites that allow users to add pictures, videos, text, and more to their stats page. Is this plugin still being worked on? The youtube button does not work for me

    Also if it had an iframe option, that would be nice!
  4. Basti
    • Staff

    Basti Administrator Staff Member

    You should never, ever allow an iframe on a public form, that just asks for attacks!

    Youtube should be handled via their own plugins. It has such button, but it not get parsed on the frontend. I just posted the plugin, Mark made it, so i am not sure what he intended to do here, maybe that button was just a leftover.

    But youtube, should be handled via a own plugin.
    custom join form to enter youtube url, then let a plugin parse that url and construct the iframe on the details page.

    But how to do it not belongs here, if you need to get instructions please ask for help in the plugin request section
  5. xgcell

    xgcell Member

    Alright cool, thanks for the info. I have seen some sites that let people have youtube videos. Ill post for a how to in the requests section then.
  6. panzerdude

    panzerdude Member

    hi, I dont see these edits in the join_form or edit_form html files for installation, is that still required?

    Thanks
  7. Basti
    • Staff

    Basti Administrator Staff Member

    Yes you need those. The instruction is from parabola, so your might look different

    You need to have this on your submit button
    Code:
    onclick="wswgEditor.doCheck();"
    panzerdude likes this.
  8. panzerdude

    panzerdude Member


    Im running parabola too, this is the closest I found in the join_form.html, but Im not sure what to edit.

    Code:
          <div id="submitButtonDiv">
                <br class="cb" />
                <button class="button1" name="submit" type="submit">{$lng->join_header}</button>
            </div>
  9. Mark
    • Staff

    Mark Administrator Staff Member

    try this:

    Code:
          
    <div id="submitButtonDiv">
                <br class="cb" />
                <button class="button1" name="submit" type="submit" onclick="wswgEditor.doCheck();">{$lng->join_header}</button>
            </div>
    
    
    panzerdude likes this.
  10. panzerdude

    panzerdude Member


    thanks allot mark,

    any idea how I can fix the buttons, the pic below.
    Untitled-1.png
  11. Mark
    • Staff

    Mark Administrator Staff Member

    ahh need to add a few CSS rules to make them wider, i don't have the source code available at the moment, but if you highlight the buttons (using firefox) and then right click, "view selection source" this will show you the HTML classes in use, then you can add width:30px; to your CSS file for those classes.
    panzerdude likes this.
  12. panzerdude

    panzerdude Member


    I cant seem to get the right class edit. Can you try when you can Mark, no rush, thank you.
    @Mark
    Last edited: Nov 12, 2014
  13. panzerdude

    panzerdude Member

    What ever class I try and edit seems to change other things too. I cant seem to narrow it down to the right class to add the width.
  14. Mark
    • Staff

    Mark Administrator Staff Member

    I'll install this now and have a quick look, be back in a couple mins
  15. Mark
    • Staff

    Mark Administrator Staff Member

    I added this to the end of my css file, seems to have done the trick

    Code:
    .editbar button {width: 23px;}
    
    fix.jpg
    panzerdude likes this.
  16. panzerdude

    panzerdude Member


    Cheers that did the trick :)
  17. panzerdude

    panzerdude Member

    Im getting this error when a link is added to the long description and I click on the sites details page then this comes up below. Any ideas, thanks


    Fatal error
    : Call to undefined function handle_url_tag() in/home/battlefieldclans/public_html/sources/details.php(162) : eval()'d code(32) : regexp codeon line1
  18. Mark
    • Staff

    Mark Administrator Staff Member

    hmm we should disable that URL function, you probably don't want people adding links to your long descriptions as this will undoubtedly lead to spam.


    This is the ugly function that was used (adapted from punBB) back when this plugin was originally created, but I would rather remove the URL linking button from the editor rather than integrate it.

    Code:
    function handle_url_tag($url, $link = '')
    {
    
    $full_url = str_replace(array(' ', '\'', '`', '"'), array('%20', '', '', ''), $url);
    if (strpos($url, 'www.') === 0) // If it starts with www, we add http://
    $full_url = 'http://'.$full_url;
    
    // Ok, not very pretty :)
    $link = ($link == '' || $link == $url) ? ((strlen($url) > 55) ? substr($url, 0 , 39).' &hellip; '.substr($url, -10) : $url) : stripslashes($link);
    
    return '<a href="'.$full_url.'">'.$link.'</a>';
    }
    
    blacklevel and panzerdude like this.
  19. panzerdude

    panzerdude Member


    hi Mark, Im having a hard time finding where this code is so I can remove it.


    Even without the button, if people put a link in the long description Im getting a blank white profile page.
  20. Basti
    • Staff

    Basti Administrator Staff Member

    You get that error because the function mark posted is missing

    If you want it, try adding it anywhere in details_build_page.php

    If you rather want to get rid of urls, like Mark suggested, you need to remove

    Code:
        '#\[url\]([^\[]*?)\[/url\]#e',
        '#\[url=([^\[]*?)\](.*?)\[/url\]#e',
    and
    Code:
        'handle_url_tag(\'$1\')',
        'handle_url_tag(\'$1\', \'$2\')',
    So the script not looks for a missing function
    panzerdude and Mark like this.

Share This Page