Gregoric, why on the page two jQuery boot?

...
<meta charset="utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
...
<script>
    $LAB.setOptions({AlwaysPreserveOrder:false})
    .script("//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js").wait();
</script>
</body>
</html>

Hook ps_do_bbcode_replace. Add code

    if (($is_signature && $forum_config['p_sig_img_tag'] == '1') || (!$is_signature && $forum_config['p_message_img_tag'] == '1'))
    {
        $pattern[] = '#\[img\]([^\s<"]*?)\[/img\]#e';
        $pattern[] = '#\[img=([^\[]*?)\]([^\s<"]*?)\[/img\]#e';
        if ($is_signature)
        {
            $replace[] = 'handle_img_tag(\'$1\', true)';
            $replace[] = 'handle_img_tag(\'$2\', true, \'$1\')';
        }
        else
        {
            $replace[] = 'handle_img_tag(\'$1\', false)';
            $replace[] = 'handle_img_tag(\'$2\', false, \'$1\')';
        }
    }

The code didn't test. Possibly links can incorrectly be created.

353

(47 replies, posted in PunBB 1.4 additions)

v 0.9.10

facebook.com support is added.

354

(3 replies, posted in PunBB 1.4 additions)

v 0.2 https://github.com/MioVisman/punbb_exte … a_stop_bot

Expansion has to complicate automatic registration for bots. Only registration!
It was tested by the local machine. The request to test at a live forum.

It is possible to use together with fancy_stop_spam extension.

1. Open config.php and replace

//define('FORUM_DISABLE_HOOKS', 1);

-->

define('FORUM_DISABLE_HOOKS', 1);

2. We open forum administration, we delete expansion after which there was a trouble.
3. Open config.php and replace

define('FORUM_DISABLE_HOOKS', 1);

-->

//define('FORUM_DISABLE_HOOKS', 1);
.sig-content {
    font-size: 0.95em;

for example 0.95em; --> 0.5em;

And if to add in the end the css files this code

.entry-content {
    font-size: 2em;
}

Approximately so

.entry-content {
...
    font-size: 2em;
}

mohira, this topic became rotten long ago.

for 1.4.x: In hook em_fn_is_valid_email_start add code

if (preg_match('/\.(ru|su|pl)$/', $email))
  return false;

360

(47 replies, posted in PunBB 1.4 additions)

v 0.9.9
  For mail.ru the new player is used (through iframe), supports a new format of links to video.
  For Dailymotion supports short links through dai.ly.
  coub.com and vine.co support is added.

361

(5 replies, posted in Feature requests)

Ken1988, hahaha!
Sites which tell me that at me costs adblock at once I close.
Your users will arrive similarly.

362

(18 replies, posted in PunBB 1.4 troubleshooting)

this post http://punbb.informer.com/forums/post/151319/#p151319

363

(18 replies, posted in PunBB 1.4 troubleshooting)

It is impossible to take the decision from FluxBB without changes!
It should be adapted for PunBB.

364

(18 replies, posted in PunBB 1.4 troubleshooting)

There is no ready decision for PHP 5.5.x.
Here is how it was made for FluxBB:
Old

function do_bbcode($text, $is_signature = false)
{
    global $lang_common, $pun_user, $pun_config, $re_list;

    if (strpos($text, '[quote') !== false)
    {
        $text = preg_replace('%\[quote\]\s*%', '</p><div class="quotebox"><blockquote><div><p>', $text);
        $text = preg_replace('%\[quote=(&quot;|&\#039;|"|\'|)(.*?)\\1\]%se', '"</p><div class=\"quotebox\"><cite>".str_replace(array(\'[\', \'\\"\'), array(\'&#91;\', \'"\'), \'$2\')." ".$lang_common[\'wrote\']."</cite><blockquote><div><p>"', $text);
        $text = preg_replace('%\s*\[\/quote\]%S', '</p></div></blockquote></div><p>', $text);
    }

    if (!$is_signature)
    {
        $pattern[] = $re_list;
        $replace[] = 'handle_list_tag(\'$2\', \'$1\')';
    }

    $pattern[] = '%\[b\](.*?)\[/b\]%ms';
    $pattern[] = '%\[i\](.*?)\[/i\]%ms';
    $pattern[] = '%\[u\](.*?)\[/u\]%ms';
    $pattern[] = '%\[s\](.*?)\[/s\]%ms';
    $pattern[] = '%\[del\](.*?)\[/del\]%ms';
    $pattern[] = '%\[ins\](.*?)\[/ins\]%ms';
    $pattern[] = '%\[em\](.*?)\[/em\]%ms';
    $pattern[] = '%\[colou?r=([a-zA-Z]{3,20}|\#[0-9a-fA-F]{6}|\#[0-9a-fA-F]{3})](.*?)\[/colou?r\]%ms';
    $pattern[] = '%\[h\](.*?)\[/h\]%ms';

    $replace[] = '<strong>$1</strong>';
    $replace[] = '<em>$1</em>';
    $replace[] = '<span class="bbu">$1</span>';
    $replace[] = '<span class="bbs">$1</span>';
    $replace[] = '<del>$1</del>';
    $replace[] = '<ins>$1</ins>';
    $replace[] = '<em>$1</em>';
    $replace[] = '<span style="color: $1">$2</span>';
    $replace[] = '</p><h5>$1</h5><p>';

    if (($is_signature && $pun_config['p_sig_img_tag'] == '1') || (!$is_signature && $pun_config['p_message_img_tag'] == '1'))
    {
        $pattern[] = '%\[img\]((ht|f)tps?://)([^\s<"]*?)\[/img\]%e';
        $pattern[] = '%\[img=([^\[]*?)\]((ht|f)tps?://)([^\s<"]*?)\[/img\]%e';
        if ($is_signature)
        {
            $replace[] = 'handle_img_tag(\'$1$3\', true)';
            $replace[] = 'handle_img_tag(\'$2$4\', true, \'$1\')';
        }
        else
        {
            $replace[] = 'handle_img_tag(\'$1$3\', false)';
            $replace[] = 'handle_img_tag(\'$2$4\', false, \'$1\')';
        }
    }

    $pattern[] = '%\[url\]([^\[]*?)\[/url\]%e';
    $pattern[] = '%\[url=([^\[]+?)\](.*?)\[/url\]%e';
    $pattern[] = '%\[email\]([^\[]*?)\[/email\]%';
    $pattern[] = '%\[email=([^\[]+?)\](.*?)\[/email\]%';
    $pattern[] = '%\[topic\]([1-9]\d*)\[/topic\]%e';
    $pattern[] = '%\[topic=([1-9]\d*)\](.*?)\[/topic\]%e';
    $pattern[] = '%\[post\]([1-9]\d*)\[/post\]%e';
    $pattern[] = '%\[post=([1-9]\d*)\](.*?)\[/post\]%e';
    $pattern[] = '%\[forum\]([1-9]\d*)\[/forum\]%e';
    $pattern[] = '%\[forum=([1-9]\d*)\](.*?)\[/forum\]%e';
    $pattern[] = '%\[user\]([1-9]\d*)\[/user\]%e';
    $pattern[] = '%\[user=([1-9]\d*)\](.*?)\[/user\]%e';

    $replace[] = 'handle_url_tag(\'$1\')';
    $replace[] = 'handle_url_tag(\'$1\', \'$2\')';
    $replace[] = '<a href="mailto:$1">$1</a>';
    $replace[] = '<a href="mailto:$1">$2</a>';
    $replace[] = 'handle_url_tag(\''.get_base_url(true).'/viewtopic.php?id=$1\')';
    $replace[] = 'handle_url_tag(\''.get_base_url(true).'/viewtopic.php?id=$1\', \'$2\')';
    $replace[] = 'handle_url_tag(\''.get_base_url(true).'/viewtopic.php?pid=$1#p$1\')';
    $replace[] = 'handle_url_tag(\''.get_base_url(true).'/viewtopic.php?pid=$1#p$1\', \'$2\')';
    $replace[] = 'handle_url_tag(\''.get_base_url(true).'/viewforum.php?id=$1\')';
    $replace[] = 'handle_url_tag(\''.get_base_url(true).'/viewforum.php?id=$1\', \'$2\')';
    $replace[] = 'handle_url_tag(\''.get_base_url(true).'/profile.php?id=$1\')';
    $replace[] = 'handle_url_tag(\''.get_base_url(true).'/profile.php?id=$1\', \'$2\')';

    // This thing takes a while! :)
    $text = preg_replace($pattern, $replace, $text);

    return $text;
}

New

function do_bbcode($text, $is_signature = false)
{
    global $lang_common, $pun_user, $pun_config, $re_list;

    if (strpos($text, '[quote') !== false)
    {
        $text = preg_replace('%\[quote\]\s*%', '</p><div class="quotebox"><blockquote><div><p>', $text);
        $text = preg_replace_callback('%\[quote=(&quot;|&\#039;|"|\'|)(.*?)\\1\]%s', create_function('$matches', 'global $lang_common; return "</p><div class=\"quotebox\"><cite>".str_replace(array(\'[\', \'\\"\'), array(\'&#91;\', \'"\'), $matches[2])." ".$lang_common[\'wrote\']."</cite><blockquote><div><p>";'), $text);
        $text = preg_replace('%\s*\[\/quote\]%S', '</p></div></blockquote></div><p>', $text);
    }
    if (!$is_signature)
    {
        $pattern_callback[] = $re_list;
        $replace_callback[] = 'handle_list_tag($matches[2], $matches[1])';
    }

    $pattern[] = '%\[b\](.*?)\[/b\]%ms';
    $pattern[] = '%\[i\](.*?)\[/i\]%ms';
    $pattern[] = '%\[u\](.*?)\[/u\]%ms';
    $pattern[] = '%\[s\](.*?)\[/s\]%ms';
    $pattern[] = '%\[del\](.*?)\[/del\]%ms';
    $pattern[] = '%\[ins\](.*?)\[/ins\]%ms';
    $pattern[] = '%\[em\](.*?)\[/em\]%ms';
    $pattern[] = '%\[colou?r=([a-zA-Z]{3,20}|\#[0-9a-fA-F]{6}|\#[0-9a-fA-F]{3})](.*?)\[/colou?r\]%ms';
    $pattern[] = '%\[h\](.*?)\[/h\]%ms';

    $replace[] = '<strong>$1</strong>';
    $replace[] = '<em>$1</em>';
    $replace[] = '<span class="bbu">$1</span>';
    $replace[] = '<span class="bbs">$1</span>';
    $replace[] = '<del>$1</del>';
    $replace[] = '<ins>$1</ins>';
    $replace[] = '<em>$1</em>';
    $replace[] = '<span style="color: $1">$2</span>';
    $replace[] = '</p><h5>$1</h5><p>';

    if (($is_signature && $pun_config['p_sig_img_tag'] == '1') || (!$is_signature && $pun_config['p_message_img_tag'] == '1'))
    {
        $pattern_callback[] = '%\[img\]((ht|f)tps?://)([^\s<"]*?)\[/img\]%';
        $pattern_callback[] = '%\[img=([^\[]*?)\]((ht|f)tps?://)([^\s<"]*?)\[/img\]%';
        if ($is_signature)
        {
            $replace_callback[] = 'handle_img_tag($matches[1].$matches[3], true)';
            $replace_callback[] = 'handle_img_tag($matches[2].$matches[4], true, $matches[1])';
        }
        else
        {
            $replace_callback[] = 'handle_img_tag($matches[1].$matches[3], false)';
            $replace_callback[] = 'handle_img_tag($matches[2].$matches[4], false, $matches[1])';
        }
    }

    $pattern_callback[] = '%\[url\]([^\[]*?)\[/url\]%';
    $pattern_callback[] = '%\[url=([^\[]+?)\](.*?)\[/url\]%';
    $pattern[] = '%\[email\]([^\[]*?)\[/email\]%';
    $pattern[] = '%\[email=([^\[]+?)\](.*?)\[/email\]%';
    $pattern_callback[] = '%\[topic\]([1-9]\d*)\[/topic\]%';
    $pattern_callback[] = '%\[topic=([1-9]\d*)\](.*?)\[/topic\]%';
    $pattern_callback[] = '%\[post\]([1-9]\d*)\[/post\]%';
    $pattern_callback[] = '%\[post=([1-9]\d*)\](.*?)\[/post\]%';
    $pattern_callback[] = '%\[forum\]([1-9]\d*)\[/forum\]%';
    $pattern_callback[] = '%\[forum=([1-9]\d*)\](.*?)\[/forum\]%';
    $pattern_callback[] = '%\[user\]([1-9]\d*)\[/user\]%';
    $pattern_callback[] = '%\[user=([1-9]\d*)\](.*?)\[/user\]%';

    $replace_callback[] = 'handle_url_tag($matches[1])';
    $replace_callback[] = 'handle_url_tag($matches[1], $matches[2])';
    $replace[] = '<a href="mailto:$1">$1</a>';
    $replace[] = '<a href="mailto:$1">$2</a>';
    $replace_callback[] = 'handle_url_tag(\''.get_base_url(true).'/viewtopic.php?id=\'.$matches[1])';
    $replace_callback[] = 'handle_url_tag(\''.get_base_url(true).'/viewtopic.php?id=\'.$matches[1], $matches[2])';
    $replace_callback[] = 'handle_url_tag(\''.get_base_url(true).'/viewtopic.php?pid=\'.$matches[1].\'#p\'.$matches[1])';
    $replace_callback[] = 'handle_url_tag(\''.get_base_url(true).'/viewtopic.php?pid=\'.$matches[1].\'#p\'.$matches[1], $matches[2])';
    $replace_callback[] = 'handle_url_tag(\''.get_base_url(true).'/viewforum.php?id=\'.$matches[1])';
    $replace_callback[] = 'handle_url_tag(\''.get_base_url(true).'/viewforum.php?id=\'.$matches[1], $matches[2])';
    $replace_callback[] = 'handle_url_tag(\''.get_base_url(true).'/profile.php?id=\'.$matches[1])';
    $replace_callback[] = 'handle_url_tag(\''.get_base_url(true).'/profile.php?id=\'.$matches[1], $matches[2])';

    // This thing takes a while! :)
    $text = preg_replace($pattern, $replace, $text);
    $count = count($pattern_callback);
    for($i = 0 ; $i < $count ; $i++)
    {
        $text = preg_replace_callback($pattern_callback[$i], create_function('$matches', 'return '.$replace_callback[$i].';'), $text);
    }
    return $text;
}

365

(18 replies, posted in PunBB 1.4 troubleshooting)

...
    $pattern[] = '#\[url\]([^\[]*?)\[/url\]#e';
    $pattern[] = '#\[url=([^\[]+?)\](.*?)\[/url\]#e';
    $pattern[] = '#\[email\]([^\[]*?)\[/email\]#';
    $pattern[] = '#\[email=([^\[]+?)\](.*?)\[/email\]#';
...
    $text = preg_replace($pattern, $replace, $text);
...

http://www.php.net/manual/en/migration55.deprecated.php

It is required to update a parser code in order that it correctly worked in PHP 5.5.x
This question should be addressed to the PunBB developers wink

366

(18 replies, posted in PunBB 1.4 troubleshooting)

PHP 5.5.x ?

This code influences only deleting of posts. It doesn't influence editing. You watch forum settings.

Constant FORUM_PAGE.
Open the header.php file and look at conditions with FORUM_PAGE use.

Change extensions which add these js.

Create folfer not_delete in folder /extensions.
Create file manifest.xml in folder /extensions/not_delete:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension SYSTEM "ext-1.0.dtd">


<extension engine="1.0">
    <id>not_delete</id>
    <title>Not delete for moderators</title>
    <version>1.0.0</version>
    <description>Not delete for moderators</description>
    <author>Visman</author>

    <minversion>1.4.2</minversion>
    <maxtestedon>1.4.2</maxtestedon>

    <hooks>

        <hook id=" dl_pre_permission_check"><![CDATA[
            $forum_page['is_admmod'] = ($forum_user['g_id'] == FORUM_ADMIN) ? true : false;
        ]]></hook>


    </hooks>
</extension>

Go to Administration → Extensions → Manage extensions and install Not delete for moderators

hook dl_pre_permission_check

$forum_page['is_admmod'] = ($forum_user['g_id'] == FORUM_ADMIN) ? true : false;

372

(8 replies, posted in PunBB 1.4 troubleshooting)

There will be more clarity if to find in a code an output here this unit:

                <footer>
                    
                    <section class="legal-notice">
                        <div>
                            <ul>
                                <li>&copy;&nbsp;2013&nbsp;DeLeuksteTaarten.nl.&nbsp;Alle rechten voorbehouden.</li>
                                <li><a href="http://www.deleukstetaarten.nl/sitemap">Sitemap</a></li>

                                <li><a href="http://www.panoramastudios.nl/" target="_blank">Website door Panorama Studios</a></li>
                            </ul>
                        </div>
                    </section>
                </footer>
            </div>


<script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    
    ga('create', 'UA-885478-3', 'auto');
    ga('send', 'pageview');
</script>

373

(8 replies, posted in PunBB 1.4 troubleshooting)

The footer.php file differs from the standard?

374

(8 replies, posted in PunBB 1.4 troubleshooting)

It is a question of this (forum.deleukstetaarten.nl) forum?
Scripts simply on simply aren't loaded.
Your forum:

<!-- forum_debug -->
    </div>
    </div>
    </div>
                <footer>
                    
                    <section class="legal-notice">
                        <div>
                            <ul>
                                <li>&copy;&nbsp;2013&nbsp;DeLeuksteTaarten.nl.&nbsp;Alle rechten voorbehouden.</li>
                                <li><a href="http:// www. deleukstetaarten .nl/sitemap">Sitemap</a></li>

                                <li><a href="http://www. panoramastudios .nl/" target="_blank">Website door Panorama Studios</a></li>
                            </ul>
                        </div>
                    </section>
                </footer>
            </div>


<script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    
    ga('create', 'UA-885478-3', 'auto');
    ga('send', 'pageview');
</script>
</body>
</html>

We will compare to this forum:

<!-- forum_debug -->
    </div>
    </div>
    <script>if (typeof PUNBB === 'undefined' || !PUNBB) {
        var PUNBB = {};
    }

    PUNBB.env = {
        base_url: "http:// punbb .informer .com/forums/",
        base_js_url: "http:// punbb .informer .com/forums/include/js/",
        user_lang: "English",
        user_style: "Oxygen",
        user_is_guest: "1",
        page: "index"
    };</script>
<script src="http:// punbb .informer .com/forums/include/js/min/punbb.common.min.js"></script>
<script>(function () {
    var forum_quickjump_url = "http:// punbb .informer .com/forums/forum/$1/$2/";
    var sef_friendly_url_array = new Array(26);
    sef_friendly_url_array[48] = "news";
    sef_friendly_url_array[23] = "feature-requests";
    sef_friendly_url_array[68] = "discussions";
    sef_friendly_url_array[78] = "development";
    sef_friendly_url_array[71] = "punbb-show-off";
    sef_friendly_url_array[80] = "punbb-14-bug-reports";
    sef_friendly_url_array[79] = "supported-extensions";
    sef_friendly_url_array[81] = "punbb-14-troubleshooting";
    sef_friendly_url_array[82] = "punbb-14-additions";
    sef_friendly_url_array[83] = "language-packs";
    sef_friendly_url_array[70] = "punbb-13-bug-reports";
    sef_friendly_url_array[65] = "punbb-13-extensions";
    sef_friendly_url_array[64] = "punbb-13-troubleshooting";
    sef_friendly_url_array[69] = "punbb-13-additions";
    sef_friendly_url_array[73] = "punbb-13-discussion";
    sef_friendly_url_array[22] = "punbb-12-bug-reports";
    sef_friendly_url_array[24] = "punbb-12-troubleshooting";
    sef_friendly_url_array[35] = "punbb-12-modifications-plugins-and-integrations";
    sef_friendly_url_array[34] = "punbb-12-show-off";
    sef_friendly_url_array[40] = "punbb-12-discussion";
    sef_friendly_url_array[74] = "punbbnet-discussion";
    sef_friendly_url_array[25] = "general-discussion";
    sef_friendly_url_array[26] = "programming";
    sef_friendly_url_array[72] = "fun";
    sef_friendly_url_array[47] = "archive";
    sef_friendly_url_array[28] = "test-forum";

    PUNBB.common.addDOMReadyEvent(function () { PUNBB.common.attachQuickjumpRedirect(forum_quickjump_url, sef_friendly_url_array); });
}());</script>
<script>
    $LAB.setOptions({AlwaysPreserveOrder:false})
    .script("http:// punbb .informer .com/forums/extensions/pun_jquery/js/jquery-1.6.4.min.js").wait()
    .wait(function () { PUNBB.common.addDOMReadyEvent(function(){var a=null,b=document.getElementsByTagName("head")[0],a=PUNBB.common.arrayOfMatched(function(a){return a.getAttribute("rel")&&a.getAttribute("rel")==="next"},document.getElementsByTagName("link"));if(a[0]&&b){var a=a[0],c=document.createElement("link");c.setAttribute("href",a.getAttribute("href"));c.setAttribute("rel","prerender");b.appendChild(c)}}); })
    .script("http:// punbb .informer .com/forums/extensions/fancy_scroll_to_top/js/fancy_scroll_to_top.min.js");
</script>
<script type="text/javascript"><!--
    document.write("<img src='http:// hits .informer .com/log.php?id=3&r="+ Math.round(100000 * Math.random()) + "' />");
--></script>
<script type="text/javascript"><!--
    var gaJsHost = (("https:" == document.location.protocol) ? "https:// ssl ." : "http:// www .");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics .com/ga.js' type='text/javascript'%3E%3C/script%3E"));
--></script>
<script type="text/javascript"><!--
    var pageTracker = _gat ._getTracker("UA-5138883-2");
    pageTracker._initData();
    pageTracker._trackPageview();
--></script>
</body>
</html>

Who adapted a forum for a site? Ask them a question that changed in a forum code.

375

(8 replies, posted in PunBB 1.4 troubleshooting)

1. Update all plugins to the last versions.
2. Open the console of the browser and you watch mistakes which appear during the work with your forum.

P.S. If use style containing template, in this template there has to be a code" <!-- - forum_javascript--->"