Jump to content

Michael

Moderators
  • Posts

    9,521
  • Joined

  • Last visited

  • Days Won

    185

Everything posted by Michael

  1. maybe so That's the Auto login problem solved haha
  2. Mine is off as default: Enable HTTP Authentication for cPanel/WebMail/WHM Logins. This risks certain types of XSRF attacks that rely on cached HTTP Auth credentials. Disabling forces cookie authentication. Turning this on fixes Blesta. and it works in WHM** too.
  3. <form action="https://hostname.pw:2083/login/" method="post" target="_blank"> <input type="hidden" name="token" value="Token here."> <input type="hidden" name="user" value="qyaaysku"> <input type="hidden" name="pass" value="passwordhere"> <input type="submit" value="Login to cPanel" class="btn"> <input type="button" value="Login to Webmail" onclick="window.open('https://hostname.pw:2096/')" class="btn"> </form> like that.
  4. I don't get that, I have two cPanel sessions open and can use them freely without logging out of one and then logging in one, that should be limited by the same domain aka hostname, which I don't have open or had open.
  5. The only thing I'm logged in on cPanel is my cubicwebs cPanel which is on another server mate.
  6. Copying the link shows this: https://username:password@198.148.120.40:2083/ but not going to the hostname and didn't log me in on Chrome (as default I use Rockmelt). I changed the hostname and tried again and just takes me to the login page. But the link is: https://myadmin:password@titanic.magicserver.pw:2083/
  7. Just takes me to the IP:port
  8. Michael

    Blesta Baby

    awww so cute, defo a Blesta baby he has a Blesta Blanket
  9. Oh I see haha Its only started happening on mine. http://licensecart.com/site/ http://cubicwebs.xxx/shared-hosting http://gtmetrix.com/reports/cubicwebs.xxx/1r5eQRsx
  10. really? are you using the require_once?
  11. we dont mind seeing it in development It's exciting to see something new haha.
  12. I didn't do anything except from annoying Cody and Tyson haha.
  13. After the bullet point 5 would be under bullet point 1
  14. Put this in your own CSS or the Blesta CSS style: .order .content ul li .radios { width: 400px !important; } And it will make enough room for the bullet points in order: eg:
  15. Michael

    Spam!

    Never thought of that might look into it
  16. yeah mate looks like the whole domain has disappeared
  17. Another tip guys, if you get A£ etc and A€ you need to put this in the head section of your website pages: <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> If you get the following error when doing onetime prices: number_format() expects parameter 1 to be double, string given change them to: $price3 = getPackagePrice($api, 19, "onetime", 0); $price4 = getPackagePrice($api, 20, "onetime", 0);
  18. Michael

    Spam!

    Speaking of spam this is all the spam I can't ban and I don't really want to ban @gmail.com.
  19. Try this mate: <!-- Button to trigger modal --> <a href="#login" role="button" class="btn" data-toggle="modal">Login</a> <!-- Modal --> <div id="login" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon-remove text-error"></i></button> <h3 id="myModalLabel">Billing Area Login</h3> </div> <div class="modal-body"> <p><form method="post" action="http://billing.licensecart.com/customers/login/" target="_blank" style="width: 200px;margin: 0 auto 0 auto;"> Username: <input type="text" name="username" value="" id="login_username" /><br /> Password: <input type="password" name="password" value="" id="login_password" /><br /> <input type="submit" name="login" value="Login" class="btn hide_submit" hidefocus="true" /> </form></p> </div> <div class="modal-footer"> <button class="btn btn-danger" data-dismiss="modal" aria-hidden="true">Close</button> </div> </div>
  20. Yeah you need to remove the <p></p>'s from the source. Good Integration.
  21. All the hard work was the developers I just did the tut haha But it works amazing.
  22. Thanks to Cody, Tyson and Josh (Serverbin.net) for the code, together they helped get this code working for us the community and here is a little tutorial on how to get this working. Ok firstly you need to download the brand new API which Cody has developed to make it easier for developers from: https://github.com/phillipsdata/blesta_sdk (Click on download zip) Put the files into the root of the Blesta install. Then you need to make a API user and get the hash for the connection to your Blesta install. After you've done that you can do the following, you need to put this on the php file you wish the prices to be displayed on: If you aren't using a SSL on your installation change https://blestainstallationurl.com/api to http://blestainstallationurl.com/api <?php require_once "/home/username/public_html/blesta_api.php"; $user = "API USERNAME"; $key = "API KEY"; $url = "https://blestainstallationurl.com/api/"; $api = new BlestaApi($url, $user, $key); $company_id = 1; // Set acceptable currencies $valid_currencies = array("USD", "GBP", "EUR"); // Set default currency $selected_currency = "USD"; // Set another currency if given if (isset($_GET['currency']) && in_array(strtoupper($_GET['currency']), $valid_currencies)) $selected_currency = strtoupper($_GET['currency']); $price1 = getPackagePrice($api, 1, "month", 1); $price1_amount = formatCurrency($api, $price1->price, $price1->currency, $selected_currency, $company_id); function getPackagePrice($api, $package_id, $period, $term) { $package = $api->get("packages", "get", array('package_id' => $package_id))->response(); $package_price = null; foreach ($package->pricing as $price) { // Get monthly term if ($price->period == $period && $price->term == $term) { return $price; } } return false; } function formatCurrency($api, $amount, $from_currency, $to_currency, $company_id) { // Do the currency conversion $amount = $api->get("currencies", "convert", array('amount' => $amount, 'from_currency' => $from_currency, 'to_currency' => $to_currency, 'company_id' => $company_id))->response(); // Format the currency return $api->get("currencies", "toCurrency", array('value' => $amount, 'currency' => $to_currency, 'company_id' => $company_id))->response(); } ?> You can alter the code for more than one product like the example for mine: <?php require_once "/home/cwadminb/public_html/blesta_api.php"; $user = "CubicWebs_API"; $key = "dbf8a2e7bd87bea1c79d868dba5a56f3"; $url = "https://billing.cubicwebs.com/api/"; $api = new BlestaApi($url, $user, $key); $company_id = 1; // Set acceptable currencies $valid_currencies = array("USD", "GBP", "EUR"); // Set default currency $selected_currency = "USD"; // Set another currency if given if (isset($_GET['currency']) && in_array(strtoupper($_GET['currency']), $valid_currencies)) $selected_currency = strtoupper($_GET['currency']); $price1 = getPackagePrice($api, 1, "month", 1); $price2 = getPackagePrice($api, 2, "month", 1); $price3 = getPackagePrice($api, 3, "month", 1); $price4 = getPackagePrice($api, 4, "month", 1); $price1_amount = formatCurrency($api, $price1->price, $price1->currency, $selected_currency, $company_id); $price2_amount = formatCurrency($api, $price2->price, $price2->currency, $selected_currency, $company_id); $price3_amount = formatCurrency($api, $price3->price, $price3->currency, $selected_currency, $company_id); $price4_amount = formatCurrency($api, $price4->price, $price4->currency, $selected_currency, $company_id); function getPackagePrice($api, $package_id, $period, $term) { $package = $api->get("packages", "get", array('package_id' => $package_id))->response(); $package_price = null; foreach ($package->pricing as $price) { // Get monthly term if ($price->period == $period && $price->term == $term) { return $price; } } return false; } function formatCurrency($api, $amount, $from_currency, $to_currency, $company_id) { // Do the currency conversion $amount = $api->get("currencies", "convert", array('amount' => $amount, 'from_currency' => $from_currency, 'to_currency' => $to_currency, 'company_id' => $company_id))->response(); // Format the currency return $api->get("currencies", "toCurrency", array('value' => $amount, 'currency' => $to_currency, 'company_id' => $company_id))->response(); } ?> Where you wish the price to be put the following php code: <?php echo $price1_amount; ?> Change the number to the product price you wish to display. Again thanks to the coders for helping the community. If you used this code when I posted it please update it as it has a fix from Tyson to ensure the GBP prices don't just change the USD symbol.
  23. Thanks mate never heard of it haha.
  24. Haha I play Cod MW3 and LBP (I like making my own levels haha) and what's GS:GO mate?
×
×
  • Create New...