Hi to all,
I'm trying to create my own theme for elgg. Till now I have created my log in page which has a certain picture as a background. What I want to do is that after the loging in the background of the theme to be different than the login page.I tried to change the code in the views\default\page_elements.php and also the css.php but the changes in this files are applied in all pages in elgg. Can anyone help me how to do this?
Best regards,
Zoki
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
Use Embedded CSS for the specifif page.
I have the css file in views/default/ and the css for blog,bookmarks,categories,file,groups and etc.
I tried all of them but i didnt find the exact css file to change. Can you tell me which css I should look in. It seams that elgg is built in a such a way that the design of the log in page is repeated for all other pages. Thanks for the replay.
Best,
zoki
Imho, you can't change that via css. You might need to modify your index to use different css selectors for different pages. Otherwise, you can try overloading the pageshell and hard-coding the style into the body tag.
There is no "page_elements.php" ;)
Diff login page/css and diff rest of site styling/css is pretty easy to code -
just follow what custom_plugin does inside
"elgg is built in a such a way that... repeated" not true !
it must be the way you've coded the css to be global.
Here's what I did sometime back. I took RJ California's Xuum theme (as the homepage) and combined it with another theme so that the inside would have a different feel. I'm not using it now, but it worked very well.
I'm not really a coder of any type, but the trick I used was to have a custom_index file with the css for the inside. Start with 1 and 2 below and get something such as 3. Hope this helps.
1. xuum
css/ folder
js/ folder
views/ folder
index.php
manifest
start.php
2. Another theme that looks something like this for the inside of your site might do.
graphics/ folder
views/default/ folder
manifest
start.php
3.
css/ folder (xuum)
graphics/ folder
js/ folder (xuum)
views/default/ folder (with a custom index php file for the inside of the site)
index.php (from xuum)
manifest (xuum, edit as needed)
start.php (xuum, edit as needed)
Hi guys again,
Thank you all for replaying and trying to help! I appologize for replying now because I dindt have any internet till now. As an info I'm using simple BlueWhite Theme by Pete Harris. I tried to download the Xuum theme as pauloortiz sugested, just to check the files which are there, but there was a problem with the file when unzipping. It was corrupted. I tried several times but it didnt worked at the ende. As I understand from what pauloortiz wrote the main folder for the inside change is "views/default/ folder (with a custom index php file for the inside of the site)". In this particular folder(views/default/custom_index/) I have only css.php which if one alter it the changes are visible at the login page(the first page) and at inside after the login. Im still confused how all this should be done. Is the problem at changing the start.php file because i didnt find any index.php file in the folder of the simple BlueWhite Theme. Thank you to all you guys for the understanding once more. I'm novice and I'm just trying to make things work :D
zoki
Might want to take a peek at this. It is a great theme that is admin friendly.
http://community.elgg.org/pg/plugins/project/559243/developer/ihayredinov/seashells-theme-for-elgg-17x
Once you use it you might want to explore other GPL plugins by hypeJunction.
Steve
Zoki,
Take a look at custom_index and the implementation of a custom index page hook in start.php.
Write a similar code and include your index page. In the index page do a check to see if the user is logged in, and display content accordingly, e.g.
if (!isloggedin) {
blah blah
echo elgg_view_layout blah blah
page_draw blah
} else {
forward('pg/dashboard'); // or another page, you can register page handlers in your php
}
Thanx a lot guys! I'll try your suggestions and I'll let you know later for any progress. All best!
Hi to all,
Im was trying and traying this days and i couldnt solve my problem. I trayed again to find some theme that is similar to my neads but i could find. All of them are with the same background before and after you log in. I couldnt find any that for example the login page background is blue and after the login the backgroung is white.
I trayed creating custom_index folder in MyTheme/views/default/ and initialy i created my own css and it was not working and than i took a css file from another theme and there were some changes buit to all the pages not only to the log in page or only to the page after the login.
I realy dont understand weather the file in custom_index should be with php code included or pure css. Because in all the themes that i downloaded this file was css.php there was no php code in it. As ihayredinov sugested I should use the custom_index file and i tried to use the functions that he sugested but it was unsuccessful. I realy can not figure out where i shuld use this two functins "echo elgg_view_layout blah blah" and "page_draw blah" weather in the index_custom or in the start.php.
I aslo tryed to create folder MyTheme/views/default/canvas/layouts and created this file new_index as I saw from one theme and I wrote this code:
<?php
if (!isloggedin()){
//display the login form
echo "<h2>" . elgg_echo("Login") . " ";
echo "</h2>";
echo $vars['area1'];
echo "<div class=\"clearfloat\"></div>";
echo elgg_view_layout(octopus_theme_layout);
page_draw blah
}
?>
<div id="page_containter">
<!-- left column content -->
<div id="index_left">
<!-- welcome message -->
<div id="index_welcome">
<?php
//display the login form
echo "<h2>" . elgg_echo("Login") . " ";
echo "</h2>";
echo $vars['area1'];
echo "<div class=\"clearfloat\"></div>";
?>
<!-- latest members -->
<div class="index_box">
<h2><?php echo elgg_echo("custom:members"); ?></h2>
<div class="contentWrapper">
<?php $users = get_entities('user', '', 0, '', 25, 0, false, 0, null);
if($users){
foreach($users as $user){
echo "<div class=\"member_icon\">" . elgg_view("profile/icon",array('entity' => $user, 'size' => 'tiny')) . "</div>";
}
}
?>
<div class="clearfloat"></div>
</div>
</div>
but still it didnt worked . I wanted here that before log in the background to be blue and after log in to be white. But unsuccessfuly :(
I'm desperately looking forward to solve this problem that torchers me this several days. I didnt expacted that it is going to be so confusing.
Best wishes!
- Previous
- 1
- 2
- Next
You must log in to post replies.