Changeset 1167 in ExiteCMS


Ignore:
Timestamp:
12/11/07 23:51:14 (4 years ago)
Author:
hverton
Message:

fixed an error displaying the forum rules
added the locale code to the image buttons in site_links

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/forum/viewforum.php

    r1071 r1167  
    6363$variables['forum'] = $data; 
    6464 
    65 // if a forum rules custompage is given, check if it exists 
    66 $result2 = dbquery("SELECT page_title FROM ".$db_prefix."custom_pages WHERE page_id = '".$data['forum_rulespage']."'"); 
    67 if (!$result2) { 
    68     $data['rulespage_defined'] = false; 
    69 } else { 
    70     $data['rulespage_defined'] = true; 
    71     $data2 = dbarray($result2); 
    72     $data['forum_rulestitle'] = $data2['page_title']; 
    73 } 
    74  
    7565// bail out if the user doesn't have access to this forum, or requested a forum category ID 
    7666if (!checkgroup($data['forum_access']) || !$data['forum_cat']) { 
     
    7868} 
    7969 
     70// if a forum rules custompage is given, check if it exists 
     71$variables['rulespage_defined'] = false; 
     72if ($data['forum_rulespage']) { 
     73    $result2 = dbquery("SELECT page_title FROM ".$db_prefix."custom_pages WHERE page_id = '".$data['forum_rulespage']."'"); 
     74    if (dbrows($result2)) { 
     75        $variables['rulespage_defined'] = true; 
     76        $data2 = dbarray($result2); 
     77        $variables['forum_rulestitle'] = $data2['page_title']; 
     78    } 
     79} 
    8080// check if the user is allowed to post in this forum 
    8181$can_post = checkgroup($data['forum_posting']); 
  • trunk/includes/templates/admin.site_links.tpl

    r1158 r1167  
    182182                {if $panels[id].panel_count != 1} 
    183183                    {if !$panels[id].links[id2].menu_first} 
    184                         {imagelink link=$smarty.const.FUSION_SELF|cat:$aidlink|cat:"&action=move&swap="|cat:$panels[id].links[id2].up|cat:"&with="|cat:$panels[id].links[id2].link_id|cat:"&panel="|cat:$panels[id].panel image="up.gif" alt=$locale.440 title=$locale.440} 
     184                        {imagelink link=$smarty.const.FUSION_SELF|cat:$aidlink|cat:"&action=move&swap="|cat:$panels[id].links[id2].up|cat:"&with="|cat:$panels[id].links[id2].link_id|cat:"&panel="|cat:$panels[id].panel|cat:$url_locale image="up.gif" alt=$locale.440 title=$locale.440} 
    185185                    {/if} 
    186186                    {if !$panels[id].links[id2].menu_last} 
    187                         {imagelink link=$smarty.const.FUSION_SELF|cat:$aidlink|cat:"&action=move&swap="|cat:$panels[id].links[id2].down|cat:"&with="|cat:$panels[id].links[id2].link_id|cat:"&panel="|cat:$panels[id].panel image="down.gif" alt=$locale.443 title=$locale.443} 
     187                        {imagelink link=$smarty.const.FUSION_SELF|cat:$aidlink|cat:"&action=move&swap="|cat:$panels[id].links[id2].down|cat:"&with="|cat:$panels[id].links[id2].link_id|cat:"&panel="|cat:$panels[id].panel|cat:$url_locale image="down.gif" alt=$locale.443 title=$locale.443} 
    188188                    {/if} 
    189189                {/if} 
    190190                </td> 
    191191                <td align='center' width='1%' class='tbl1' style='white-space:nowrap'> 
    192                     {imagelink link=$smarty.const.FUSION_SELF|cat:$aidlink|cat:"&amp;action=edit&amp;link_id="|cat:$panels[id].links[id2].link_id|cat:"&amp;panel="|cat:$panels[id].panel image="page_edit.gif" alt=$locale.434 title=$locale.434} 
     192                    {imagelink link=$smarty.const.FUSION_SELF|cat:$aidlink|cat:"&amp;action=edit&amp;link_id="|cat:$panels[id].links[id2].link_id|cat:"&amp;panel="|cat:$panels[id].panel|cat:$url_locale image="page_edit.gif" alt=$locale.434 title=$locale.434} 
    193193                    &nbsp; 
    194                     {imagelink link=$smarty.const.FUSION_SELF|cat:$aidlink|cat:"&amp;action=delete&amp;link_id="|cat:$panels[id].links[id2].link_id|cat:"&amp;panel="|cat:$panels[id].panel image="page_delete.gif" alt=$locale.435 title=$locale.435} 
     194                    {imagelink link=$smarty.const.FUSION_SELF|cat:$aidlink|cat:"&amp;action=delete&amp;link_id="|cat:$panels[id].links[id2].link_id|cat:"&amp;panel="|cat:$panels[id].panel|cat:$url_locale image="page_delete.gif" alt=$locale.435 title=$locale.435} 
    195195                </td> 
    196196            </tr> 
  • trunk/includes/templates/forum.viewforum.tpl

    r894 r1167  
    5353                <tr> 
    5454                    <td colspan='7' class='tbl2' align='center'> 
    55                         <img src='{$smarty.const.THEME}images/bullet.gif' alt='' />&nbsp;<a class='tbl_top_mid' href='/viewpage.php?page_id={$forum.forum_rulespage}'>{$forum.forum_rulestitle}</a>&nbsp;<img src='{$smarty.const.THEME}images/bulletb.gif' alt='' /> 
     55                        <img src='{$smarty.const.THEME}images/bullet.gif' alt='' />&nbsp;<a class='tbl_top_mid' href='/viewpage.php?page_id={$forum.forum_rulespage}'>{$forum_rulestitle}</a>&nbsp;<img src='{$smarty.const.THEME}images/bulletb.gif' alt='' /> 
    5656                    </td> 
    5757                </tr> 
Note: See TracChangeset for help on using the changeset viewer.