Jump to content

compositor

Members
  • Posts

    46
  • Joined

  • Last visited

Posts posted by compositor

  1. Hi Michael,

    I just did that and now I get: examplehost/billing/billing/login so I gather that if I have the installation location as / I will then have my clients logging in via /billing/login while everyone would be accessing the "site" via /

    I did it for admin as well:

    Configure::set("Route.admin", "billing");

    That sounds better, I was merely using the recommended settings but would physically moving the installation files to the root require a license re-issue?

    I think you'd said in another post:

    this would be fine but with Pauls' graciousness I'd say he would allow me to restart my trial.

    Cheers

  2. From what I can gather, so-called static pages can only be generated in the same directory as where Blesta is installed, whereas I am wanting to have them separate so I can use Blesta as a CMS as well as a billing system but billing only occur in /billing and not the / directory

  3. 9 minutes ago, Blesta Addons said:

    you will add page to CMS core of blesta .

    pages outside blesta should be created manually or with other cms .

    Would that be true of the method described in the original post made by Rodrigo?

  4. 30 minutes ago, Blesta Addons said:

    you can use Admin Tools plugin to add pages to your cms portal with a simple click .

     

    Hi and thank you for responding.

    Can those pages exist outside of the Blesta Directory and would they include all but the branding in the footer or is there some other branding (required or not) I'm not aware of?

    I look forward to your replying.

  5. 31 minutes ago, Blesta Addons said:

    i don't think, as they are two domains deferent .

    I'm under the impression that to develop locally I'd need a developer license, which may or may not be available with a lifetime license.

    I know Blesta is not a CMS but my intention is to build a site around it and while I'm happy to pay a monthly charge, having the luxury of being able to develop locally would save me alot of money in the medium term at least since I'd not have many (or any) customers to begin with.

    Of course this could all be subjective as a lifetime license is just that and I am open to obtaining one as an investment but having to work remotely all the time is not my idea of flexibility.

    I was hoping to be able to do this with WHMCS but alas, the assumptions made by those in charge of that platform were enough to turn me off even before a trial and then hearing how just about every file is encrypted really killed it before I even felt any level of trust.

    I don't want to make what I see as the mistake of focussing on customers in the short term, when there are many other things to be concerned with such as Media Queries for CSS which as you may know take a great deal of time to develop not to mention intergrating with an existing CMS on the server side, and while it may not be the suggested approach; it is nonethless what I wish to do.

  6. If I want to develop on Localhost and via a Public IP, do I need to have a developer license or would I be approved for at least a local and public domain?

    I am used to using Perch where you can nominate Production, Staging and Development domains and it works very well; it's monitored against gaming and is a very modern approach so I was hoping Blesta would be similar in that regard.

  7. Hi Michael,

    By Services, I gather you mean when they are initially ordered by a person; yes I will not be manually creating client information in the long run of course.

    I will have a look at cron jobs, but the part I am mainly concerned about at present is how to ensure I can get payment.

    I appreciate the information you have given me, as I will need to know about that at some point.

    Thanks again

  8. This is the code I have for the main.pdt file:

    <?php
    /**
     * CMS main controller
     * 
     * @package blesta
     * @subpackage blesta.plugins.cms.controllers
     * @copyright Copyright (c) 2010, Phillips Data, Inc.
     * @license http://www.blesta.com/license/ The Blesta License Agreement
     * @link http://www.blesta.com/ Blesta
     */
    class Main extends CmsController {
    	
    	/**
    	 * Pre-action
    	 */
    	public function preAction() {
    		parent::preAction();
    		
    		$this->uses(array("PluginManager", "Cms.CmsPages"));
    		
    		// Redirect if this plugin is not installed for this company
    		if (!$this->PluginManager->isInstalled("cms", $this->company_id))
    			$this->redirect($this->client_uri);
    		
    		// Use the same structure as that of the client portal for the company given
    		$this->structure->setDefaultView(APPDIR);
    		$this->structure->setView(null, "client" . DS . $this->layout);
    		$this->structure->set("custom_head",
    			"<link href=\"" . Router::makeURI(str_replace("index.php/", "", WEBDIR) . $this->view->view_path) . "views/" . $this->view->view . "/css/styles.css\" rel=\"stylesheet\" type=\"text/css\" />"
    		);
    		
    		$this->base_uri = WEBDIR;
    		$this->view->base_uri = $this->base_uri;
    		$this->structure->base_uri = $this->base_uri;
    		
    		// Set the client info
    		if ($this->Session->read("blesta_client_id")) {
    			$this->client = $this->Clients->get($this->Session->read("blesta_client_id"));
    			$this->view->set("client", $this->client);
    			$this->structure->set("client", $this->client);
    		}
    	}
    	
    	/**
    	 * Portal/CMS index
    	 */
    	public function index() {
    		$uri = "/";
    		if (isset($this->get[0]))
    			$uri = $this->get[0];
    		
    		$this->uses(array("Cms.CmsPages", "PluginManager"));
    		
    		// Load the template parser
    		Loader::load(VENDORDIR . "h2o" . DS . "h2o.php");
    		$parser_options_html = Configure::get("Blesta.parser_options");
    		// Don't escape html
    		$parser_options_html['autoescape'] = false;
    		
    		// Check if the page exists
    		if (($page = $this->CmsPages->get($uri, $this->company_id))) {
    			// Get installed plugins
    			$plugins = $this->PluginManager->getAll($this->company_id);
    			$installed_plugins = array();
    			foreach ($plugins as $plugin)
    				$installed_plugins[$plugin->dir] = $plugin;
    			
    			// Set page content
    			$url = rtrim($this->base_url, "/");
    			
    			$tags = array(
    				'base_url' => $this->Html->safe($url),
    				'blesta_url' => $this->Html->safe($url . WEBDIR),
    				'client_url' => $this->Html->safe($url . $this->client_uri),
    				'admin_url' => $this->Html->safe($url . $this->admin_uri),
    				'plugins' => $installed_plugins
    			);
    			
    			$page->content = H2o::parseString($page->content, $parser_options_html)->render($tags);
    			
    			$this->set("content", $page->content);
    			$this->structure->set("page_title", $page->title);
    			$this->structure->set("title", $page->title);
    		}
    		else {
                            switch($uri) {
                              case 'services':
                                $this->structure->set("page_title", "*** INSERT PAGE TITLE ***");
                                $this->structure->set("title", "*** INSERT TITLE SHOWN ON PORTAL TEMPLATE ***");
                                // Placeholders won't work with this method, so let's use variables
                                $url = rtrim($this->base_url, "/");
                                $blesta_url = $this->Html->safe($url . WEBDIR);
                                $html = <<<EOT
     
    
        <div class="col-md-4 col-sm-6 portal-box">
            <a href="{$blesta_url}services>
                <div class="well">
                    <i class="fa fa-cogs fa-4x"></i>
                    <h4>Foo</h4>
                    <p>Bar.</p>
                </div>
            </a>
        </div>
    
     
     
    EOT;
                                $metatags = <<<EOT
    <meta property="og:title" content="Examplehost"/>
    <meta property="og:description" content="Web Design and Development Services"/>
    <meta property="og:image" content="https://examplehost.net.au/images/"/>
    <meta property="og:url" content="https://examplehost.net.au/billing"/>
     
     
    EOT;
                                $this->structure->set("metatags" , $metatags);$this->set("content", $html);
                                break;
    							default:
    							$this->redirect($this->base_uri);
                            } 
    }
    	}
    }
    ?>

    and this for structure.pdt

    <!DOCTYPE html>
    <html dir="<?php echo (in_array($this->_("AppController.lang.dir", true), array("ltr", "rtl")) ? $this->_("AppController.lang.dir", true) : "ltr");?>">
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            <title><?php echo $this->Html->safe(($this->Html->ifSet($page_title) ? $page_title . " | " : "") . $this->Html->ifSet($system_company->name));?></title>
    		<meta name="viewport" content="width=device-width, initial-scale=1.0">
    		<?php echo $this->Html->ifSet($metatags) ?>
    		<link rel="shortcut icon" href="<?php echo $this->view_dir;?>images/favicon.ico" />
    		
    		<link href="<?php echo $this->view_dir;?>css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    		<link href="<?php echo $this->view_dir;?>css/styles.css" rel="stylesheet" type="text/css" />
    		<link href="<?php echo $this->view_dir;?>css/slider.css" rel="stylesheet" type="text/css" />
    		<?php
    		// Theme CSS
    		if (isset($theme_css)) {
    		?>
    		<link href="<?php $this->Html->_($theme_css);?>" rel="stylesheet" type="text/css" media="screen" />
    		<?php
    		}
            if ($this->_("AppController.lang.dir", true) == "rtl") {
            ?>
            <link href="<?php echo $this->view_dir;?>css/rtl.css" rel="stylesheet" type="text/css" media="screen" />
            <?php
            }
    		?>
    		<link href="<?php echo $this->view_dir;?>font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    		
    		<script type="text/javascript" src="<?php echo $this->view_dir;?>javascript/jquery.min.js"></script>
    		<script type="text/javascript" src="<?php echo $this->view_dir;?>javascript/bootstrap.min.js"></script>
    		<!--[if lt IE 10]><script type="text/javascript" src="<?php echo $this->view_dir;?>javascript/history/json2.js"></script><![endif]-->
    		<script type="text/javascript" src="<?php echo $this->view_dir;?>javascript/history/history.adapter.jquery.js"></script>
    		<script type="text/javascript" src="<?php echo $this->view_dir;?>javascript/history/history.js"></script>
    		<!--[if lt IE 10]><script type="text/javascript" src="<?php echo $this->view_dir;?>javascript/history/history.html4.js"></script><![endif]-->
    		<script type="text/javascript" src="<?php echo $this->view_dir;?>javascript/jquery-client-3.5.0.js"></script>
    		
    		<?php
    		echo $this->Javascript->getFiles("head");
    		echo $this->Html->ifSet($custom_head);
    		?>
    		
    		<!--[if lt IE 9]>
    			<script src="<?php echo $this->view_dir;?>javascript/html5shiv.js" type="text/javascript"></script>
    			<script src="<?php echo $this->view_dir;?>javascript/respond.min.js" type="text/javascript"></script>
    		<![endif]-->
    		<?php echo $this->Html->ifSet($head);?>
        </head>
        <body>
    		<?php echo $this->Html->ifSet($body_start);?>
    		<?php
    		if ($this->Html->ifSet($show_header, true)) {
    		?>
    		<div class="header">
    			<div class="container">
    				<div class="logo">
    					<a href="<?php echo $this->Html->safe($this->base_uri);?>">
    						<?php
    						if (!empty($theme_logo)) {
    						?>
    							<img src="<?php $this->Html->_($theme_logo);?>" alt="Logo" />
    						<?php
    						}
    						elseif (!empty($blesta_logo)) {
    						?>
    							<img src="<?php $this->Html->_($blesta_logo);?>" alt="Blesta" />
    						<?php
    						}
    						else {
    						?>
    							<img src="<?php echo $this->view_dir;?>images/logo.png" alt="Blesta" />
    						<?php
    						}
    						?>
    					</a>
    				</div>
    				<?php
    				if ($this->Html->ifSet($staff_as_client)) {
    				?>
    				<span class="label label-info pull-right"><a href="<?php echo $this->Html->safe($this->admin_uri . "clients/logoutasclient/");?>"><span class="fa fa-info-circle"></span> <?php $this->_("AppController.client_structure.staff_as_client_note");?></a></span>
    				<?php
    				}
    				?>
    			</div>
    		</div>
    		<div class="title">
    			<div class="container">
    				<h3><?php echo ($this->Html->ifSet($title) ? $this->Html->_($title, true) : $this->_("AppController.client_structure.default_title", true));?></h3>
    			</div>
    		</div>
    		<?php
    			if (!$this->Html->ifSet($logged_in)) {
    		?>
    		<div class="clearfix"></div>
    		<div class="no-nav"></div>
    		<?php
    			}
    			else {
    		?>
    		<div class="nav-content">
    			<div class="nav">
    				<nav class="navbar navbar-default" role="navigation">
    					<div class="navbar-header">
    						<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
    							<span class="sr-only"><?php $this->_("AppController.sreader.navigation");?></span>
    							<span class="icon-bar"></span>
    							<span class="icon-bar"></span>
    							<span class="icon-bar"></span>
    						</button>
    					</div>
    					
    					<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
    						<div class="container">
    							<?php
    							$active_nav = null;
    							?>
    							<ul class="nav navbar-nav">
    								<?php
    								foreach ($this->Html->ifSet($nav, array()) as $link => $value) {
    									$attributes = array();
    									$link_attributes = array();
    									$dropdown = !empty($value['sub']);
    									$active = false;
    									
    									if ($value['active']) {
    										$active = true;
    										$attributes['class'][] = "active";
    										$active_nav = $value;
    									}
    									if ($dropdown) {
    										$attributes['class'][] = "dropdown";
    										$link_attributes['class'][] = "dropdown-toggle";
    										$link_attributes['data-toggle'][] = "dropdown";
    										
    										// Set parent to active if child is
    										if (!$active) {
    											foreach ($this->Html->ifSet($value['sub'], array()) as $sub_link => $sub_value) {
    												if ($sub_value['active']) {
    													$attributes['class'][] = "active";
    													break;
    												}
    											}
    										}
    									}
    								?>
    								<li<?php echo $this->Html->buildAttributes($attributes);?>>
    									<a href="<?php $this->Html->_($link);?>"<?php echo $this->Html->buildAttributes($link_attributes);?>>
    										<i class="<?php $this->Html->_($value['icon']);?>"></i> 
    										<?php
    										$this->Html->_($value['name']);
    										
    										if ($dropdown) {
    										?>
    										<b class="caret"></b>
    										<?php
    										}
    										?>
    									</a>
    									<?php
    									if (!empty($value['sub'])) {
    									?>
    									<ul class="dropdown-menu">
    										<?php
    										foreach ($this->Html->ifSet($value['sub'], array()) as $sub_link => $sub_value) {
    										?>
    										<li>
    											<a href="<?php $this->Html->_($sub_link);?>"><i class="<?php $this->Html->_($sub_value['icon']);?>"></i> <?php $this->Html->_($sub_value['name']);?></a>
    										</li>
    										<?php
    										}
    										?>
    									</ul>
    									<?php
    									}
    									?>
    								</li>
    								<?php
    								}
    								?>
    							</ul>
    							
    							<ul class="nav navbar-nav navbar-right">
    								<li class="dropdown">
    									<a href="#" class="dropdown-toggle" data-toggle="dropdown">
    										<?php $this->Html->_($contact->first_name);?> <?php $this->Html->_($contact->last_name);?>
    										<b class="caret"></b>
    									</a>
    									<ul class="dropdown-menu">
    										<li><a href="<?php echo $this->Html->safe($this->client_uri . "main/edit/");?>"><i class="fa fa-edit fa-fw"></i> <?php $this->_("AppController.client_structure.text_update_account");?></a></li>
    										<?php
    										if ($this->Html->ifSet($portal_installed, false)) {
    										?>
    										<li><a href="<?php echo $this->Html->safe(WEBDIR);?>"><i class="fa fa-circle-o fa-fw"></i> <?php $this->_("AppController.client_structure.text_return_to_portal");?></a></li>
    										<?php
    										}
    										?>
    										<li class="divider"></li>
    										<li><a href="<?php echo $this->Html->safe($this->client_uri . "logout/");?>"><i class="fa fa-sign-out fa-fw"></i> <?php $this->_("AppController.client_structure.text_logout");?></a></li>
    									</ul>
    								</li>
    							</ul>
    						</div>
    					</div><!-- /.navbar-collapse -->
    				</nav>
    			</div>
    		</div>
    		<?php
    			}
    		}
    		?>
    		
    		<!-- Begin Content -->
    		<div class="container">
    			<div class="row<?php echo (!$this->Html->ifSet($show_header, true) ? " login" : "");?>">
    				<?php
    				if (!empty($active_nav['secondary'])) {
    				?>
    					<div class="col-md-3">
    						<div class="list-group">
    							<?php
    							foreach ($active_nav['secondary'] as $link => $value) {
    							?>
    								<a href="<?php $this->Html->_($link);?>" class="list-group-item left-nav <?php echo ($value['active'] ? "active" : "");?>">
    									<i class="<?php $this->Html->_($value['icon']);?>"></i> 
    									<?php
    									$this->Html->_($value['name']);
    									?>
    								</a>
    							<?php
    							}
    							?>
    						</div>
    					</div>
    					<div class="col-md-9">
    						<div class="row">
    							<?php echo $content;?>
    						</div>
    					</div>
    				<?php
    				}
    				else {
    					echo $content;
    				}
    				?>
    			</div>
    			<div class="row footer">
    				<div class="col-md-12">
    					<hr />
    					<p class="text-center">Powered by <a href="http://www.blesta.com/">Blesta</a>, &copy; Phillips Data, Inc.</p>
    				</div>
    			</div>
    		</div>
    		
    		<div class="modal fade" id="global_modal" tabindex="-1" role="dialog" aria-hidden="true">
    			<div class="modal-dialog">
    				<div class="modal-content">
    					<div class="modal-header">
    						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    						<h4 class="global_modal_title"></h4>
    					</div>
    					<div class="modal-body"><i class="fa fa-spinner fa-spin"></i></div>
    					<div class="modal-footer"></div>
    				</div>
    			</div>
    		</div>
            
    		<?php echo $this->Javascript->getFiles("body");?>
    		<?php echo $this->Javascript->getInline();?>
    		<?php echo $this->Html->ifSet($body_end);?>
        </body>
    </html>

    What I don't know of course is how to reference these files in order to create a static page.

    I am fine with having Powered By in the footer so is that all I'd need to have for a branded service?

    At some point I would like to have a fully blank slate so I can copy HTML generated from my CMS into these templates, which I am guessing is the best way to go to begin with rather than introduce server code from another CMS.

  9. I have successfully setup Blesta, and done the following:

    - Created a Package in WHM and Blesta

    - Setup PayPal standard module

    - Entered Paypal Username, Password and API signature using a Sandbox account

    - Created a user

    - Created a recurring invoice

    The invoice shows in the Clients' account but I can only Review and Confirm so is that all it is meant to do?

    Cheers

  10. I thought this may be the most appropriate place to post, i.e. not related to an extension.

    I've been reading here:

    added the code, but of course I have no understanding of what to do next.

    From what I can gather, this person has created files linked from the main page, e.g. examplehost/billing so that an index page can be defined for examplehost

    If anyone can give me information on how to do this it would be endlessly appreciated as it is one of the reasons I am thinking of investing in the platform.

  11. I am attempting to install 3.6.2 via CPanel, however I am being asked for a database name that cannot include non-alphanumeric characters such as _ however CPanel only allows me to create databases with a name construct e.g. website_database

    Is this something to do with Blesta or is it CPanel that is the problem and does that mean it is impossible to install Blesta via CPanel or is the problem limited to my hosting since I have never seen a system (cpanel) that allows you to create a database or database user without the _

    Edit: I managed to set it up.

    The installer script needs to setup the database itself and wants a name for after the _

  12. Hi,

    I just set up WHM hosting, with at least one CPanel, however in the section titled "Remote Access Key" it says:

    Remote access keys allow you to log in to your server without the need for a password. You can use a remote access key (or access hash) to authenticate with WHM’s remote API or DNS clustering features. If you use a remote billing solution, you will need to set up a remote access key on all of your cPanel & WHM servers.

    Is there somewhere in CPanel that I have to enter the hash, as well as in Blesta?

    Thanks again for any assistance offered.

  13. I found out the hard way, you need access to WHM rather than just CPanel so you can access the Remote Access Key which means you need true reseller hosting in order to be able to use Blesta.

    It is no wonder WHMCS is such a stitch up.

×
×
  • Create New...