Show
Ignore:
Timestamp:
05/17/07 16:25:43 (5 years ago)
Author:
fproulx
Message:

2007-05-17 François Proulx <francois.proulx@…>

  • WARNING: This has not been fully tested. Full testing to be completed on 2006-05-18 but I'm pretty confident that it works pretty well.
  • Added automatic resize on Avatars
  • Added FavoriteHotspots? content (mostly used for Profiles)
  • Added new features to Content and File
  • Fixed URL regexp bug in HyperlinkUtils?
  • Updated French translations
  • Updates profiles template
  • TODO: Add getNewUI et processNewUI to FavoriteHotspots? to simplify input
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/wifidog/classes/Content/HTMLeditor/HTMLeditor.php

    r1192 r1226  
    6464 
    6565     */ 
    66     private $_FCKeditorAvailable = false; 
     66    protected $_FCKeditorAvailable = false; 
    6767 
    6868    /** 
     
    8484        } 
    8585    } 
    86      
     86 
    8787    /** Indicate that the content is suitable to store plain text. 
    8888     * @return true or false */ 
    8989    public function isTextualContent() { 
    90         return false; 
     90                return false; 
    9191    } 
    9292        /** 
     
    109109        $locale = LocaleList::GetDefault(); 
    110110        !empty($userData['typeInterface'])?$typeInterface=$userData['typeInterface']:$typeInterface=null; 
    111             $html .= "<div class='admin_element_data'>\n"; 
    112  
    113             $html .= _("Language") . ": " . $languages->GenererFormSelect($locale, "langstrings_" . $contentId . "_substring_new_language", null, TRUE); 
    114  
    115             $_FCKeditor = new FCKeditor('langstrings_' . $contentId . '_substring_new_string'); 
    116             $_FCKeditor->BasePath = SYSTEM_PATH . "lib/FCKeditor/"; 
    117             $_FCKeditor->Config["CustomConfigurationsPath"] = BASE_URL_PATH . "js/HTMLeditor.js"; 
    118             $_FCKeditor->Config["AutoDetectLanguage"] = false; 
    119             $_FCKeditor->Config["DefaultLanguage"] = substr(Locale::getCurrentLocale()->getId(), 0, 2); 
    120             $_FCKeditor->Config["StylesXmlPath"] = BASE_URL_PATH . "templates/HTMLeditor/css/" . substr(Locale::getCurrentLocale()->getId(), 0, 2) . ".xml"; 
    121             $_FCKeditor->Config["TemplatesXmlPath"] = BASE_URL_PATH . "templates/HTMLeditor/templates/" . substr(Locale::getCurrentLocale()->getId(), 0, 2) . ".xml"; 
    122             $_FCKeditor->ToolbarSet = "WiFiDOG"; 
    123  
    124             $_FCKeditor->Value = ""; 
    125  
    126             if ($typeInterface == 'LARGE') { 
    127                 $_FCKeditor->Height = 400; 
    128             } else { 
    129                 $_FCKeditor->Height = 200; 
    130             } 
    131             $_FCKeditor->Width = 386; 
    132  
    133             $html .= $_FCKeditor->CreateHtml(); 
    134  
    135             $html .= "</div>\n"; 
    136             $html .= "<div class='admin_element_tools'>\n"; 
    137  
    138             $html .= "<input type='submit' class='submit' name='langstrings_" . $contentId . "_add_new_entry' value='" . _("Add new string") . "'>"; 
    139             $html .= "</div>\n"; 
     111        $html .= "<div class='admin_element_data'>\n"; 
     112 
     113        $html .= _("Language") . ": " . $languages->GenererFormSelect($locale, "langstrings_" . $contentId . "_substring_new_language", null, TRUE); 
     114 
     115                if (Dependencies::check("FCKeditor")) { 
     116            // Load FCKeditor class 
     117            require_once('lib/FCKeditor/fckeditor.php'); 
     118 
     119                $_FCKeditor = new FCKeditor('langstrings_' . $contentId . '_substring_new_string'); 
     120                $_FCKeditor->BasePath = SYSTEM_PATH . "lib/FCKeditor/"; 
     121                $_FCKeditor->Config["CustomConfigurationsPath"] = BASE_URL_PATH . "js/HTMLeditor.js"; 
     122                $_FCKeditor->Config["AutoDetectLanguage"] = false; 
     123                $_FCKeditor->Config["DefaultLanguage"] = substr(Locale::getCurrentLocale()->getId(), 0, 2); 
     124                $_FCKeditor->Config["StylesXmlPath"] = BASE_URL_PATH . "templates/HTMLeditor/css/" . substr(Locale::getCurrentLocale()->getId(), 0, 2) . ".xml"; 
     125                $_FCKeditor->Config["TemplatesXmlPath"] = BASE_URL_PATH . "templates/HTMLeditor/templates/" . substr(Locale::getCurrentLocale()->getId(), 0, 2) . ".xml"; 
     126                $_FCKeditor->ToolbarSet = "WiFiDOG"; 
     127 
     128                $_FCKeditor->Value = ""; 
     129 
     130                if ($typeInterface == 'LARGE') { 
     131                    $_FCKeditor->Height = 400; 
     132                } else { 
     133                    $_FCKeditor->Height = 200; 
     134                } 
     135                $_FCKeditor->Width = 386; 
     136 
     137                $html .= $_FCKeditor->CreateHtml(); 
     138                } 
     139                else { 
     140                        $html .= "<textarea name='langstrings_{$contentId}_substring_new_string' class='textarea' cols='60' rows='3'></textarea>"; 
     141                } 
     142 
     143        $html .= "</div>\n"; 
     144        $html .= "<div class='admin_element_tools'>\n"; 
     145 
     146        $html .= "<input type='submit' class='submit' name='langstrings_" . $contentId . "_add_new_entry' value='" . _("Add new string") . "'>"; 
     147        $html .= "</div>\n"; 
    140148        return $html; 
    141149    } 
     
    225233    } 
    226234 
    227   
     235 
    228236    /** 
    229237     * Reloads the object from the database. Should normally be called after