[Register]
Powered by Elgg

Running Elgg :: Blog :: Archives

October 2007

October 01, 2007

I just installed Elgg and I immediately created an account for myself and began inviting friends. I also made my account an admistrator. My question is how do I get rid of the news account? and do I loose any functionality by doing this?

Keywords: administrator, news

Posted by Jerrad Anderson @ Running Elgg | 0 comment(s)

Hey, I am new to Elgg.  I am working to set it up for a 5th grade class.  I set the "walled garden" parmeter so you can only see the login page until you login.

 Is there an easy way for me to remove the "access restriction" select box from all locations?  I basically want everything set to "Logged in Users".  But I don't want the users to have the option to change it.  I realize that with "walledgarden" set no one will be able to see anything.  I just try to simplfy things for the kids.

Posted by Ted Bowman @ Running Elgg | 2 comment(s)

Team,

Could somebody suggest a scalable and solid elgg hosting provider? Right now I am using hostrocket.com a suggestion from Heath Moser. They are okay but may not meet the expectations for higly scalable production elgg community.

Also Daveinboston(http://elgg.org/daveyc/ ) suggested mediateple.net. Could some body comment on this or suggest any proven ISP for a scalable Elgg hosting?

Thank you

Srini Vemula 

Keywords: elgg hosting

Posted by srini vemula @ Running Elgg | 3 comment(s)

October 02, 2007

Hi,

NOTE: see second comment for a resolution! Smile

We're getting the following displayed at the top of the browser window when we click to edit a blog post:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /webdata_internal/elgg/mod/blog/lib/weblogs_posts_edit.php on line 36

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /webdata_internal/elgg/mod/blog/lib/weblogs_posts_edit.php on line 36

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /webdata_internal/elgg/mod/blog/lib/weblogs_posts_edit.php on line 36

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /webdata_internal/elgg/mod/blog/lib/weblogs_posts_edit.php on line 36

This is still a small installation, but it seems to happen to every account but the admin account. Even making another account an admin user doesn't alter the behaviour. Any ideas?

Thanks, Jim 

Keywords: blog, edit, warnings, weblog_posts_edit

Posted by Jim Gotaas @ Running Elgg | 3 comment(s)

October 04, 2007

I'm sure I saw something about this in a forum somewhere, but can't seem to find it again. Anyone any ideas?

Rich

Keywords: activity, all, feed, RSS

Posted by Richard Osborne @ Running Elgg | 1 comment(s)

October 05, 2007

I set: $CFG->defaultlocale = 'vi'; but field "value" of "language " = "en_US" when new user has created.

Please help me! thanks! 

Keywords: $CFG->defaultlocale, default languages, defaultlocale, language, user_flags

Posted by hanhct @ Running Elgg | 2 comment(s)

Hello,

 

i have install Elgg.

And i have a lot of Problems.

After i click in my Profil on "Friend of a Friend" i see only an XML-File (the Text of it)

I have upload the "message-plugin" into the "mod" folder.

But how can i add the Code from the mysql-file into my database, and what i have to add into the .htaccess file.

I try samething but it wouldnt work :-(

 

 

mfg

Thorsten

Keywords: friend of a friend, messages, xml

Posted by fungemeinde @ Running Elgg | 0 comment(s)

October 08, 2007

 I installed Elgg for the first time today - I had some difficulty but was able to get it up and make some theme changes but I am getting the following errors/notices upon attempting to add a blog entry:

Notice: Undefined index: field in /home/mysportz/public_html/mod/blog/lib/weblogs_posts_add.php on line 35

Notice: Undefined index: values in /home/mysportz/public_html/mod/blog/lib/weblogs_posts_add.php on line 36

Notice: Use of undefined constant get_html_button - assumed 'get_html_button' in /home/mysportz/public_html/mod/contenttoolbar/lib/contenttoolbar_init.php on line 32

Notice: Use of undefined constant get_js_button - assumed 'get_js_button' in /home/mysportz/public_html/mod/contenttoolbar/lib/contenttoolbar_init.php on line 33

 

Any suggestions on what to change are appreciated.  

Keywords: blog error, Undefined index, weblogs_posts_add.php

Posted by Padre @ Running Elgg | 2 comment(s)

October 09, 2007

When I user first comes to my site there is no css on the front page.

Once they login the css works and even if they log off. The css works on the login page the second time.  I have walled garden set.

 In both cases in the source there is:

link href="http://pk.mysite.com/_templates/css/Default_Template" rel="stylesheet" type="text/css" />
I use firebug in firefox and it says there is not script rules in the file when the page is plain.
Thanks for any help. 

 

 

Keywords: css, error, login

Posted by Ted Bowman @ Running Elgg | 3 comment(s)

October 11, 2007

Site running new install of Elgg: http://www.anti-crap.com/blogs/members/

When a registered user logs in, it throws a 404 at http://www.anti-crap.com/blogs/members/blogs/members/ 

Removing the second instance of /blogs/members from the URL, the user is returned to http://www.anti-crap.com/blogs/members/ and is -tada- logged in.

How can I fix this? I've tried a all kinds of tweaks to config.php 

 Here are some elements from config.php:

 $CFG->wwwroot = 'http://www.anti-crap.com/blogs/members/';

 $CFG->dirroot = '/hsphere/local/home/anticrap/anti-crap.com/blogs/members/'; 

Thanks in advance for your insight into this issue...it's only been 12 hours and I'm getting nowhere.

Keywords: 404, login error

Posted by Jay Toups @ Running Elgg | 1 comment(s)

Sorry if there are some newbie questions here but I have run out of ideas,  when I goto the http://localhost/egg/index.php I get the following error.

Error: Database connection failed.

It is possible that the database is overloaded or otherwise not running properly.

The site administrator should also check that the database details have been correctly specified in config.php

 I have checked and rechecked the config.php and all the MySql stuff looks correct.  I would appreciate any suggestions that could be offered on how to reolve this.

 

Posted by Barry @ Running Elgg | 4 comment(s)

October 16, 2007

I have a question: Is it possible to run elgg on a website, where the mod_rewrite functionallity is disabled? Unfortunately my webspace provider doesn't allow the mod_rewrite. Actually I don't have the possibility to activate this on my own. Are there some workarounds to avoid this? Can anybody help? Thanks.

Michael

Keywords: mod_rewrite

Posted by rensch @ Running Elgg | 1 comment(s)

October 17, 2007

I've just installed Elgg this evening to http://www.emmadw.co.uk/elgg - but there a few problems, most of which I've solved, but ... 

1: The style sheets aren't working. I've not moved them, they're all where they should be (in mod/template/templates) & in the elggadmin page it's correctly saying /home/emmadw/public_html/elgg/mod/template/templates/

2: None of the links at the top are working, so, for example, http://www.emmadw.co.uk/elgg/news/weblog gives the error: 

The requested URL /public_html/elgg/mod/blog/index.php was not found on this server

I'm pretty sure that it's the .htaccess file that's causing the problem, but the Rewrite line seems to be right:

/public_html/elgg/

I've tried putting the /homes/emmadw/public_html/elgg/ in - though the example didn't have it, and I've tried putting the .htaccess file in the root of the public_html as well as in the root of elgg (i.e. where it is when you unzip it).

I'm sure it's going to be one of those things that I'll kick myself when I realise what I've done, but right now...

Keywords: .htaccess, no blog, no css

Posted by Emma @ Running Elgg | 2 comment(s)

October 19, 2007

I recently installed elgg here (www.researchmeetup.com) and then I decided to install a version of it at home so I could do some development there. However I come across this strange problem. No graphics?

 

Weird error
 

And here is my config file:

 

Config.txt  

If anyone has some ideas please let me know.

 

Thanks

Keywords: error, install, no graphics

Posted by Jerrad Anderson @ Running Elgg | 12 comment(s)

October 22, 2007

How can I change the wording on the Community Sidebar headers?

I don't want 'Profile Owner', 'Blog', etc. Something like 'Community Owner', 'Community Blog', would be nice and make much better sense?

Keywords: change sidebar, sidebar wording

Posted by rpr @ Running Elgg | 2 comment(s)

October 24, 2007

Please help:
How can i find out what my 'physical path to the files' is? I tried: /html/somesubfolder/elgg/
But i got only errors?
Is there a tool to show me this path?

Thanks, Itaker

Keywords: dirroot, installation, physical path

Posted by itaker @ Running Elgg | 2 comment(s)

October 28, 2007

hello everybody.

 

i would like to have icons displayed in the browser window to be only 50 x 50 pixels in size.

would anyone know, which css/php file to alter to achieve this?

 greets

researchbot 

Keywords: browser, icon, icons, size

Posted by jonas @ Running Elgg | 2 comment(s)

October 29, 2007

I received this message in my elgg.org private message inbox (btw, the email notification should include the text of the message, I think). Probably it would be better to answer it in public.

"I followed the installation instruction in order to set up elgg on a server. I edited the config file to my best knowledge. Still a got a blank screen in the step of the installation when one needs to point to the file specified in the title of the post. The memory allowed to php is actually 16 megs which should be sufficient. Any other idea for the cause of the blank screen? Is it possible that phpinfo.php isn't edited properly?  "

So I had this problem recently, and I cannot be sure off course, but the problem was solved when I increased the memory limit to 32 Mb. I guess it depends on what plugins you have installed, but in any case, I think it would be wise to increase the setting in htaccess-dist.

Keywords: memory limit

Posted by Ewout ter Haar @ Running Elgg | 1 comment(s)

Can anyone please look at my  'class.phpmailer.php' and tell me what I'm doing wrong?

I cannot add members.

Sincerely,

Jason Rogers

 

 

<?php
////////////////////////////////////////////////////
// PHPMailer - PHP email class
//
// Class for sending email using either
// sendmail, PHP mail(), or SMTP.  Methods are
// based upon the standard AspEmail(tm) classes.
//
// Copyright (C) 2001 - 2003  Brent R. Matzelle
//
// License: LGPL, see LICENSE
////////////////////////////////////////////////////

/**
 * PHPMailer - PHP email transport class
 * @package PHPMailer
 * @author Brent R. Matzelle
 * @copyright 2001 - 2003 Brent R. Matzelle
 */
class PHPMailer
{
    /////////////////////////////////////////////////
    // PUBLIC VARIABLES
    /////////////////////////////////////////////////

    /**
     * Email priority (1 = High, 3 = Normal, 5 = low).
     * @var int
     */
    var $Priority          = 3;

    /**
     * Sets the CharSet of the message.
     * @var string
     */
    var $CharSet           = "iso-8859-1";

    /**
     * Sets the Content-type of the message.
     * @var string
     */
    var $ContentType        = "text/plain";

    /**
     * Sets the Encoding of the message. Options for this are "8bit",
     * "7bit", "binary", "base64", and "quoted-printable".
     * @var string
     */
    var $Encoding          = "8bit";

    /**
     * Holds the most recent mailer error message.
     * @var string
     */
    var $ErrorInfo         = "";

    /**
     * Sets the From email address for the message.
     * @var string
     */
    var $From               = "businessadmin@woodbase.org";

    /**
     * Sets the From name of the message.
     * @var string
     */
    var $FromName           = "woodBASE new membership";

    /**
     * Sets the Sender email (Return-Path) of the message.  If not empty,
     * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
     * @var string
     */
    var $Sender           = "";

    /**
     * Sets the Subject of the message.
     * @var string
     */
    var $Subject           = "woodBASE new membership";

    /**
     * Sets the Body of the message.  This can be either an HTML or text body.
     * If HTML then run IsHTML(true).
     * @var string
     */
    var $Body               = "Enter text for mail body";

    /**
     * Sets the text-only body of the message.  This automatically sets the
     * email to multipart/alternative.  This body can be read by mail
     * clients that do not have HTML email capability such as mutt. Clients
     * that can read HTML will view the normal Body.
     * @var string
     */
    var $AltBody           = "Enter text for mail body";

    /**
     * Sets word wrapping on the body of the message to a given number of
     * characters.
     * @var int
     */
    var $WordWrap          = 0;

    /**
     * Method to send mail: ("mail", "sendmail", or "smtp").
     * @var string
     */
    var $Mailer           = "smpt";

    /**
     * Sets the path of the sendmail program.
     * @var string
     */
    var $Sendmail          = "/usr/sbin/sendmail";
   
    /**
     * Path to PHPMailer plugins.  This is now only useful if the SMTP class
     * is in a different directory than the PHP include path. 
     * @var string
     */
    var $PluginDir         = "X:/wamp/www/woodbase_beta/elgg/lib/phpmailer/";

    /**
     *  Holds PHPMailer version.
     *  @var string
     */
    var $Version           = "1.73";

    /**
     * Sets the email address that a reading confirmation will be sent.
     * @var string
     */
    var $ConfirmReadingTo  = "";

    /**
     *  Sets the hostname to use in Message-Id and Received headers
     *  and as default HELO string. If empty, the value returned
     *  by SERVER_NAME is used or 'localhost.localdomain'.
     *  @var string
     */
    var $Hostname          = "";

    /////////////////////////////////////////////////
    // SMTP VARIABLES
    /////////////////////////////////////////////////

    /**
     *  Sets the SMTP hosts.  All hosts must be separated by a
     *  semicolon.  You can also specify a different port
     *  for each host by using this format: [hostname:port]
     *  (e.g. "smtp1.example.com:25;smtp2.example.com").
     *  Hosts will be tried in order.
     *  @var string
     */
    var $Host        = "smtp1.servage.net";

    /**
     *  Sets the default SMTP server port.
     *  @var int
     */
    var $Port        = 25;

    /**
     *  Sets the SMTP HELO of the message (Default is $Hostname).
     *  @var string
     */
    var $Helo        = "";

    /**
     *  Sets SMTP authentication. Utilizes the Username and Password variables.
     *  @var bool
     */
    var $SMTPAuth     = false;

    /**
     *  Sets SMTP username.
     *  @var string
     */
    var $Username     = "batman@woodbase.org";

    /**
     *  Sets SMTP password.
     *  @var string
     */
    var $Password     = "I took out the PASSWORD for obvious reasons";

    /**
     *  Sets the SMTP server timeout in seconds. This function will not
     *  work with the win32 version.
     *  @var int
     */
    var $Timeout      = 10;

    /**
     *  Sets SMTP class debugging on or off.
     *  @var bool
     */
    var $SMTPDebug    = false;

    /**
     * Prevents the SMTP connection from being closed after each mail
     * sending.  If this is set to true then to close the connection
     * requires an explicit call to SmtpClose().
     * @var bool
     */
    var $SMTPKeepAlive = false;

    /**#@+
     * @access private
     */
    var $smtp           = NULL;
    var $to              = array();
    var $cc              = array();
    var $bcc             = array();
    var $ReplyTo         = array();
    var $attachment      = array();
    var $CustomHeader    = array();
    var $message_type    = "";
    var $boundary        = array();
    var $language        = array();
    var $error_count     = 0;
    var $LE              = "\n";
    /**#@-*/
   
    /////////////////////////////////////////////////
    // VARIABLE METHODS
    /////////////////////////////////////////////////

    /**
     * Constructor
     * Hack for Moodle as class may be included from various locations
     * SE 20041001
     * @param void
     * @return void
     */
    function PHPMailer () {
        global $CFG;
        $this->PluginDir = $CFG->libdir.'/phpmailer/';
    }

   

    /**
     * Sets message type to HTML. 
     * @param bool $bool
     * @return void
     */
    function IsHTML($bool) {
        if($bool == true)
           $this->ContentType = "text/html";
        else
           $this->ContentType = "text/plain";
    }

    /**
     * Sets Mailer to send message using SMTP.
     * @return void
     */
    function IsSMTP() {
        $this->Mailer = "smtp";
    }

    /**
     * Sets Mailer to send message using PHP mail() function.
     * @return void
     */
    function IsMail() {
        $this->Mailer = "mail";
    }

    /**
     * Sets Mailer to send message using the $Sendmail program.
     * @return void
     */
    function IsSendmail() {
        $this->Mailer = "sendmail";
    }

    /**
     * Sets Mailer to send message using the qmail MTA.
     * @return void
     */
    function IsQmail() {
        $this->Sendmail = "/var/qmail/bin/sendmail";
        $this->Mailer = "sendmail";
    }


    /////////////////////////////////////////////////
    // RECIPIENT METHODS
    /////////////////////////////////////////////////

    /**
     * Adds a "To" address. 
     * @param string $address
     * @param string $name
     * @return void
     */
    function AddAddress($address, $name = "") {
        $cur = count($this->to);
        $this->to[$cur][0] = trim($address);
        $this->to[$cur][1] = $name;
    }

    /**
     * Adds a "Cc" address. Note: this function works
     * with the SMTP mailer on win32, not with the "mail"
     * mailer. 
     * @param string $address
     * @param string $name
     * @return void
    */
    function AddCC($address, $name = "") {
        $cur = count($this->cc);
        $this->cc[$cur][0] = trim($address);
        $this->cc[$cur][1] = $name;
    }

    /**
     * Adds a "Bcc" address. Note: this function works
     * with the SMTP mailer on win32, not with the "mail"
     * mailer. 
     * @param string $address
     * @param string $name
     * @return void
     */
    function AddBCC($address, $name = "") {
        $cur = count($this->bcc);
        $this->bcc[$cur][0] = trim($address);
        $this->bcc[$cur][1] = $name;
    }

    /**
     * Adds a "Reply-to" address. 
     * @param string $address
     * @param string $name
     * @return void
     */
    function AddReplyTo($address, $name = "") {
        $cur = count($this->ReplyTo);
        $this->ReplyTo[$cur][0] = trim($address);
        $this->ReplyTo[$cur][1] = $name;
    }


    /////////////////////////////////////////////////
    // MAIL SENDING METHODS
    /////////////////////////////////////////////////

    /**
     * Creates message and assigns Mailer. If the message is
     * not sent successfully then it returns false.  Use the ErrorInfo
     * variable to view description of the error. 
     * @return bool
     */
    function Send() {
        $header = "";
        $body = "";
        $result = true;

        if((count($this->to) + count($this->cc) + count($this->bcc)) < 1)
        {
           $this->SetError($this->Lang("provide_address"));
           return false;
        }

        // Set whether the message is multipart/alternative
        if(!empty($this->AltBody))
           $this->ContentType = "multipart/alternative";

        $this->error_count = 0; // reset errors
        $this->SetMessageType();
        $header .= $this->CreateHeader();
        $body = $this->CreateBody();

        if($body == "") { return false; }

        // Choose the mailer
        switch($this->Mailer)
        {
           case "sendmail":
                $result = $this->SendmailSend($header, $body);
                break;
           case "mail":
                $result = $this->MailSend($header, $body);
                break;
           case "smtp":
                $result = $this->SmtpSend($header, $body);
                break;
           default:
           $this->SetError($this->Mailer . $this->Lang("mailer_not_supported"));
                $result = false;
                break;
        }

        return $result;
    }
   
    /**
     * Sends mail using the $Sendmail program. 
     * @access private
     * @return bool
     */
    function SendmailSend($header, $body) {
        if ($this->Sender != "")
           $sendmail = sprintf("%s -oi -f %s -t", $this->Sendmail, $this->Sender);
        else
           $sendmail = sprintf("%s -oi -t", $this->Sendmail);

        if(!@$mail = popen($sendmail, "w"))
        {
           $this->SetError($this->Lang("execute") . $this->Sendmail);
           return false;
        }

        fputs($mail, $header);
        fputs($mail, $body);
       
        $result = pclose($mail) >> 8 & 0xFF;
        if($result != 0)
        {
           $this->SetError($this->Lang("execute") . $this->Sendmail);
           return false;
        }

        return true;
    }

    /**
     * Sends mail using the PHP mail() function. 
     * @access private
     * @return bool
     */
    function MailSend($header, $body) {
        $to = "";
        for($i = 0; $i < count($this->to); $i++)
        {
           if($i != 0) { $to .= ", "; }
           $to .= $this->to[$i][0];
        }

        $safe = ini_get("safe_mode");
        if ($this->Sender != "" && ($safe == "" || $safe == "0"))
        {
           $old_from = ini_get("sendmail_from");
           ini_set("sendmail_from", $this->Sender);
           $params = sprintf("-oi -f %s", $this->Sender);
           $rt = @mail($to, $this->EncodeHeader($this->Subject), $body,
                        $header, $params);
        }
        else
           $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, $header);

        if (isset($old_from))
           ini_set("sendmail_from", $old_from);

        if(!$rt)
        {
           $this->SetError($this->Lang("instantiate"));
           return false;
        }

        return true;
    }

    /**
     * Sends mail via SMTP using PhpSMTP (Author:
     * Chris Ryan).  Returns bool.  Returns false if there is a
     * bad MAIL FROM, RCPT, or DATA input.
     * @access private
     * @return bool
     */
    function SmtpSend($header, $body) {
        include_once($this->PluginDir . "class.smtp.php");
        $error = "";
        $bad_rcpt = array();

        if(!$this->SmtpConnect())
           return false;

        $smtp_from = ($this->Sender == "") ? $this->From : $this->Sender;
        if(!$this->smtp->Mail($smtp_from))
        {
           $error = $this->Lang("from_failed") . $smtp_from;
           $this->SetError($error);
           $this->smtp->Reset();
           return false;
        }

        // Attempt to send attach all recipients
        for($i = 0; $i < count($this->to); $i++)
        {
           if(!$this->smtp->Recipient($this->to[$i][0]))
                $bad_rcpt[] = $this->to[$i][0];
        }
        for($i = 0; $i < count($this->cc); $i++)
        {
           if(!$this->smtp->Recipient($this->cc[$i][0]))
                $bad_rcpt[] = $this->cc[$i][0];
        }
        for($i = 0; $i < count($this->bcc); $i++)
        {
           if(!$this->smtp->Recipient($this->bcc[$i][0]))
                $bad_rcpt[] = $this->bcc[$i][0];
        }

        if(count($bad_rcpt) > 0) // Create error message
        {
           for($i = 0; $i < count($bad_rcpt); $i++)
           {
                if($i != 0) { $error .= ", "; }
                $error .= $bad_rcpt[$i];
           }
           $error = $this->Lang("recipients_failed") . $error;
           $this->SetError($error);
           $this->smtp->Reset();
           return false;
        }

        if(!$this->smtp->Data($header . $body))
        {
           $this->SetError($this->Lang("data_not_accepted"));
           $this->smtp->Reset();
           return false;
        }
        if($this->SMTPKeepAlive == true)
           $this->smtp->Reset();
        else
           $this->SmtpClose();

        return true;
    }

    /**
     * Initiates a connection to an SMTP server.  Returns false if the
     * operation failed.
     * @access private
     * @return bool
     */
    function SmtpConnect() {
        if($this->smtp == NULL) { $this->smtp = new SMTP(); }

        $this->smtp->do_debug = $this->SMTPDebug;
        $hosts = explode(";", $this->Host);
        $index = 0;
        $connection = ($this->smtp->Connected());

        // Retry while there is no connection
        while($index < count($hosts) && $connection == false)
        {
           if(strstr($hosts[$index], ":"))
                list($host, $port) = explode(":", $hosts[$index]);
           else
           {
                $host = $hosts[$index];
                $port = $this->Port;
           }

           if($this->smtp->Connect($host, $port, $this->Timeout))
           {
                if ($this->Helo != '')
                    $this->smtp->Hello($this->Helo);
                else
                    $this->smtp->Hello($this->ServerHostname());
       
                if($this->SMTPAuth)
                {
                    if(!$this->smtp->Authenticate($this->Username,
                                                  $this->Password))
                    {
                        $this->SetError($this->Lang("authenticate"));
                        $this->smtp->Reset();
                        $connection = false;
                    }
                }
                $connection = true;
           }
           $index++;
        }
        if(!$connection)
           $this->SetError($this->Lang("connect_host"));

        return $connection;
    }

    /**
     * Closes the active SMTP session if one exists.
     * @return void
     */
    function SmtpClose() {
        if($this->smtp != NULL)
        {
           if($this->smtp->Connected())
           {
                $this->smtp->Quit();
                $this->smtp->Close();
           }
        }
    }

    /**
     * Sets the language for all class error messages.  Returns false
     * if it cannot load the language file.  The default language type
     * is English.
     * SE 20041001: Added '$this->PluginDir' for Moodle compatibility
     *
     * @param string $lang_type Type of language (e.g. Portuguese: "br")
     * @param string $lang_path Path to the language file directory
     * @access public
     * @return bool
     */
    function SetLanguage($lang_type, $lang_path = "language/") {
        if(file_exists($this->PluginDir.$lang_path.'phpmailer.lang-'.$lang_type.'.php'))
           include($this->PluginDir.$lang_path.'phpmailer.lang-'.$lang_type.'.php');
        else if(file_exists($lang_path.'phpmailer.lang-en.php'))
           include($this->PluginDir.$lang_path.'phpmailer.lang-en.php');
        else
        {
           $this->SetError("Could not load language file");
           return false;
        }
        $this->Xlanguage= $PHPMAILER_LANG;
   
        return true;
    }

    /////////////////////////////////////////////////
    // MESSAGE CREATION METHODS
    /////////////////////////////////////////////////

    /**
     * Creates recipient headers. 
     * @access private
     * @return string
     */
    function AddrAppend($type, $addr) {
        $addr_str = $type . ": ";
        $addr_str .= $this->AddrFormat($addr[0]);
        if(count($addr) > 1)
        {
           for($i = 1; $i < count($addr); $i++)
                $addr_str .= ", " . $this->AddrFormat($addr[$i]);
        }
        $addr_str .= $this->LE;

        return $addr_str;
    }
   
    /**
     * Formats an address correctly.
     * @access private
     * @return string
     */
    function AddrFormat($addr) {
        if(empty($addr[1]))
           $formatted = $addr[0];
        else
        {
           $formatted = $this->EncodeHeader($addr[1], 'phrase') . " <" .
                         $addr[0] . ">";
        }

        return $formatted;
    }

    /**
     * Wraps message for use with mailers that do not
     * automatically perform wrapping and for quoted-printable.
     * Original written by philippe. 
     * @access private
     * @return string
     */
    function WrapText($message, $length, $qp_mode = false) {
        $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE;

        $message = $this->FixEOL($message);
        if (substr($message, -1) == $this->LE)
           $message = substr($message, 0, -1);

        $line = explode($this->LE, $message);
        $message = "";
        for ($i=0 ;$i < count($line); $i++)
        {
          $line_part = explode(" ", $line[$i]);
          $buf = "";
          for ($e = 0; $e<count($line_part); $e++)
          {
              $word = $line_part[$e];
              if ($qp_mode and (strlen($word) > $length))
              {
                $space_left = $length - strlen($buf) - 1;
                if ($e != 0)
                {
                    if ($space_left > 20)
                    {
                        $len = $space_left;
                        if (substr($word, $len - 1, 1) == "=")
                          $len--;
                        elseif (substr($word, $len - 2, 1) == "=")
                          $len -= 2;
                        $part = substr($word, 0, $len);
                        $word = substr($word, $len);
                        $buf .= " " . $part;
                        $message .= $buf . sprintf("=%s", $this->LE);
                    }
                    else
                    {
                        $message .= $buf . $soft_break;
                    }
                    $buf = "";
                }
                while (strlen($word) > 0)
                {
                    $len = $length;
                    if (substr($word, $len - 1, 1) == "=")
                        $len--;
                    elseif (substr($word, $len - 2, 1) == "=")
                        $len -= 2;
                    $part = substr($word, 0, $len);
                    $word = substr($word, $len);

                    if (strlen($word) > 0)
                        $message .= $part . sprintf("=%s", $this->LE);
                    else
                        $buf = $part;
                }
              }
              else
              {
                $buf_o = $buf;
                $buf .= ($e == 0) ? $word : (" " . $word);

                if (strlen($buf) > $length and $buf_o != "")
                {
                    $message .= $buf_o . $soft_break;
                    $buf = $word;
                }
              }
          }
          $message .= $buf . $this->LE;
        }

        return $message;
    }
   
    /**
     * Set the body wrapping.
     * @access private
     * @return void
     */
    function SetWordWrap() {
        if($this->WordWrap < 1)
           return;
          
        switch($this->message_type)
        {
           case "alt":
              // fall through
           case "alt_attachments":
              $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap);
              break;
           default:
              $this->Body = $this->WrapText($this->Body, $this->WordWrap);
              break;
        }
    }

    /**
     * Assembles message header. 
     * @access private
     * @return string
     */
    function CreateHeader() {
        $result = "";
       
        // Set the boundaries
        $uniq_id = md5(uniqid(time()));
        $this->boundary[1] = "b1_" . $uniq_id;
        $this->boundary[2] = "b2_" . $uniq_id;

        $result .= $this->HeaderLine("Date", $this->RFCDate());
        if($this->Sender == "")
           $result .= $this->HeaderLine("Return-Path", trim($this->From));
        else
           $result .= $this->HeaderLine("Return-Path", trim($this->Sender));
       
        // To be created automatically by mail()
        if($this->Mailer != "mail")
        {
           if(count($this->to) > 0)
                $result .= $this->AddrAppend("To", $this->to);
           else if (count($this->cc) == 0)
                $result .= $this->HeaderLine("To", "undisclosed-recipients:;");
           if(count($this->cc) > 0)
                $result .= $this->AddrAppend("Cc", $this->cc);
        }

        $from = array();
        $from[0][0] = trim($this->From);
        $from[0][1] = $this->FromName;
        $result .= $this->AddrAppend("From", $from);

        // sendmail and mail() extract Bcc from the header before sending
        if((($this->Mailer == "sendmail") || ($this->Mailer == "mail")) && (count($this->bcc) > 0))
           $result .= $this->AddrAppend("Bcc", $this->bcc);

        if(count($this->ReplyTo) > 0)
           $result .= $this->AddrAppend("Reply-to", $this->ReplyTo);

        // mail() sets the subject itself
        if($this->Mailer != "mail")
           $result .= $this->HeaderLine("Subject", $this->EncodeHeader(trim($this->Subject)));

        $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE);
        $result .= $this->HeaderLine("X-Priority", $this->Priority);
        $result .= $this->HeaderLine("X-Mailer", "PHPMailer [version " . $this->Version . "]");
       
        if($this->ConfirmReadingTo != "")
        {
           $result .= $this->HeaderLine("Disposition-Notification-To",
                      "<" . trim($this->ConfirmReadingTo) . ">");
        }

        // Add custom headers
        for($index = 0; $index < count($this->CustomHeader); $index++)
        {
           $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]),
                      $this->EncodeHeader(trim($this->CustomHeader[$index][1])));
        }
        $result .= $this->HeaderLine("MIME-Version", "1.0");

        switch($this->message_type)
        {
           case "plain":
                $result .= $this->HeaderLine("Content-Transfer-Encoding", $this->Encoding);
                $result .= sprintf("Content-Type: %s; charset=\"%s\"",
                                    $this->ContentType, $this->CharSet);
                break;
           case "attachments":
                // fall through
           case "alt_attachments":
                if($this->InlineImageExists())
                {
                    $result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s",
                                    "multipart/related", $this->LE, $this->LE,
                                    $this->boundary[1], $this->LE);
                }
                else
                {
                    $result .= $this->HeaderLine("Content-Type", "multipart/mixed;");
                    $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
                }
                break;
           case "alt":
                $result .= $this->HeaderLine("Content-Type", "multipart/alternative;");
                $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
                break;
        }

        if($this->Mailer != "mail")
           $result .= $this->LE.$this->LE;

        return $result;
    }

    /**
     * Assembles the message body.  Returns an empty string on failure.
     * @access private
     * @return string
     */
    function CreateBody() {
        $result = "";

        $this->SetWordWrap();

        switch($this->message_type)
        {
           case "alt":
                $result .= $this->GetBoundary($this->boundary[1], "",
                                              "text/plain", "");
                $result .= $this->EncodeString($this->AltBody, $this->Encoding);
                $result .= $this->LE.$this->LE;
                $result .= $this->GetBoundary($this->boundary[1], "",
                                              "text/html", "");
               
                $result .= $this->EncodeString($this->Body, $this->Encoding);
                $result .= $this->LE.$this->LE;
   
                $result .= $this->EndBoundary($this->boundary[1]);
                break;
           case "plain":
                $result .= $this->EncodeString($this->Body, $this->Encoding);
                break;
           case "attachments":
                $result .= $this->GetBoundary($this->boundary[1], "", "", "");
                $result .= $this->EncodeString($this->Body, $this->Encoding);
                $result .= $this->LE;
    
                $result .= $this->AttachAll();
                break;
           case "alt_attachments":
                $result .= sprintf("--%s%s", $this->boundary[1], $this->LE);
                $result .= sprintf("Content-Type: %s;%s" .
                                   "\tboundary=\"%s\"%s",
                                   "multipart/alternative", $this->LE,
               

Posted by jaroger1 @ Running Elgg | 1 comment(s)

Hi, we're having trouble installing Elgg. We keep getting the following error:

Elgg error: Apache does not have mod_rewrite loaded. Please check your apache setup.

 However, this file is there in the Apache folders. Any ideas?

Carl.

Keywords: Apachemod_rewrite

Posted by Carl Kennard @ Running Elgg | 3 comment(s)

I am not a developer but do have some experiance, but please keep it simple. thanks

I know this have been covered before, and I have tried all the suggestions.
""
my webroot isĀ 

my root dirroot should therefore be
/folder/elgg/
'''

I have tried everything to get elgg to regognise the dirroot but nothing.

If there could be abnything I could have or should have done to get this to work then please help.

thanks

Keywords: config.php, dirroot

Posted by polarbear @ Running Elgg | 6 comment(s)

October 30, 2007

Hi,

In our new Elgg installation, 'flag content' doesn't seem to be working. When you click on the 'flag' button, nothing seems to happen, and there's no report generated in the administrator's page. Is this happening to anybody else?

I discovered this exchange on the Developer Discussion blog from back in July:

http://elgg.org/developers/weblog/1023.html

This recommends adding

$function['init'][] = $CFG->dirroot . "units/admin/admin_actions.php";

to units/admin/main.php (which was apparently removed going from RC1 to the final version).

Does anybody know if there is any risk associated with this fix? (Sorry - I'm just starting to get my head around the Elgg code base and structure.) I've tested it slightly on a home trial installation, and it seems to work, but I haven't tested it enough to be confident

ADDED NOTE: I've run some quick tests on Eduspaces and this site as well, and there's no apparent action when I click on Flag content. I don't know if any reports show up in the administrator page.

Thanks, Jim 

Keywords: elgg 0.8, flag content, possible bug

Posted by Jim Gotaas @ Running Elgg | 1 comment(s)

Hi,

we are having problems to download plugins which are stored in Subversion repositories. Clicking on the download link just a blank page shows up - for example the Vanilla - Forum Plugin.

http://elgg.org/mod/plugins/plugin.php?id=42

or the Task List

http://elgg.org/mod/plugins/plugin.php?id=7 

Posted by Joachim @ Running Elgg | 1 comment(s)

Hi,

I have just installed elgg on my server and I am not seeing words! Actually it is also happening on here!

 I do not have any problems viewing other websites, any ideas? It only happens when logged in...

thanks!

 

[You do not have permission to access this file]

Posted by Chris @ Running Elgg | 0 comment(s)

Site supported by Curverider Ltd - powered by the awesome Elgg