Changeset 1691 in ExiteCMS


Ignore:
Timestamp:
08/25/08 18:49:18 (3 years ago)
Author:
hverton
Message:

Merged trunk revisions 1668:1690 into the PLi-Fusion branch

Location:
branches/PLi-Fusion
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/PLi-Fusion/forum/viewthread.php

    r1666 r1691  
    301301                } 
    302302                if (is_array($groups)) { 
    303                     // check for group matching as well, assume a match will be found 
    304                     $ranking_match = true; 
     303                    // check for group matching as well, start with the opposite of the 'bail out' value 
     304                    $ranking_match = $data2['rank_groups_and']; 
    305305                    foreach($groups as $group) { 
    306306                        if ($data2['rank_groups_and']) { 
  • branches/PLi-Fusion/includes/core_functions.php

    r1666 r1691  
    695695    // quote     & code blocks 
    696696    $text = preg_replace('#\[quote=([\r\n]*)(.*?)\]#si', '<b>\2 '.$locale['199'].':</b><br />[quote]', $text); 
    697     $qcount = substr_count($text, "[quote]"); $ccount = substr_count($text, "[code]"); 
     697    $qcount = substr_count(strtolower($text), "[quote]"); $ccount = substr_count(strtolower($text), "[code]"); 
    698698    for ($i=0;$i < $qcount;$i++) $text = preg_replace('#\[quote\](.*?)\[/quote\]#si', '<div class=\'quote\'>\1</div>', $text); 
    699699    for ($i=0;$i < $ccount;$i++) $text = preg_replace('#\[code\](.*?)\[/code\]#si', '<b>code:</b><div class=\'codeblock\'>\1</div>', $text); 
  • branches/PLi-Fusion/includes/forum_functions_include.php

    r1666 r1691  
    401401    global $urlblocks; 
    402402 
    403     $urlblocks[] = array($matches[1]=="="?$matches[2]:substr($matches[1],1), $matches[2]); 
     403    $urlblocks[] = array($matches[1]=="="?$matches[2]:substr($matches[1],1), parseubb(shortenlink($matches[2],50))); 
    404404    return "{@@*".(count($urlblocks)-1)."*@@}"; 
    405405} 
     
    417417    // validate the URL before converting it 
    418418    if (isURL($matches[0])) { 
    419         $urlblocks[] = array($matches[0], shortenlink($matches[0], 50)); 
     419        $urlblocks[] = array($matches[0], parseubb(shortenlink($matches[0], 50))); 
    420420        return "{@@*".(count($urlblocks)-1)."*@@}"; 
    421421    } else { 
  • branches/PLi-Fusion/includes/jscripts/core_functions.js

    r1666 r1691  
    5959 
    6060// update the innerHTML of 'id' using an AJAX call 
    61 function clientSideInclude(id, url) { 
     61function clientSideInclude(id, url, error) { 
    6262 
    6363    var element = document.getElementById(id); 
     
    6767    } 
    6868    var response = AjaxCall(url); 
    69     if (response != false) { 
     69    if (response != null) { 
    7070        element.innerHTML = response; 
    7171    } else { 
    72         element.innerHTML = "Sorry, your browser does not support XMLHTTPRequest objects. This page requires Internet Explorer 5 or better for Windows, or Firefox for any system, or Safari. Other compatible browsers may also exist."; 
    73     } 
    74 } 
    75  
    76 // simple synchronous AJAX call 
     72        if (error != null && error) { 
     73            element.innerHTML = "Sorry, your browser does not support XMLHTTPRequest objects. This page requires Internet Explorer 5 or better for Windows, or Firefox for any system, or Safari. Other compatible browsers may also exist."; 
     74        } 
     75    } 
     76} 
     77 
     78// simple synchronous AJAX call, return null when it fails 
    7779function AjaxCall(url) { 
    7880 
     
    98100    } 
    99101    if (req) { 
    100         // Synchronous request, wait till we have it all 
    101         req.open('GET', url, false); 
    102         req.send(null); 
    103         return req.responseText; 
    104     } else { 
    105         return false; 
     102        try { 
     103            // Synchronous request, wait till we have it all 
     104            req.open('GET', url, false); 
     105            req.send(null); 
     106            if (req.status != 200) { 
     107                return null; 
     108            } else { 
     109                return req.responseText; 
     110            } 
     111        } catch (e) { 
     112            return null; 
     113        } 
     114    } else { 
     115        return null; 
    106116    } 
    107117} 
  • branches/PLi-Fusion/includes/templates/forum.post.tpl

    r1666 r1691  
    9191                                    var hoteditor_path = "{$smarty.const.INCLUDES}jscripts/hoteditor-4.2/"; 
    9292                                    var hoteditor_theme_path = "{$smarty.const.THEME}hoteditor"; 
     93                                    var hoteditor_reply_to = "{$orgauthor|default:""}"; 
    9394                                </script> 
    9495                                <script language="javascript" type="text/javascript" src="{$smarty.const.INCLUDES}jscripts/hoteditor-4.2/editor__0001.js?version=4.2"></script>              
     
    191192                            <textarea name='attach_comment' cols='50' rows='2' class='textbox'>{$comments}</textarea> 
    192193                            <br /> 
    193                             <input type='submit' name='upload' value='{$locale.471}' class='button' /> 
     194                            {if $settings.hoteditor_enabled == 0 || $userdata.user_hoteditor == 0} 
     195                                <input type='submit' name='upload' value='{$locale.471}' class='button' /> 
     196                            {else} 
     197                                <input type='submit' name='upload' value='{$locale.471}' class='button' onclick='javascript:get_hoteditor_data();' /> 
     198                            {/if} 
    194199                        </td> 
    195200                    </tr> 
     
    230235                        <input type='text' id='fpm_option_{$opt}' name='fpm[option][{$opt}]' value='{$option}' class='textbox' maxlength='200' style='width:250px' /> 
    231236                        {if $opt == $fpm.option_show && $opt != $fpm_settings.option_max} 
    232                             <input type='submit' name='fpm[add_options]' class='button' value='{$locale.FPM_104}' /> 
     237                            {if $settings.hoteditor_enabled == 0 || $userdata.user_hoteditor == 0} 
     238                                <input type='submit' name='fpm[add_options]' class='button' value='{$locale.FPM_104}' /> 
     239                            {else} 
     240                                <input type='submit' name='fpm[add_options]' class='button' value='{$locale.FPM_104}' onclick='javascript:get_hoteditor_data();' /> 
     241                            {/if} 
    233242                        {/if} 
    234243                    </td> 
     
    296305                {/if} 
    297306                <input type='submit' name='cancel' value='{$locale.417}' class='button' /> 
    298                 <input type='submit' name='preview' value='{$button_preview}' class='button' onclick='javascript:get_hoteditor_data();' /> 
    299                 <input type='submit' name='save' value='{$button_save}' class='button' onclick='javascript:get_hoteditor_data();' /> 
     307                {if $settings.hoteditor_enabled == 0 || $userdata.user_hoteditor == 0} 
     308                    <input type='submit' name='preview' value='{$button_preview}' class='button' /> 
     309                    <input type='submit' name='save' value='{$button_save}' class='button' /> 
     310                {else} 
     311                    <input type='submit' name='preview' value='{$button_preview}' class='button' onclick='javascript:get_hoteditor_data();' /> 
     312                    <input type='submit' name='save' value='{$button_save}' class='button' onclick='javascript:get_hoteditor_data();' /> 
     313                {/if} 
    300314                <input type='hidden' name='post_author' value='{$post_author}' /> 
    301315                <input type='hidden' name='random_id' value='{$random_id}' /> 
  • branches/PLi-Fusion/includes/templates/forum.viewthread.tpl

    r1666 r1691  
    265265    <table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'> 
    266266        <tr> 
     267            {if $settings.hoteditor_enabled == 0 || $userdata.user_hoteditor == 0} 
    267268            <td align='center' class='tbl1'> 
    268             {if $settings.hoteditor_enabled == 0 || $userdata.user_hoteditor == 0} 
    269269                <textarea name='message' cols='80' rows='7' class='textbox' style='width:100%; height:{math equation='x/4' x=$smarty.const.BROWSER_HEIGHT format='%u'}px;'></textarea> 
    270270                <br /> 
     
    282282                <input type='button' value='quote' class='button' style='width:45px;' onclick="addText('message', '[quote]', '[/quote]');" /> 
    283283            {else} 
     284            <td align='left' class='tbl1'> 
    284285                <style type='text/css'>@import url({$smarty.const.THEME}hoteditor/style.css);</style> 
    285286                <input type='hidden' id='message' name='message' value='' /> 
     
    287288                    var hoteditor_path = "{$smarty.const.INCLUDES}jscripts/hoteditor-4.2/"; 
    288289                    var hoteditor_theme_path = "{$smarty.const.THEME}hoteditor"; 
     290                    var hoteditor_reply_to = ""; 
    289291                </script> 
    290292                <script language="javascript" type="text/javascript" src="{$smarty.const.INCLUDES}jscripts/hoteditor-4.2/editor__0001.js?version=4.2"></script>              
     
    325327        {/if} 
    326328        <tr> 
    327             <td align='center' class='tbl1'> 
     329            <td align='left' class='tbl1'> 
    328330                <input type='submit' name='postquickreply' value='{$locale.514}' class='button' onclick='javascript:get_hoteditor_data();' />&nbsp; &nbsp; 
    329331                {if $settings.hoteditor_enabled == 0 || $userdata.user_hoteditor == 0} 
  • branches/PLi-Fusion/includes/user_functions.php

    r1668 r1691  
    5656} 
    5757 
    58 // Check if a user is logging in 
     58// Check if a user wants to logging in 
    5959if (isset($_POST['login'])) { 
    6060    $auth_result = false; 
     
    9797} 
    9898 
    99 // login session expired? 
    100 if (!empty($_SESSION['login_expire']) && $_SESSION['login_expire'] < time()) { 
     99// if not in the process of posting a form, did the login session expired? 
     100if (count($_POST)==0 && !empty($_SESSION['login_expire']) && $_SESSION['login_expire'] < time()) { 
    101101    // clear the login info from the session 
    102102    unset($_SESSION['user']); 
Note: See TracChangeset for help on using the changeset viewer.