Thanks.
The question is how do I make sure the buttons.php css is loaded in the browser so when I use elgg-button classes, the buttons are styled appropriately.
Aha.
I figured this out. The theme was overriding the view, then returning true at the top so the button css never loaded. Working it out with the theme.
@ Dave Bauer , Do not change plugins css or core files... when upgrading, you will run into nightmares! What You need to do is write your own plugin and in your own plugin start.php file, extend the code below
elgg_extend_view('css/elgg', 'anyname/elements/buttons'); // this is css to modify buttons buttons
your buttons.php css file ubove will have something like
<?php
/**
* CSS buttons
* @subpackage UI
*/
?>
/* <style>
/* **************************
BUTTONS
************************** */
.my-button + .my-button {
margin-left: 4px;
}
/* Base */
.my-button {
color: #333;
font-weight: bold;
text-decoration: none;
width: auto;
margin: 0;
font-size: 11px;
line-height: 16px;
padding: 2px 6px;
cursor: pointer;
outline: none;
text-align: center;
white-space: nowrap;
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.10), inset 0 1px 0 #fff;
-moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.10), inset 0 1px 0 #fff;
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.10), inset 0 1px 0 #fff;
border: 1px solid #999;
border-bottom-color: #888;
background: #eee;
background: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f6f6), to(#e4e4e3));
background: -moz-linear-gradient(#f5f6f6, #e4e4e3);
background: -o-linear-gradient(#f5f6f6, #e4e4e3);
background: linear-gradient(#f5f6f6, #e4e4e3);
}
.my-button-delete {
background: #444;
border: 1px solid #333;
color: #eee !important;
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.10), inset 0 1px 0 #999;
-moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.10), inset 0 1px 0 #999;
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.10), inset 0 1px 0 #999;
}
Then on the same start.php file change the "link_class" to your own class that you want to modify,
elgg_register_menu_item('title', array(
'name' => 'remove_me_from_here', // the name of your menu item
'text' => elgg_view_icon('users') . elgg_echo('delete:menow'),
'href' => "/action/delete/remove?me=$owner->guid",
'is_action' => TRUE,
'link_class' => 'my-button my-button-delete', // my button class controlled by your css
'contexts' => array('profile'), // the page where the css will be loaded
'priority' => 1, // this will give your plugin first priority then followed by other buttons
));
And this will work once your flash your catches....
Hope it helps some one having the same problem...
Thanks Mark. I am joining the community you mentioned and will shoot you and Cash messages once I figure out all that I could use on my site.
hi there
i also like to see an extended (with 1.7 working) fb and twitter plugin ... i'm no coder so i can't help developing ... what i could do is betatesting and donating some money ;-)
Thanks again to Mark on here hes been very helpful all the time. I should check out that plugin you said above it uses statusnet and twitter. I used to run statusnet before I went to Elgg. I like the older version of Statusnet Ver. 0.8.3 because that runs faster then the 9x ones. I plan to install statusnet for an adult site microblogger. I do not plan to use Elgg at all for any Adult stuff hehe! I would rather have Statusnet's name on anything that is 18 Yrs or older! So far I only have Wordpress and it am really not happy with how long it is taking to be Indexed! http://nightfling.com is the site and for some reason it does not like to be indexed.
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.