Elgg is a cms to create a social networking website. Here are the lists of websites that created by using elgg : http://docs.elgg.org/wiki/Sites_powered_by_Elgg. This is 1st time I use Elgg to develop my social networking website at http://www.plekz.com. On this post, I am going to record down all the processes of developing the website by using Elgg, so that I can always refer to this post when I want to develop another website by using Elgg in future. Hopefully this post may help some other people who are using Elgg.
On 1-January-2010,
1 - I have installed Elgg (version 1.7.6) onto my plekz.com domain in my hosting.
2 - Created a database for plekz.com through my hosting cpanel.
3 - Linked the database to plekz.com through Elgg Admin page.
4 - Created an email account (admin@plekz.com) through my hosting cpanel.
5 - Linked the email account to plekz.com through Elgg Admin page under section of "Site Administration".
6 - Previously default landing page after the user logged in is "Dashboard" page, I changed it to "Profile" page by doing :
In actions/login.php, change
forward("pg/dashboard/"); to forward("pg/profile/$username");
7 - Regarding set Default Profile Widgets, only those new users who registered the account after the Default Widgets setting is set will see it.
On 3-January-2010,
1 - I have installed WAMPserver onto my windows Vista. I have problem about localhost shows blank page, I fixed it by using the solution here : http://ye5.blogspot.com/2011/01/wamp-server-localhost-shows-blank-page.html. (It is good practice to do all those customization offline through WAMPserver localhost before I really go edit the real website. It is to make sure everything goes smooth, doesn't have any errors and bugs in my offline files, then only upload the files to my actual website).
2 - The Home page shows 10 of the new users which has pictures only. If you want to shows the users which doesn't has picture yet, you can go to mode/custom_index/index.php then delete the word icontime from 'icontime' to make it become '' . If you want it shows more users, you can change the digit on 'limit' => 10.
3 - According to the picture above, The bottom of Home page has a "Spotlight" section. Go to views/default/pageshells to move the code of spotlight section to the top of the page.
4 - If you want to delete anything on Home page, go to views/default/pageshells, you just need to add this symbol // on the left side of the word "echo" of the code. For example, to hide the TOP BAR, <?php //echo elgg_view('page_elements/elgg_topbar', $vars); ?>. To hide the Header text and other content, <?php //echo elgg_view('page_elements/header_contents', $vars); ?>. To hide the System Message and Errors, <?php //echo elgg_view('messages/list', array('object' => $vars['sysmessages'])); ?>. To hide the Main Body, <?php //echo $vars['body']; ?>. To hide the Spotlight and Footer are also the same just need to add the symbol // onto the code.
5 - If you want to make "Spotlight" section appear on the Home page when the user is not logged in, delete the code <?php if(isloggedin()) { ?> and <?php } ?>.
6 - If you want to edit Spotlight content, you can go to views/default/spotlight/default.php.
7 - If you want to show Spotlight section on homepage only and delete it from all other pages, you can edit the codes on views/defaut/pageshells/pageshell.php. You can use php code if else statement to show spotlight section if the url of current page is homepage or index page. Here is the code :
$homepage1 = "/";
$currentpage1 = $_SERVER['REQUEST_URI'];
if($homepage1==$currentpage1) {
echo elgg_view('page_elements/spotlight', $vars);
}
Note that it doesn't work on WAMPserver / Xampp localhost because the homepage url is not the same as your online web hosting / server. You can echo $currentpage1 to check the url of current page.
On 5-January-2010,
1 - If you want to change the Top-bar, please edit the code at views/default/page_elements/elgg_topbar.php.
2 - If you want to move the Topbar to center, go to views/default/pageshells/pageshell.php, move the code : <?php echo elgg_view('page_elements/elgg_topbar', $vars); ?> to on top of this code : <?php echo elgg_view('page_elements/header_contents', $vars); ?>. So the Topbar is below the Header now. So the Topbar width size is the same as header width size now. Then go to views/default/page_elements/header_contents.php add width:1000px to div of page_wrapper becomes <div id="page_wrapper" style="width:1000px;" >.
3 - If you want to add logo or Google Adsense onto the header, you can edit the code in views/default/page_elements/header_contents.php
4 - If you want to edit footer, you can edit the code at views/default/page_elements/footer.php
On 17-January-2010,
Understanding Elgg Base Website Structure :
1 - Pageshells keeps all the elements that shows on every pages such as footer and header. The directory is views/default/pageshells/
2 - All the plugin files are saved in mod folder.
3 - Custom_index is a plugin which control all the contents on Home page. The directory is mode/custom_index/
More info at : http://www.packtpub.com/article/customizing-elgg-themes.
More tutorial at : http://ye5.blogspot.com/2011/01/elgg-tutorials.html.
Last Updated on 08 January, 2011
Tidak ada komentar:
Posting Komentar