I want to add a new page to my site but I only want that page background different then the site. How can I do that? Please help me with code and all if you can. I have the code for the granited color |
Hello
If you create a page with default Dolphin's Page Builder then you cannot simply change the color for this page because all custom pages created via Page Builder use the same styles. So, your background color will be applied to all of them.
Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV |
Are you saying i need a different page builder? If so where can i get one? Or is there another option? |
try this
1) open file viewPage.php
find this code $_page['name_index'] = 81;
add this code bellow $_page['css_name'] = 'viewpage.css';
2) go to dir templates/base/css
add a new file, save it as viewpage.css
add code bellow to it
body { font-family:Verdana,Arial; font-size:11px; color:#333333; background-color: #FFD9D9; margin:0px; padding:0 0 0 0; } /* * * * DesignBox * * * */ .disignBoxFirst { border:1px solid #CCC; margin-bottom:10px; background-image:url(../images/head_cutting.gif); background-repeat:repeat-x; background-color: transparent; position:relative; } .boxFirstHeader { height:21px; padding:7px 0px 0px 10px ; font-size:12px; color:#333; font-weight: bold; text-align:left; text-transform:capitalize; border-bottom: 1px solid #CCC; position:relative; /*need to 236*/ font-family:Verdana,Arial; } .boxContent { overflow: hidden; font-size: 11px; padding: 1px 1px 1px 1px; background-color: #F0F8FF; /*background-color: transparent;*/ }
3) Done, change css code the way you want it
this new code will be applied to all new pages you add.
|
Let me make sure I understand this. After I add this code then I can make add a new page and change the background color.
But what if i want to make an page using the original page css I can chose that too?
Will this give me an option button for each new page I make?
|
One of the best tweaks i have read in a while, great stuff! Thanks!
Maybe I should create a new thread for this question, but do you also know if its possible for the user to have a custom background on all dolphin pages, not just the profile.
If you install the Customize Profile mod the users can set a custom profile background, but as soon as they leave the profile pages the standard background comes back. It would be neat if their chosen background stayed on all pages.
|
Thats crazy that it don't. Who willing to fix this problem! I don't know how or I would. |
I should say i didn't test it myself, but if it works it's a nice little trick to know. If have time I will try it out tomorrow. |
if you want to make a page using the original page css and your custom css, you can do it like his
1) go to root (were your Dolphin files are) add a new file, save it as vPage.php
add code bellow to it
<?php
/*************************************************************************** * Dolphin Smart Community Builder * ----------------- * begin : Mon Mar 23 2006 * copyright : (C) 2006 BoonEx Group * website : http://www.boonex.com/ * This file is part of Dolphin - Smart Community Builder * * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. * http://creativecommons.org/licenses/by/3.0/ * * Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the Creative Commons Attribution 3.0 License for more details. * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, * see license.txt file; if not, write to marketing@boonex.com ***************************************************************************/
require_once( './inc/header.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'admin.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'db.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' ); require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolPageView.php' );
check_logged();
$_page['name_index'] = 81; $_page['css_name'] = 'viewpage.css';
$sPageName = process_pass_data( $_GET['ID'] );
$oIPV = new BxDolPageView($sPageName); if ($oIPV->isLoaded()) { $sPageTitle = htmlspecialchars($oIPV->getPageTitle()); $_page['header'] = $sPageTitle; $_page['header_text'] = $sPageTitle;
$_ni = $_page['name_index']; $_page_cont[$_ni]['page_main_code'] = $oIPV -> getCode();
PageCode(); } else { $oSysTemplate->displayPageNotFound(); }
?>
2) go to dir templates/base/css
add a new file, save it as viewpage.css
add code bellow to it
body { font-family:Verdana,Arial; font-size:11px; color:#333333; background-color: #FFD9D9; margin:0px; padding:0 0 0 0; } /* * * * DesignBox * * * */ .disignBoxFirst { border:1px solid #CCC; margin-bottom:10px; background-image:url(../images/head_cutting.gif); background-repeat:repeat-x; background-color: transparent; position:relative; } .boxFirstHeader { height:21px; padding:7px 0px 0px 10px ; font-size:12px; color:#333; font-weight: bold; text-align:left; text-transform:capitalize; border-bottom: 1px solid #CCC; position:relative; /*need to 236*/ font-family:Verdana,Arial; } .boxContent { overflow: hidden; font-size: 11px; padding: 1px 1px 1px 1px; background-color: #F0F8FF; /*background-color: transparent;*/ }
--------------------- if you only will change the background color inside the block, you need only to add code below to the viewpage.css
.boxContent { overflow: hidden; font-size: 11px; padding: 1px 1px 1px 1px; background-color: #F0F8FF; /*background-color: transparent;*/ } -------------------
3) When you add your new page to nav menu switch between orginal css and custom css you can simply change the URL like below
URL: vPage.php?ID=test_page -> Your custom css
URL: viewPage.php?ID=test_page -> Original page css
|
Thanks soon as I find someone to install I will try this. |
I have this installed but I;m lost on part 3 at the end. |