Pages

Monday, December 31, 2012

How to remove svn folders from server

How to simply remove svn files from server



Make sure that you have the access rights to delete files.

Use the following command:
find ./ -name ".svn" | xargs rm -Rf
where first part find  finds all .svn folders in your current directory ./
Do not confuse ./ and / since the simple forward slash deletes all svn files in your filesystem.
 
second part deletes each match
-R  deletes recursively the content
-f  ignore non existent files

Saturday, December 29, 2012

Belkin 54g wireless router disconnecting

How to solve permanently disconnecting Belkin 54g wireless router?


Yeah I know it very well. It can be drastically annoying the connection goes on and off all the time and you can't watch film, upload stuff, or effectively work from home.
Probably you even have noticed that the situation worsen when everyone is at home.
The good news here is that you don't need to rush to shop for new router. At least not before you try the following.

The cheap Belkin router comes with very handy web-interface loaded with functions.
Wait until everyone is asleep or go to your router and plug the wire in one of the 4 LAN slots.
In browser go to http://192.168.2.1 and navigate to "Channel and SSID" you can find it in "Wireless" section
The router comes set up for automatic channel selection which sometimes when a lot of wireless devices is querying causes the router going crazy and it rotates between channels. That is where it disconnects and reconnects all the time. Go ahead and choose one channel. You might try few of them before you find the stable one.

This is not a solution for all the problems but in some cases it might help. Other "tricks" in the sleeve are updating firmware, playing with wireless mode, MAC Address filtering etc.
I might write next few posts about it.

How to remove deleted folder from subversion in Netbeans

Deleting locally deleted folder.



When you came across a problem - You accidentally delete the folder and its content locally and don't bother to do it via Subversion. On the next commit in Netbeans SVN will complain about missing files  thinking there still should be something in it. Fortunatelly there is a way around.

  1. Commit all changes in all other folders in the parent folder where the deleted stuff was.
  2. Exit Netbeans (It won't work when Netbeans is running)
  3. In Terminal as root go into the directory where the deleted folder used to be.
  4. Make the folder with the same name  $:mkdir ./folder_name
  5. Add the folder to subversion $:svn add ./folder_name
  6. Force delete the folder from subversion $:svn --force rm ./folder_name
  7. Open Netbeans again and do the update on parent folder
  8. Now you can commit freely again

Saturday, November 10, 2012

ELGG - How the elgg menu works

What happens when you call elgg_view_menu of elgg core of some of the existing or your own menus?


In this short article I will go through the most important steps the ELGG engine doas when the menu is created for calling view.
As you probably know the individual menu item or the menu in elgg is created by calling function elgg_register_menu_item('menu_name', array(menu parameters)). More info you can find on elgg documentation.
If the named menu doesn't exist it is created. The menu "object" in Elgg is not a real object from OOP point of view. It is an array containing information about the menu as styling, sections and the actual individual menu items. These Menu items are the only objects in the menu array.

elgg menu diagram


On the simple schema above is explained how elgg_menu_is created. 
blue indicates elgg core functions or fields, red indicates user views (or default views)
light arrow indicates calling function bold arrows is returning to original calling view.


view calls elgg_view_menu('menu_to_display', array(additional parameters)):

core function elgg_view_menu() queries from $CONFIG->menus['menu_to_display']
calls ElggMenuBuilder with information how to order menu items in the menu and reorders the items as required. Here as well passes to menu additional parameters if found.
calls elgg_view with 'menu_to_display' view as parameter. If no 'menu_to_display' exists default view is called. Menu with additional parameters is passed as parameter
 
Here you can do whatever you wish with custom 'menu_to_display' view. Default view looks for sections in the menu (at least one - default section is found) and calls view section.
Section view calls item view.
The default menu view calls the section view which calls item view.
Default section and item views are available to be overridden by any plug-in or theme. 


in next topic explained:
ElggMenuBuilder
ElggMenuItem
Css

Tuesday, November 6, 2012

ELGG Social Networking tool  

Social Networking Framework. 

About

Elgg is open source social networking engine. It works out of box with basic functionality as following friends, messages, groups, blog, pages. There is large number of mostly free plugins available. Plugin installation is due to engine design extremely simple and most of the time there is very little developer input required.

 Customization. 

Different story is when it comes to the customization of existing code. Usually some moderate knowledge of PHP, HTML and CSS is required. ELGG can be potentially tweaked to any functionality one could imagine. It can serve very well as portfolio site, blog site or news site. #ELGG could be downloaded free of charge from community site. The same site provide active community forums and feedback to your problems.

Community. 

Comparing the wordpress ir joomla community there is relatively small number of developers due to #ELGG core developer team policy. elgg.org is strictly community website with no refrence to commercial development allowed except the official commercial version http://www.elgg.com. Elgg.com is identical open source software. The extra price is for the hosting, setup and maintenance. Hiring an hight standard elgg developer can be significantly cheaper than hiring equivalent wordpress specialist. Some are available here elgg development 

Responsive design. 

Now days very often mentioned term in web design. ELGG core engine offers only plugin to offer simplified website version when viewed from mobile device. There are few responsive themes available "on community website". A lot of developers try to offer elgg plugins on their own site since advertizing of commercial plugins on community site is not possible. It is worth to google before start building the website. Some elgg plugins can be found on this elgg store.

Design and Database.

Elgg uses atribute value database model which means it is extremely flexible but for larger websites with more traffic some performance tweak is recommended.  The only option for Database is Mysql and if I haven't mentioned ELGG is coded in PHP.

Elgg loosely follows MVC approach where elgg engine acts as model and partly as controller. The plug-in developer most of the time creates views and components to enhance the functionality.

More about elgg could be found here on this web design blog