WebsiteBaker Support (2.8.x) > Templates, Menus & Design
[Alpha]New Backend-Theme: wb2_theme
Waldschwein:
Hello!
I have created a new backend-theme based on argos_theme and matching "the new look" of WebsiteBaker.
Q: What do I need to use it?
- WebsiteBaker 2.8.1 (not tested with version lower than 2.8.1)
- A replacement of _yourwbinstallation _/admin/start/index.php (File admin_start.php is added).
- InternetExplorer: 6,7,8; Firefox: 3.x; Chrome, Safari, Opera 10.x (just test it with your browser, enabled Javascript recommend....)
Q: Replacement... I want to add the code myself.
- Open _yourwbinstallation _/admin/start/index.php.
- Search for
--- Code: ---// Insert section names and descriptions
$template->set_var(array(
--- End code ---
around line 112.
- Insert BEFORE the following code WITHOUT the <?php and ?>
--- Code: ---<?php
// Start WB2 Feed
$rss_enable = true;
$rss_url_m = '';
$rss_error = '';
if(!file_exists(THEME_PATH .'/languages/'.LANGUAGE .'.php')) {
require_once(THEME_PATH .'/languages/EN.php');
} else {
require_once(THEME_PATH .'/languages/'.LANGUAGE .'.php');
}
if ($rss_enable == true && $_SESSION['GROUPS_ID'] == 1 && file_exists(THEME_PATH.'/rss/rss_fetch.inc')) {
$template->set_var('DISPLAY_RSS');
include_once(THEME_PATH.'/rss/rss_fetch.inc');
$rss_url_m .= 'http://www.websitebaker2.org/modules/news/rss.php?page_id=52';
$rss = fetch_rss($rss_url_m);
$show_rss_l = '';
if ($rss) {
// Split the array to show first 3 news
$items = array_slice($rss->items, 0, 3);
// Cycle through each item and echo
foreach ($items as $item )
{
$show_rss_l .= '<li><a href="'.$item['link'].'">'.$item['title'].'</a> - '.$item['description'].'</li>';
}
}
else {
$rss_error = '<h2>Error:</h2><p>'.magpie_error().'</p>';
}
$show_rss = $show_rss_l;
$show_rss .= $rss_error;
// RSS Custom template->set_var to avoid undefine variables when RSS is not available
$template->set_var(array(
'RSS' => $show_rss,
'RSS_TITLE' => $TEXT['RSS_TITLE']
)
);
} else {
$template->set_var('DISPLAY_RSS', 'display:none');
}
// End WB2 Feed
?>
--- End code ---
Q: What is the benefit of this backend-theme?
- You can change with one click (right navigation bar) from fixed to fluoid and back. It's saved for 28 days (via cookie).
- The settings are in tabs, you can view all advanced-settings just with one click on the "green plus" in the tab bar. No reload & lost data necessary.
- On the startpage of WB backend there is now the latest news of websitebaker2.org, e.g. Security Announcements or new version.
- (Quite) everything is loaded only when it's needed.
Q: About that news... Where can I configure it?
It's not really possible, I'm afraid. WB has right now no possibility for backend-addons, so everything would be changing in Core. There are many possibilities to display News - iframe, jQuery, JS, Flash, PHP... I decided for PHP because it's quicker, has a cache and is quite secure.
- You can disable the latest-news just with deleting the /rss folder inside the backend-theme (_yourwbinstallation _/templates/wb2_theme/rss). Also it's possible to do that with AddonFileEditor.
- Only people in administrator group will see the news.
- In the replaced _yourwbinstallation _/admin/start/index.php the URL and other options are stored.
Known issues
- In media the hiding of upload-zip is "false", it should be the other way round. // Fixed in 0.1.1.
- No text for "description" in Pages-> Settings. // Needs a change of Core Language-files, argos introduced here a new language-file.
- In IE 6 & IE7 the navigation header is misplaced (a few pixels higher). // Will be fixed by deleting all IE6 & IE7 browsers... Just kidding.
Please notice: It is in Alpha status - so features can change, being removed ar added. There is NO guarantee it will work as expected or work at all!
Please test it and let us know what you think of it, what you would recommend....
Yours Michael
[gelöscht durch Administrator]
Waldschwein:
Some screenshots.
[gelöscht durch Administrator]
dbs:
after first test: looks nice, works fine. :-)
maybe 1 thing: like in argos_theme, the hover-effekt on pages(seitenübersicht) is to "light".
dbs
Waldschwein:
Hello!
Thanks very much for the feedback.
I changed several things then in a new version (0.1.1) and replaced the old one.
- Darker hover on pages. Also created for that new icons (well, removed the background from plus, minus, view).
- Combined a few small jQuery files into one (plugins, it's loaded anyway).
- "Upload zip" in media is now working as expected - realized with jQuery and get rid of the "normal" Javascript here. Also use .css for usability (no white spaces due to cellpadding...).
I hope you like it. :wink:
Yours Michael
crnogorac081:
Looks really nice, it was about the time for this a little bit old fashion theme to be restiled :)
I am curios, is there a way to turn on/off WB news block for certain groups ? For example, I want that only admin group can see the news, and not any user/client(moderator) who can access the backend to change preferences or edit some page.. (especially not messages like - Security vunerability: feel free to download anybody's database :) )
cheers
Navigation
[0] Message Index
[#] Next page
Go to full version