[Register]
Powered by Elgg

Developer discussion :: Blog :: Archives

April 2007

April 02, 2007

 I spanish! :S

 

I have a problem with the instalation...

when I go to elgg/_elggadmin/ later of configurate my config.php I can enter my user an pass but anything more.... I can se the page of config and the template and front page but anything more. And if I go to the root /elgg/ the messege:

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

 

 

but the database is correct!

 

???Thank

Posted by Surfer @ Developer discussion | 4 comment(s)

I would like to put custom HTML content on the main index page (logged in or not). The index page I've tried to edit doesn't seem to change anything. Which file should I go after?

I've tried editing /content/mainindex/content_loggedout.php and /content_loggedout.php

Posted by Mark @ Developer discussion | 2 comment(s)

April 03, 2007

I am running elgg version .7. 

 Does .7 have enhanced profiles?  If not where can I download the necessary files?

 

Thanks

Keywords: Enhanced Profiles, Profile Commenting

Posted by devin calloway @ Developer discussion | 7 comment(s)

April 04, 2007

just wondering exactly what "search overhaul" means in the roadmap...is this about searching content via lucene or a similar engine, or is there anything coming that will support multiple tag searching or filtering (e.g. pick one tag, then add another to refine filter, then anotehr etc...)

Keywords: search, tags

Posted by daveinboston @ Developer discussion | 1 comment(s)

Hello:

I am trying to set a flag upon user registration but can't seem to pass the correct user ID for users that have been "invited" by another user. So, in units/invite_actions.php, for case "invite_join", where and how do I grab the user ID to set the flag? I was able to do this for case, "invite_invite" with $USER->ident. But this fails in case "invite_join" and doesn't even set the flag.

I've tried the following vars; they do not work:

$USER->ident

$u->ident

$ident 

Thanks,

Randy 

Keywords: $user->ident, flag, user flags, user_flag_set

Posted by Randy Ahn @ Developer discussion | 1 comment(s)

I'm using elgg to power an online component of an Ed-Tech conference next month and need to batch create invitations to the users. Before I dig into writing code for this, has anyone already done something similar?

Please say YES! 

Keywords: batch, create user, invite

Posted by Tim Hawes @ Developer discussion | 3 comment(s)

April 05, 2007

For a while now, we have been using an alternative interface to the elgg database, using the django framework (written in Python), which we would like to share. Django makes it easy to create an administrative view of a database, with basic CRUD functionality.The other great advantage is that you can write Python scripts to interact with your database, which is especially useful for the SQL-challenged like me.

Disclaimer: if you use this, be careful, since you are interacting directly with your elgg database. Data may be lost, corrupted, etc. I have used it for some months now, without any problems, but there may be programming mistakes or different assumptions about the database than elgg makes. If you only use it to read the DB, the risks are lower. But anyway, make a backup of your DB before experimenting with this.

You can browse the code here and check it out with svn co http://pccepa3.if.usp.br/svn/trunk/admintools . Note that the file elgg/models.py must be kept mannualy in sync with elgg database scheme, and what we have here may not correspond exactly to the DB that you have. In particular, we have an extra "nusp" field on the user table, and you'll probably want to delete the whole "uspdata" application so that you don't pollute your DB with tables that you don't have.

Here is a screenshot of the initial admin view:

[File does not exist]

and editing the details of a user:

[File does not exist]

To install, set up Django, copy settings-dist.py to settings.py and fill in your DB access details and database prefix.  Make manage.py executable, do a "./manage.py syncdb" as per the django documentation. Run "./manage.py runserver" to run a small server on port 8000. Go to localhost:8000 and log in to the admin interface.

As an example, this is what you can do via python scripting:

# Change all forwarder = dashboard to profile
for uf in UserFlag.objects.all():
if uf.flag == 'forwarder' and uf.value == 'dashboard':
uf.value = 'profile'
uf.save() 

 Now, this is not dificult to do with SQL, but to do a migration of the old widget to the new ones, I would not know how to express this in SQL:

def migrate(user):
print 'migrating widgets for user', user.name
dwidgets = DashboardWidget.objects.filter(widget_type='text', owner=user)
i = 1
for dwidget in dwidgets:
print 'found a widget of type ',dwidget.widget_type
(widget,created) = Widget.objects.get_or_create(owner=user, \\
wtype='widget::text',location='profile \\
location_id=0,wcolumn=0,display_order = i*10)
widget.access=dwidget.access
widget.save()
i+=1
for dd in DashboardData.objects.filter(widget=dwidget):
name = dd.name.replace('adash','widget')
value = dd.value
(wd,created) = WidgetData.objects.get_or_create(widget = widget.ident, \\
name=name, value=value)
wd.save()

If you find this useful and want to help the development, drop me a note.

Posted by Ewout ter Haar @ Developer discussion | 2 comment(s)

Hi All,

Sorry if this was posted before (I couldn't seem to find it), I have a new install everything looks OK, except that I have a few users created with profile data, but when loading the login/out pages with {{randomusers}}, I see "Here are some example users: Sorry, no users have filled in their profiles yet."  even though there are 3 or 4 users with profiles.  I am assuming that this is the same reason (whatever it may be) that the siteusers is returning nothing also.

Thanks for your info.

Clint

Keywords: install, users

Posted by cmcompto @ Developer discussion | 6 comment(s)

I know that most searching happens through tagging, but I'm used to some sort of site search engine and I can't find anything like that. Do you have the code for your search box on the top of this site? Is this a feature I'm just overlooking?

Also is there a way to simply list all of the site's members like the admin/user.php but without the ability to edit profiles?

Thanks

Posted by Mark @ Developer discussion | 9 comment(s)

April 08, 2007

Hi All,

I have everything working well, but I updated to the latest svn and I get the following error from the loggedinusers plugin:

Warning: Invalid argument supplied for foreach() in /home/musicrow/public_html/mod/loggedinusers/lib.php on line 24

This only appears when NOT logged in, it goes away when I login.  THe funny thing is that the plugin seems to be working fine (asside from the error).

Here is what the file looks like at the foreach:

      $loggedin_raw = array();
        foreach ($users as $user)
        {
                $fullname = htmlspecialchars($user->fullname);
                $username = $user->username;
                $loggedin_raw[] = "<a href=\"{$CFG->wwwroot}{$username}\" title=\"{$fullname}\">{$fullname}</a>";
        }
        shuffle($loggedin_raw);
        $output = "<div class=loggedinusers>".implode(", ",$loggedin_raw)."</div>\n";

        return $output;

 

So, what's weird is that once I login, the the error goes away?   Any ideas?

Thanks a lot!!

Clint 

Posted by cmcompto @ Developer discussion | 6 comment(s)

I just updated to SVN1056. . . Many fantastic improvements since I logged off a few weeks back.  I love the new profile and widgets system.  Having a weird formating issue though:

 http://doggybloggy.com/blogdog/

Not sure if this is expected at this point in the development but the part of the profile after the "extended profile" link justifies right. 

Also, the video widget doesn't format to any other size than what I have set in the contenttoolbar plugin (425x350), even if I change the actual embed code and intended size settings. . which I set to 200x150 in the above link.

Ideas?

Keywords: profile, video widget, widget

Posted by Todd @ Developer discussion | 5 comment(s)

Hi all;

I do not know much about IT but I really want a vietnamese language for elgg. I tried to just copy the English and translate it to Vietnamese but it didnt work out. So i tried to research they said i need to complie .po files something, i tried but too hard for me to understand.

Now i did translate all the contents of en_GB.po file into Vietnamese but I do not know how to install. Can you guys please help me? I can send you the vietnamese translate for that file too...

Please help

Thank you very much

Posted by mic @ Developer discussion | 4 comment(s)

April 09, 2007

I am seeing a strange problem when trying to register a user through "_invite/register.php", I am able to enter the registration info, but when I hit submit, it asks me to login?  I am using the latest from SVN. I am beginning to think that the issues I am facing are related (somehow) to the updated version and maybe some problem wiht my install??

I may roll back tonight to see if the problems go away.  If anybody recognises the same issues, please let me know what you did to resolve it.

Thanks,
Clint

Posted by cmcompto @ Developer discussion | 0 comment(s)

Hi All,

I just updated to the latest SVN based on some of the changes Dave included, but now my previously fine install returns nothing but blank pages?  I alread updated previously with no such problems, am I missing something?

Thanks,

Clint 

Posted by cmcompto @ Developer discussion | 5 comment(s)

April 12, 2007

I think I see a couple of bugs with the messages plugin...upon deletion of a message that has been received, I am being directed to http://urlofelggsite//messages/   note the dual slash,  what this tells me is that the username isn't being added to the redirect URL.  Same thing goes for the deleting if sent messages, but it tries to redirect to http://urlofelggsite/messages/sent  (no dual slash, but still missing the username).

I have the .htaccess updated exactly as per the README inthe plugin.  Has anyone else seen this problem?

Clint 

Posted by cmcompto @ Developer discussion | 4 comment(s)

Are there plans to allow strings in theme keywords? I tried using a string as an argument for a keyword but it doesn't work.

Keywords: keywords, themes

Posted by JP Loh @ Developer discussion | 0 comment(s)

Hi all;

I just created a new community and i wanted it to be the place where members can not only  download but also upload the files .

However if i set the Access restriction for only that community then all the members of that community are able to delete the files in community.

So I would like to ask is there anyway just let them to download/upload files to the community without deleting them?

Thank you very much.  

Posted by mic @ Developer discussion | 2 comment(s)

April 13, 2007

Hello to all, I need its help, I have installed moodle 7 with elgg 7,0 when doing click in NO ACTIVITY  unfold the page of elgg but that a page of denied access. some idea? thanks Arturo

Posted by Arturo @ Developer discussion | 0 comment(s)

April 14, 2007

Hi All,

Just updated to the latest svn as of (14-April) and now the blog entry body is not showing for any blog posts.  I can see the titles, but the body is blank.  Has anyone else seen this?

I also just noticed that comments aren't showing for any posts either?  Everything else looks great though, including the RSS functionality, it shows all post info...title and body.

Thanks.

Clint

Posted by cmcompto @ Developer discussion | 5 comment(s)

Is anyone else usgin the "friendicon" mod with the latest or anything later than the official 0.7 release?  It seems to have stopped showing the icons for the friends.  Everything else is working fine, including all mods...so just wondering if this is a quirk of the friendicon mod and maybe it doesn't work with the later releases?

[Update:] upon trying to install the commentwall mod, the following error was observed when attempting to configure the comment wall widget:

Input Array does not match ?: SELECT * FROM elgguser_flags WHERE flag = 'friendicon_sidebar' AND user_id =

Warning: Cannot modify header information - headers already sent by (output started at /home/testacct/public_html/lib/adodb/adodb.inc.php:390) in /home/testacct/public_html/mod/widget/edit.php on line 91

[Update 2]

So now it looks like the  friendicon has broken something (at least a first glance) because when any widget is added and one tries to configure the selected widget, the same error appears:

"Input Array does not match ?: SELECT * FROM elgguser_flags WHERE flag = 'friendicon_sidebar' AND user_id =

Warning: Cannot modify header information - headers already sent by (output started at /home/testacct/public_html/lib/adodb/adodb.inc.php:390) in /home/testacct/public_html/mod/widget/edit.php on line
91"

I need a second (or third) pair of eyes on this, especially one of the more skillful members.

Thanks for the assist.

Clint 

Posted by cmcompto @ Developer discussion | 1 comment(s)

Whew!  I have been going through the entire 1068 release, and it is looking pretty good.  I did notice a few issues with the extended profile and permissions along with the widgets.

I see a few symptoms of the same problem:

1.  Whilst logged in as "news", if I click "Add widget" from the main profile or extended profile pages it appears to allow the addition of the widget, but once I get to the "edit widget" page (after the message says "widget added") and I try to set the access for the widget, I am redirected to http://urlofelggsite//profile/  after cliskcin "save widget".  Note the dual slash "//" where the userid should be.    The widget is never actually saved.

2.  Whilst logged  in as any other user (other than "news") and I attempt to click the "Add widget" from the main or extended profile pages I see the "widget added" message but I receive the following error on the edit widget page:

 "You do not have permission to edit this widget."

the url of the edit page looks like: http://urlofelggsite/mod/widget/edit.php?wid=

Just as with the news user, the widgets are never actually saved.

Thanks and regards,

Clint 

Posted by cmcompto @ Developer discussion | 0 comment(s)

April 15, 2007

I'm working on a plugin that lets community owners send out "newsletters" to community members (via email). I've got it all working, but one other planned use is to let an admin (News account) send a newsletter to ALL members of the installation (only a couple hundred right now, but could be much larger.

The whole thing runs in a for each loop, outputting the results of sending each email. It does work, but when the # of users gets higher, the process will take quite a while.

Can anyone make suggestions about how to handle feedback to the user during the long process that will still work with elgg's templates?

Here is the chunk of code so you get the idea of what is happening...

 

                if ($message_group=="*") {
                    $thesql='SELECT * FROM elggusers u
                            WHERE u.user_type = "person" AND u.active="yes" ORDER by u.ident';
                    $recipients=get_records_sql($thesql);
                   
                    $body = "<table width=100%><tr><th>Name</th><th>Status</th></tr>";
                    foreach($recipients as $recipient) {
                   
                        $flag=user_flag_get("emailnotifications", $recipient->ident);
                        $body.= "<tr><td>" . $recipient->name . "</td>";
                        $result=0;
                        if ($flag==1 || $flag==null)
                        {
                        $result=email_to_user($recipient, '', $message_subject, format_text_email($message_text, FORMAT_HTML), '<html><body>' . $message_text . '</body></html>', "","", true,$from->email, $from->name);
                        }
                       
                        switch ($result){
                            case 0:
                                $result_message="<font color=\"#FF0000\">Skipped - User preference set to no email notification.</font>";
                                break;   
                            case 1:
                                $result_message="OK";
                                break;   
                            default:
                                $result_message="<font color=\"#FF0000\">". $result . "</font>";
                                break;
                        }

                        $body.="<td>" . $result_message . "</td></tr>";
                    }
                    $body.= "</table>";
                }

Keywords: email, long process

Posted by Tim Hawes @ Developer discussion | 4 comment(s)

Hi All,

I am seeing an error upon completing a new user reg, after clicking the account verification "to join" link from the email.  I am taken to the user reg screen where the password is created then after the submit:

Warning: Invalid argument supplied for foreach() in /home/testacct/public_html/mod/profile_photo/lib.php on line 15

Warning: Cannot modify header information - headers already sent by (output started at /home/testacct/public_html/mod/profile_photo/lib.php:15) in /home/testacct/public_html/units/invite/invite_actions.php on line 153

Now this is similar to another error I have seen during similar operations (see: friendicon and errors with "comment wall" [updated x2]) but that appeared to be cuased by the friendicon mod an the problem went away after that mod was removed.  I am begining to think there may be something underlying that is related in both cases. I guess I will need to wait and see if Dave is seeing anything like this with one of his test loads or if anyone else sees this (or anything like this) with 1068.

Nightly regards,

Clint 

Posted by cmcompto @ Developer discussion | 1 comment(s)

If I set my site to "Public registrations" off will allowing openid override it? In other words I want to limit my site to "Public invitations" only and I want to know if openid will be a secuity leak.

Keywords: axcess, openid

Posted by eliyahu @ Developer discussion | 1 comment(s)

1. I installed the Comment Wall and I now see it listed in "Add dashboard items" but when I try to add it the screen just refreshes and it does not get added to my dashboard items.

2. What is the comment wall suppose to do?

3. I also recieve this error before I logon:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

select * from elggprofile_commentwall where ident=

Keywords: Comment Wall, dashboard

Posted by eliyahu @ Developer discussion | 7 comment(s)

Hi,

Can anyone point me to where I can read about how Profile2.0/widgets will be implemented in future Elgg releases? Here's what I'm trying to find out:

  1. Eduspaces has a fairly mature widget system running with a drag-and-drop javascript interface quite different from even the latest subversion build, can we expect this in the next Elgg release?
  2. If so, when (losely, tentatively) should we expect this?
  3. Will widgets replace Dashboard outright, will we have the option to run either, and will there be a way to somehow transfer built dashboards into the new Profile2.0/widgets?

I have two concerns. First, I'm just starting an Elgg site, and I'm wondering that if the switch is going to flip from Dashboard to Widgets in a matter of weeks then I should just wait for that, or focus on aspects of the site other than that, so I don't waste time on something about to become obsolete. Asking users to rebuild their profile pages is rather big. Plus, I don't really get the Dashboard system, and I think users will be much happier with the widgets, so if I can bypass Dashboard that would be lovely.

Second, we now have at least one plugin in the directory that requires the widget system, which is not available in the current stable Elgg build. I propose that any widget-dependent plugins be labeled explicitly as "requires the latest dev build of Elgg from Subversion" to avoid any confusion as to whether it works with the latest stable release (until such stable release includes widgets). Also, I wonder why widget plugins aren't labeled "experimental" if the widget system itself isn't in a stable build?

I hope this doesn't come off as a rant, I am in love with Elgg at this point. It's awesome, and so is Curverider, and so are you all.

Keywords: elgg svn, widget api, widgets

Posted by Michael O'Neil @ Developer discussion | 3 comment(s)

April 16, 2007

I installed the fowarder plug-in and added the extra code to the .htaxcess . The friendly url change works but clicking on my icon does not bring me to the new url. I also receive this error:

 Unknown column 'mynewurl' in 'field list'

SELECT mypage FROM elgguser_flags WHERE flag = ? ORDER BY value

Keywords: fowarder

Posted by eliyahu @ Developer discussion | 0 comment(s)

Upon upgrade I am receiving the following error

Fatal error: Call to undefined function __gettext()  /lib/userlib.php on line 24

 

Any Solutions? 

Thanks 

Posted by devin calloway @ Developer discussion | 6 comment(s)

April 17, 2007

Newly installed Elgg (with MediaWiki integration).

Two issues, both concerned, I think, with tags:

  •  If I use {{populartags}} anywhere in pageshell or frontpage_loggedin I get the following errors:

Warning: Invalid argument supplied for foreach() in /data01/kankan/public_html/lib/templates.php on line 1442

Warning: Invalid argument supplied for foreach() in /data01/kankan/public_html/lib/templates.php on line 1449

  • Also, when I click the 'Tag Cloud' link underneath the Search box in the header, I get a page which does NOT show any tags.

Although there are only 3 or 4 users, there are keywords defined in various blog entries and in profiles.

  • The front page tells me that no user has filled in their profiles yet. However, this is not true.

I wonder if all these errors are connected. Can anyone offer any advice?

By the way: I have checked the databas: there are plenty of tags! Not only that, but I've chnged search/tags.php so a tag only has to appear once! Help!!

thanks very much

mark

Keywords: new installation, populartags, tags

Posted by mark sanders @ Developer discussion | 1 comment(s)

April 18, 2007

I love the new profiles so I am planning to upgrade my heavily customized install of version 0.7. I would like to know when you plan to release version 0.8. 

Posted by Brice Le Blevennec @ Developer discussion | 3 comment(s)

April 19, 2007

Hello World

Keywords: hello, world

Posted by andynet @ Developer discussion | 0 comment(s)

April 20, 2007

Is there a way to get tag boolean searches to work in the current version of Elgg? Even a simple "tag1 AND tag2" search would be very useful...

Keywords: boolean, search, searches, tag, tags

Posted by Ruben Puentedura @ Developer discussion | 1 comment(s)

Hey there, it looks like v0.8 will not address usernames with odd characters (like a "."). So, is there an easy way to work around this constraint or is this a system wide restriction. We would like to use this at our University (connected by LDAP to our system) but all of our student accounts are in the format firstname.lastname so none of them can use this as it is presently set up.

If it is just a matter of working around the login screen then I will customize that but I don't want to go to that length to find out I've created way more problems afterward.

Any thoughts?

Steve 

Keywords: Login, Username

Posted by Steve @ Developer discussion | 3 comment(s)

April 23, 2007

User Icons are not showing (profile and other users).  Also, Friend Icon plugin is returning the following error (Function friendicon_pagesetup doesn't exist!).

 Any Ideas?

Posted by devin calloway @ Developer discussion | 1 comment(s)

April 24, 2007

Hi

What is the function "run" doing?
And in which file can I find its definition ?


Mr. X

Keywords: api, function, run

Posted by Mr.X @ Developer discussion | 1 comment(s)

Is there an easy way to add a widget to a community profile? I'd like to put a portion of the blog or forum onto the community page when people click onto it.

 Thanks.

Posted by Mike Holzman @ Developer discussion | 0 comment(s)

Is anyone considering integrating Elgg, the multiuser social networking and blogging environment with Pligg http://www.pligg.com ? The idea would be to front elgg with a pligg rating interface, such that the best entries in elgg would be rated by the site users or visitors.

http://forums.pligg.com/showthread.php?t=5135

 

 

Keywords: Elgg Pligg integration

Posted by sowers @ Developer discussion | 0 comment(s)

April 25, 2007

Hello everyone,

I just installed elgg, and playing around with it. But when i try to save the config trough the admin panel i get a balnk page. When i go back to the previous page and refresh it it hasnt saved my config file :(

Elgg is installed in the root of my webserver and config is chmodded to 777. Anny idea how to solve this?

 

Greets Emile 

Posted by Thuggie @ Developer discussion | 3 comment(s)

Here again,

When a user registers a invite link is send to the email, but when they click it it says that the invite link is not valid and that it may be outdated.

if i add a member trough the admin panel it doing the same thing, it sends the invite link but its invalid.

Is there a solution for this? maybe by disabling the email confirmation?? 

Posted by Thuggie @ Developer discussion | 5 comment(s)

I tried to follow the upgrade directions to update my .7 elgg version to the .8 version and I noticed I am having trouble getting folio working again. I basically get the following error:

     The requested URL /elgg_2/news/page/ was not found on this server.

 

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Has anyone else seen this problem? I see it for communities and other individuals also. 

 

Posted by Mike Holzman @ Developer discussion | 2 comment(s)

April 26, 2007

I would like to know if the coders plan to improve the privacy options/right management in elgg.

Walled garden is too close and an open network is.... too open.

For Example some user dont want others to see their profile, or communities want privacy and not shown in profile, same for RSS-Feeds.

Other example is the readable list of users/communities to everyone. Some projects uses tags in the code to solve this problem. The phpBB-portal at cback.de uses logged_in and logged_out, but this is only one aspect of my problem.

Planing a free social network at http://nocoso.nord-west.eu/ we think privacy is the key for a social network, but also the ability to read from or be read by other networks like the peopleAggregator method.

Sorry for my rare explanations, my english isnt as well as my german, but i think you got an expression of want i ment. 

Keywords: closed network, open network, people aggregator, privacy, right management, walled garden

Posted by Nico @ Developer discussion | 5 comment(s)

I'm trying to adapt an existing chat app into an elgg plugin but need a bit of advice regarding single sign ons. First, is there a global var or any function that can return a hashed password for the SSO? (probably not, for security reasons).  Aside from say, implementing an openId solution, can anyone think of an easier way to authenticate the user to the chat app -- ie. pass the password -- I can get the username from $_Session[username]?

thanks 

Keywords: OpenID, Single Sign On, SSO

Posted by Randy Ahn @ Developer discussion | 4 comment(s)

April 27, 2007

A user of our elgg-site complained that anyone can see the email-addresses of the elgg-users.

If you try to register with a already used address, you get "User foo uses this email-address. Invitation not sent".

Solution:

change line 51 in units/invite/invite_actions.php 

   $messages[] = sprintf(__gettext("User %s uses this email-address. Invitation not sent."),$account->username);

 

Keywords: user registration security

Posted by Bjoern @ Developer discussion | 2 comment(s)

April 28, 2007

I just merged the profile with the extended profile and want to show and discuss this with you.

Here the changes i made: open profile/extended.php and manipulate the code like this:

$w = widget_page_display($page_owner,'profile',0,2);    

$body  = templates_draw( array(
                               'context' => 'contentholder',
                               'title' => $title,
                               'body' => $body
.$w
                               ));

The bold code is added by me and now i have to discover how to show in a nice way, because the whole page is too long in my opinion and not clean of structure, perhaps change to 3 columns or so, but i dislike the seperated profile sites.

If anyone has experiences about merging the profiles, please help :)

EDIT: i would be nice if a real coder could merge the classes ElggProfile and the extended ElggProfile2 

Keywords: extended profile, merge, merge profile and extended profile, merging, profile

Posted by Nico @ Developer discussion | 2 comment(s)

Its only a displaying thing respectively hidding of the searchbox etc. and a insider of elgg could launch the searchbox, but i dont know how to change the permission, so i did this:

Change the code of mod/toolbar/lib.php from

         $searchbox = <<< END
        
        <div id="search-header"><!-- open search-header div -->
        <form id="searchform" action="{$CFG->wwwroot}search/index.php" method="get">
           <p><input type="text" size="20" name="tag" value="{$searchdefault}" Xonclick="if (this.value=='{$searchdefault}') { this.value='' }" />
           <select name="user_type">
                <option value="">-- {$all} --</option>
                <option value="person">{$people}</option>
                <option value="community">{$communities}</option>
           </select>
           <input type="submit" value="Go" /><span><br />[<a href="{$CFG->wwwroot}mod/browser/"><b>{$browse}</b></a>] [<a href="{$CFG->wwwroot}search/tags.php"><b>{$tagcloud}</b></a>]</span></p>
        </form>
        </div><!-- close search-header div -->
        
END;

        return $searchbox;
        
    }

?>

to

if (isloggedin()) {
        $searchbox = <<< END
       
        <div id="search-header"><!-- open search-header div -->
        <form id="searchform" action="{$CFG->wwwroot}search/index.php" method="get">
           <p><input type="text" size="20" name="tag" value="{$searchdefault}" Xonclick="if (this.value=='{$searchdefault}') { this.value='' }" />
           <select name="user_type">
                <option value="">-- {$all} --</option>
                <option value="person">{$people}</option>
                <option value="community">{$communities}</option>
           </select>
           <input type="submit" value="Go" /><span><br />[<a href="{$CFG->wwwroot}mod/browser/"><b>{$browse}</b></a>] [<a href="{$CFG->wwwroot}search/tags.php"><b>{$tagcloud}</b></a>]</span></p>
        </form>
        </div><!-- close search-header div -->
       
END;
        return $searchbox;
    } else
        {
            <<< END
                <div id="search-header"><!-- open search-header div -->
                </div><!-- close search-header div -->
END;
       
        };
    };
?>

and visisors cant see it. If the code does not work, it might be caused by the tabs respectivly by wrong spaces (i dont know how to post code).

Any suggestions of solving it by permissions to searchbox/browse/tag cloud?

EDIT: i just manipulated the search/index.php:

<?php
require_once(dirname(dirname(__FILE__)).'/includes.php');
if (logged_on){

...

}else{exit('Please login for search.');};

?>

and it works fine 

Keywords: disabling search, disabling searchbox, hide from visitor, isloggedin, search

Posted by Nico @ Developer discussion | 0 comment(s)

April 29, 2007

First i added an option with the value external to mod/toolbar/lib.php and then i changed the code of search/index.php and added an if clause like this:

if ($_GET['user_type']!='external') {
...

}else{header('location: ht-tp://www.ask.com/web?q=site%3Aelgg.org+'.$_GET['tag'].'&qsrc=1&o=333&l=dir');};

(it should be http, but then the parser made a link and cutted the code) 

That code searches the elgg.org site with ask.com(some would prefer google, but i dislike google for privacy issues).

Its not a good solution, because the user leaves the site, but now the search is quite better than before, its an access and security issue as well, but i wanted to do this and perhaps implement it.

Just reading ask.com and integrating the search results in the elgg-layout would be nice too.

Keywords: ask.com, google, search engine, searchbox

Posted by Nico @ Developer discussion | 2 comment(s)

Hello,

i am kind of new to elgg and installed it on my local machine for testruns. Everything is running fine, but i get these two error messages: 

Warning: setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead. in C:\Documents and Settings\Tobi\My Documents\cms\www\elgg\lib\php-getttext\gettext.inc on line 131

Warning: setlocale(): Invalid locale category name LC_MESSAGES, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME. in C:\Documents and Settings\Tobi\My Documents\cms\www\elgg\lib\php-getttext\gettext.inc on line 131

if anyone could help me that would be great :)

Sturmkraehe 

Keywords: LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, must be one of LC_ALL, or LC_TIME. in C:Documents and SettingsTobiMy Documentscmswwwelgglibphp-getttextgettext.inc on line 131, Problem, setlocale(), Warning: setlocale():, Warning: setlocale(): Invalid locale category name LC_MESSAGES, Warning: setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead. in C:Documents and

Posted by Tobi @ Developer discussion | 2 comment(s)

April 30, 2007

 Good morning --

 I am trying to add the ability to vote on / rate posts in my Elgg blog
 both for users and communities. I was wondering if there is currently
 a working solution to this problem. If now, is there anything in the
 works?

There are 3rd party voting scripts, but I am not certain where to edit
 the code to insert these voting boxes into the posting loop.

 Any help that you could provide would be greatly appreciated.
 Cheers,

Keywords: rating, voting

Posted by sbsgator @ Developer discussion | 3 comment(s)

I'd love for my Elgg install to ping Explode, but Dreamhost (my web host) does not allow

file_get_contents

To access an external url as it does on line 31 of /mod/explodeping/lib.php

Instead, Dreamhost recommends using CURL, as explained at:

 http://wiki.dreamhost.com/index.php/CURL

I tried making this work, but it's just not happening for me. Does anyone have any suggestions? Thank

Keywords: dreamhost, explode, explodeping

Posted by Michael O'Neil @ Developer discussion | 4 comment(s)

Site supported by Curverider Ltd - powered by the awesome Elgg