3d75 Tips & Tricks | Elggzone 2079

Don’t Modify Core

Posted on Oct 17, 2012 in News, Tips & Tricks | 0 comments

After you install Elgg, enabled various third party plugins and your page is up and running, there may be a few things you want to change. It may be major changes, such as adding new or change existing functionality or minor adjustments such as changing colors, font sizes, or text strings. Elgg is flexible and has rich customization options, but even if you are tempted to open existing files and start editing, think of your new mantra, Do not Modify Core Files. Instead, create a custom plugin and alter behavior through the rich Elgg plugin API. To help you get started, we’ve created a...

Read More

Elgg Sticky Footer

Posted on Mar 6, 2012 in Free Themes and Plugins, News, Plugins, Tips & Tricks, Tutorials 1f4c | 0 comments

When you have a page which is short on content you’ll see that the footer is floating halfway up the page. If you want it to stay at the bottom of the browser window, follow the directions below. You can find many sticky footer methods in Google, this solution is based on the css by Steve Hatcher. Copy Files We need to get hold of two Elgg files and if you haven’t already made a plugin for your Elgg modifications, you can grab “myplugin” which is used in previous tutorials. Here we create a new Elgg plugin called Sticky. In Elgg root go to views/default/page/ and copy...

Read More

Elgg, how to

Posted on Dec 26, 2011 in News, Tips & Tricks | 0 comments

Elgg, how to

If you’ve followed the previous tutorials on how to customize Elgg, using your own plugin, “myplugin”, you can easily add following tips to myplugin/start.php. To remove the more drop down menu, add this line, elgg_unregister_plugin_hook_handler('prepare', 'menu:site', 'elgg_site_menu_setup'); To remove the RSS icon, add the following line of code, elgg_unregister_plugin_hook_handler('output:before', 'layout', 'elgg_views_add_rss_link'); To add latest comments and tag cloud to activity page and the wire page, if...

Read More

Elgg unextend view

Posted on Dec 24, 2011 in News, Tips & Tricks, Tutorials | 0 comments

Elgg unextend view

Just like you can extend Elgg views you can unextend views. The function elgg_unextend_view takes two parameters. The view that was extended and the view that was extending that view. elgg_unextend_view($view, $view_extension) When you look at a fresh Elgg installation, you’ll notice the search form on the front page. If your content is meant for logged in users it does not make sence to display a search form when not logged in. So let’s remove the form from the front page. Find your plugin “myplugin” and add this snippet to your init function in start.php, if...

Read More

Elgg extend view

Posted on Dec 21, 2011 in News, Tips & Tricks, Tutorials | 1 comment

Elgg extend view

In the previous tutorial, we used myplugin to override views. Let us now look at how to extend a view through myplugin. In some situations, you do not want to override the entire view, you just want to add more content to it. In Elgg this is called extending a view. Let’s say you want to add some sort of content to the sidebar, an informational text for example. This can be done by calling elgg_extend_view() in start.php. Open engine/lib/views.php and find the function elgg_extend_view, elgg_extend_view($view, $view_extension, $priority = 501, $viewtype = '') As you’ll...

Read More

Replace Elgg favicon icon

Posted on Dec 20, 2011 in News, Tips & Tricks, Tutorials | 4 comments

Replace Elgg favicon icon

Once you have installed Elgg, you’ll notice that it comes with an Elgg favicon. If you want to use your own favicon, find your plugin ”myplugin” that we already created and follow the next steps. If you look in the folder elgg/_graphics, you’ll see a file named favicon.ico, that’s the one we want to replace. The easy way would be to just dump your own favicon.ico into the folder, but as you know now if you’ve read the previous tutorial, we do not change elgg core. So instead add your favicon.ico into the folder, myplugin/graphics. Since the favicon we want to use 2496 ...

Read More

Replace Elgg topbar logo

Posted on Dec 19, 2011 in News, Tips & Tricks, Tutorials | 0 comments

Replace Elgg topbar logo

This is the first tutorial of a series on how to modify elgg through your own plugin. We will deal with simple elgg changes, so if you already have experience with elgg modification, you probably don’t need to read this. Okay, if you want to remove the Elgg logo from the top bar or replace it with your own logo, this is how to do it, and actually it’s really simple to do, because the logo is registered as a menu item. One of the major changes in Elgg 1.8 is the new menu system. If you want to have a closer look at the functions and parameters that are available when handling...

Read More

Copy language directory

Posted on Jun 27, 2010 in Code, Tips & Tricks | 0 comments

Copy language directory

I test Elgg themes, widgets and language files on localhost, and occasionally need to do a clean Elgg installation. Once done, all language files, more than 36 must be moved to the proper folders. Not a big deal but this little function can do the job and copy an entire directory with language files to the new elgg installation. Just insert the paths to source and destination directories and run the script, then your language files will be copied to the appropriate folders. $src = 'path/'; $dst = 'path/'; function recurse_copy($src,$dst) { $dir =...

Read More
0