Items filtered by date: December 2015

This article is 2 fold. It firstly tells you how to export your bookmarks from the AOSP browser in Android and then how to import them into Firefox. The other browsers such as Google Chome or Mozilla Firefox have a sync feature built into them and there are also apps to extract the links from these. But this article is for extracting the Bookmarks from the AOSP browser only. Once you have done this you should consider using the inbuilt sync features of the Chrome or Firefox browser.

Below are different methods based on the 2 Apps that I have used on how to export from android AOSP browser to importing them into firefox.

Bookmark Sort & Backup

This is my prefered option because of the nicely formed html file that can be imported straight into FireFox.

Download here

now on its description it says

  • '*** DOES NOT WORK ON NEWER DEVICES USING CHROME AS WEB BROWSER ***'
  • 'Warning: on Android 3 & 4, do not use this application if the Google Chrome bookmark synchronization is activated.'

From reading this means it willl not work on later version of android where the browser is chrome, not AOSP. it's second waring is about not using it if the syncronization was activated. well i had just installed the chrome browser and activated the sync, but i had no links in it and the backup happened fine. i would recommend uninstalling this after runnig the backup. It probably messes with the sync if you try and add things or alter them possibly.

  • when run, the app then loads the links and you can see how many there are. you can also access the backup withou performing any other function.
  • default location for backup export /storage/sdcard0/BookmarkSB  , this can be changed
  • bookmarks SB exports the bookmarks in an HTML file with all the hyperlinks working using the page title as the link name

Instructions

  1. Install Bookmark Sort & Backup on the Android phone
  2. Open the app and export links to the default location (no changes required for this)
  3. Copy the newly created backup file to your PC however you want
  4. Now select an option from below to import the files into your FireFox browser

Get Files into Firefox on your Browser

Now you have the file on your PC you have 2 options to import the links to Firefox because of the useful format it has been exported in.

Option 1

This is my prefered option because of the nicely formed html file that can be imported straight into FireFox.

  1. Make sure the root of your Firefox Bookmarks is empty of individual bookmarks, folders are fine. (This is the Bookmarks Menu)
  2. Create new folder in Firefox for the import, call it 'My Android Mobile Phone Links'
  3. Import directly into firefox via the 'Bookmarks / Show All Aookmarks'/Import Bookmarks from HTML'
  4. All files will be importe to the root of your FF bookmarks, so move these new links to the new folder

Option 2

  1. install a multilink opening plugin for Firefox (Snap Links Plus)
  2. Open the backup html file from Bookmark Sort & Backup in firefox (Drag and Drop)
  3. Select all links and open them
  4. Right click on the tabs and select 'Bookmark All' saving them into a new folder

Option 3

  • Use an online URL emulator and open all of the URLs in the browser
  • when all of the URLs are open, right click and slect 'Bookmark All'

Optional

To keep things clean you can delete the Bookmarks on your phone using Super Backup and use 'Remove Bookmarks' option

Super Backup : SMS & Contacts

Download here

  • This has an excellent feature to delete all bookmarks on the phone. This appears to only wipe the AOSP bookmarks, but possibly wipes Chrome, Firefox etc... but this needs checking.

  • This backed up the bookmarks to an xml file, i need to see if it did them all. ie local and those at google via the AOSP browser (AOSP browesr is not chrome and is the one with the blue world icon)
  • It does seem to do both local and the google ones but only supports folders in their format
  • The backup can be put wherever you want but defaults to the internal SD Card in the follwoing location. It should be noted that you can swap the SD Card or device it is saved in and unless you change it it will use the same relative location on that drive.
  • The XML that is created is in a proprietary format but the links are clear along with the other information if you wanted to perform any operation on them.

Instructions

  1. Install Super Backup : SMS & Contacts
  2. Backup the Bookmarks with Super Backup. This exports them in to an xml file format (proprietary format, located here....) on the SDCard
  3. Copy the backup XML file to your Windows PC however you want
  4. Scrape the bookmarks.xml to extract and convert all URLs to links and place them in a new HTML file. This can be done by some on tools or a simple PHP script
  5. Open the new html file in firefox
  6. Install a multilink selector plugin to Firefox
  7. Open the .html file you have just created
  8. Highlight and open all of the links that are displayed in your browser
  9. When all of the bookmarks have been opened use the 'bookmark all links' to folder option

Optional

To keep things clean you can delete the Bookmarks on your phone using Super Backup and use 'Remove Bookmarks' option


Links

Extract Domains Links

These might get moved to their own article

Published in Android

There might be occasions where need to know the colour of a text used in a libre office document. I will show you here the different methods that i know of.

These will probably work on open office documents aswell.

Copy and Paste

  • In libre office highlight the text and copy it
  • open up your favourite WYSIWYG (i used JCE Editor in Ioomla)
  • paste

The text is now pasted in to the wysiwyg and the hex code is contain in a <span> tag around the text for you to use.

Extract and Unzip

Most people dont know that libre office files are zip compressed and that the actual language is an xml style similiar to html if not a derivative.

  • but if you use an unzip file to look at the zip'd contents of a .odt file, you'll find content.xml.
  • In there will be style definitions that include colours specified in hexadecimal.

For example, from a little test file that I made:

<style:style style:name="T4" style:family="text"><style:text-properties fo:color="#008000"/></style:style>
<text:span text:style-name="T4">green</text:span>

You can then use Tools > Options > LibreOffice > Colours to add any desired colour to your GUI.

Other

  • Save the document as a html file and then read the HTML code for the HEX code
  • Use a windows based colour picker and just select the font you want for the colour. You might find zooming in on the text to make it larger helps you here.

Links

Published in Applications

I am running Cyanogenmod 10.1.3 on my Samsung Galaxy SII (GT-I9100), and starting yesterday my keyboard continuously crashes with the following message:

Unfortunately, Android keyboard (AOSP) has stopped.

This message pops up very 10 seconds or so even when I am not trying to type. I thought it might have something to do with my recent install of the DU Speed Booster app. But after uninstalling it I still get the same problem.

This is very serious, as my phone is rendered almost completely unusable since I can't enter any text, and message keeps popping up preventing me from even doing things that only require touch.

Solution

Go to System Settings > Apps > click Android keyboard (AOSP). Clear Data. Clear Cache.

Links

Published in Android
Thursday, 11 June 2015 13:33

Spudger and Pry Tools

These are my notes on those plastic opening tools for those fiddly phones and electronic devices that dont want to be opened.

A Spudger is also known as:

  • Spludger
  • Pry Tool
  • Prying Tool
  • Opening Tool
  • Pry Bar
  • Case Opening Tool
  • Guitar Paddle (searching for these make a Spudger cheaper)
  • Plectrum

All terms can prefixed with either: Metal / Plastic / Nylon

There are loads of different types of spudger, both plastic and metal. The most famous is the DottorPod iSesamo which is a metal blade with a plastic handle specifically designed for opening iPhones. The iSesamo requires care when being used because it is sharp metal

I have discovered that the plectrums are sold as Spludgers or pry tools as they are ideal for the job and because they are plastic they are not likely to damage your electronic goods.

Spudger - Wikipedia, the free encyclopedia

My advice, now that you know the different names of a Spludger, search on eBay and find the ones that suit your need. I found the following a good list:

  • Plectrum Spludgers
  • iSesamo
  • Bar Style Nylon Spludger
Published in Electronics
Thursday, 11 June 2015 10:46

My Desoldering Gun Research Notes

These are my notes i made while looking for decent Desoldering Gun

Desoldering Guns

Links

Published in Electronics
Thursday, 11 June 2015 10:39

My Multimeter Research Notes

This is my research in to multimeters

Meters

  • Vichy VC99 Multimeter - autoranging - cheap
Published in Electronics
Thursday, 11 June 2015 10:29

My Capacitance Meter Research Notes

This is collection of my researh on which capacitor meter i should buy.

Meters

  • MESR M6013 - I bought this one, it also has a matching ESR meter the MESR 100 V2
  • XC6013L - a cheap meter on ebay
  • Honeytek A6013L Capacitor Tester - this apparently has an auto discharge for capacitors below 1000v (see here)
  • VICHY VC6243+ - autoranging but cheap
  • VICI VC6013 - another auto ranging cheap meter but looks a lot like the Vichy VC6243+, has protection and self discharge of capacitors
  • Sparkpen Spark Capacitor Discharge Pen for Digitial Camera Mobile Repair Tools | eBay  - this is a capacitor discharge cicuit connected to pens for easy of use

Links

Published in Electronics
Sunday, 07 June 2015 11:41

Diagnose cURL connections

These following will help you diagnose cURL connections, if cURL is connects to the other end, SSL and how to enable cURL.

What is my cURL IP address?

This is not always as obvious as you think. If you are on a shared server and even if you have a dedicated IP address you are most likely still using the server's shared IP address. This can lead to a lot of confusion when diagnosing cURL connections issues and can still be preent on other variations of server i.e. VPS or dedicated but is more unlikely.

My script will allow you to find out what IP address your cURL service is using

Put this on your website that is having the paypal trouble. Put it in a file called curl-ip-test.php

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://www.myremotedomain.com/remote-ip-check.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$contents = curl_exec ($ch);
curl_close ($ch);
echo "Your Server's IP : ".$contents;
?>

Add this code to the remote website as a php file at www.myremotedomain.com/remote-ip-check.php

<?php
echo $_SERVER["REMOTE_ADDR"];
?>

Basically what these bits of code do, is that the remote script is accessed via the cURL service (from the server you are trying to work out the cURL IP address) and the remote script sees the IP that is being used and gives the cURL request that IP which is then displayed in your browser.

To get the IP just run the file via your web-browser ie www.mydomain.com/called curl-ip-test.php

How do i check if php server allows external curl connections

Create a file like this:

<?php 
phpinfo();
?>

or

<?php
echo "<pre>";
var_dump(curl_version());
?>

or

<?php
$var = echo shell_exec("/usr/bin/curl -L http://www.google.com");
?>

WHMCS Licensing Server Check Script

The following script is used to check to see if your WHMCS install can see the WHMCS.com licensing server. It also can be adapted to further test aspects of a cURL connection and is why I have added it here as a reference.

<?php

    $whmcsurl = "https://www.whmcs.com/index.php";
    $postfields = array("curltest"=>"1");

    $ip = gethostbyname('licensing28.whmcs.com');

    echo "<font style=\"font-size:18px;\">Testing Connection to '$whmcsurl'...<br />URL resolves to $ip<br /><br />";

    if ($ip!="184.94.192.3" && $ip!="208.74.120.227") echo "<font style=\"color:#cc0000;\">Error: The IP whmcs.com is resolving to the wrong IP. Someone on your server is trying to bypass licensing. You'll need your host to investigate and fix.</font><br /><br />";

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $whmcsurl);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
    curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $data = curl_exec($ch);

	if (curl_error($ch)) {
		echo "Curl Error: ".curl_error($ch)."<br /><br />";
	} elseif (!$data) {
        echo "Empty Data Response - Please check CURL Installation<br /><br />";
    }

	curl_close($ch);
	
	echo "Connection Response (this should be the HTML from $whmcsurl when working correctly):<br /><br /><textarea rows=\"20\" cols=\"120\">$data</textarea>";

?>

Links

Published in PHP
Saturday, 06 June 2015 18:58

Diagnose PayPal issues in Prestashop

These instructions although geared towards fixing PayPal issues in Prestashop they can be applied to other situations and software platforms where PayPal is used as a payment gateway.

Symptoms

  • PayPal payments failing and showing an error to the client
  • Orders with no products (This might also
  • Back Office not creating orders after successful payment
  • An error is returned but with no information (ie not populated)
  • Nothing is returned from PayPal

Causes and Fixes

  • IP blocked by paypal
    • ip blocked because you are on a shared IP and some other people are doing fraudulent behaviour so the whole IP gets blocked
    • paypal do block IP addresses but usually for 24 hours
    • change IP
    • Contact PayPal MTS and have the ban lifted
  • Network transport issues to paypal
    • try changing IP
    • use a different network
  • Server is still running SSL3
    • disable SSL3
  • SSL certificate might need installing
    • I thing a SSL certificate is required to be installed when using PayPal API, i dont think it is required for IPN
  • Using an old API
    • upgrade the API you are using
  • PayPal is not configured to accept the currency your software platform (ie prestashop) is using
    • configure the currencies correctely
  • sellinux = enabled
    • sirandrewdavis mentions the SELinux=enforcing (security enhanced LINUX) was causing his problem and changing it to SELINUX=disabled fixed his problem
  • Number of connections from a single IP to paypal has been exhausted
    • wait 10 minutes
    • change providers
    • get a dedicated server or VPS
    • get a dedicated IP (this might not work on a shared server because the underlying services of the server will still uses the shared IP)
  • cURL is not enabled 
    • enable cURL as it is required
  • PayPal credentials are not configured correctely
    • re-enter all your details
  • Your shop is not in maintenance mode (if no-one can access your site, the paypal site won't be able to either). (Presta-Changeo Article)
  • There is password protection on your site (if no-one can access your site, the paypal site won't be able to either). (Presta-Changeo Article)
  • Make sure your paypal account is verified, otherwise transactions don't get automatically approved and prestashop will show a payment error (Presta-Changeo Article)
  • The most common Sandbox mode problem with the paypal module is that the orders are not showing up on the shop. (Presta-Changeo Article)
    • The reason for that is the paypal module is currently set up to create orders only if the response it gets from the paypal site is "Completed", however, when running in Sandbox mode, paypal sends a response of "Pending".
      We have read some documentation about changing the sandbox account to send a "Completed" response, but even after trying that, payments still appeared as pending.
  • Your default currency in Prestashop doesn't match your paypal currency. (Presta-Changeo Article)

  • Payment is made using Echeck or other methods that require a longer time to clear. (Presta-Changeo Article)

  • Paypal decides they need to investigate the transaction. (Presta-Changeo Article)

  • Outgoing connections are blocked by your hoster (this is rare)
  • Client inputted data can cause 'Back Office not creating orders after successful payment' (not confirmed)
    1. The customers paypal address not having states, but Prestashop being configured to require a State
    2. The customers paypal profile does not have a phone number, but Prestashop by default requires all addresses to have a phone number
    3. The module has a defective notify URL depending on the PS version
    4. The prestashop product name has characters that Paypal do not accept
    5. The customers address used in Prestashop is not a valid address, and Paypal rejects it
  • You are testing in maintenance mode. You cannot do this, the IPN will be rejected by your store (since the store is 'offline')
    • I need to have the site live while I check this or the payment modules won't be able to receive the post backs... so in effect I'd get a "false positive".
  • Too many IPN request in a certain timeframe causing a temporay ban
  • Faulty or Old code
  • Other modules or software is blocking paypal working
  • PHP version incompatabilities

Other Solutions

  • Clear and Disable all of the Prestashop Caches - code errors might be lurking in the cache
  • Upgrade to the latest version of Prestashop and the PayPal Module
  • Repair the database - See my article New orders not showing on Orders Tab or orders have missing products for synchronizing/repairing the database
  • check log files for errors
  • change IP
  • tracert the network path to PayPal
  • check PHP error log
  • PayPal might be having a server outage - This is rare but has been pointed out that it happened in this old thread

Links

The following are all links i have used to put this article together.

  • HELP Orders Have No Products - OUT - 1.6.0.11 [7 Jan 2015] - PrestaShop - This shows an example of some adding their own debugging code into the paypal module that POSTs the error to Prestashop's inbuilt error logging system via PrestaShopLogger::addLog()
  • Back Office not creating orders after successful payment - PayPal - PrestaShop - Mentions inputting dodgy addresses or wiered characters can prevent orders being created, testing in maintenance mode will fail and the number of IPN requests can cause a temporary ban and code fixes to the prestashop paypal module v1.3.7 / PS 1.6.0.9
  • Most orders do not appear in back office - Configuring & using PrestaShop - PrestaShop - faulty code dues to an upgrade, there were incompatibilites
  • Fixing Paypal Problems in Prestashop - Presto-Changeo - Some common solutions to paypal not working
  • Akensai Ping Online/Offline PHP Script - The base script used to check visability of PayPal servers
  • PayPal Error occurred! - PayPal - PrestaShop - This article identifies an issue with the cookies created by the PayPal module. It tell you how it was found, the method of debuggin and a solution. A further solution in this thread was to update the plugin because PayPal removed the use of SSL3
  • PayPal SSL 3.0 (POODLE) Microsite - This is the offical documentation about from PayPal removing SSL3. As of January 12, 2015 at 12:01 a.m. Pacific Standard Time (PST), PayPal has discontinued support for Secure Socket Layer version 3 (SSL 3.0). This action was taken to help keep customer accounts secure from the POODLE vulnerability. If you have not already done so, you will need to update from SSL 3.0 to the Transport Layer Security (TLS) protocol. The following links provide detailed instructions, including a Merchant Response Guide available in 27 languages, to assist you in making the update from SSL 3.0 to TLS. Your exact settings may vary.
  • PayPal Modification SSL V3 to TLS - PayPal - PrestaShop - A Prestashop forum threa about PayPal disabling SSL3, what it means and what you can do. main 
  • PayPal Error with no error code! - PayPal - PrestaShop  This is the 13 page one, the main theme of the thread is that PayPal blocks IP addresses (with proof) even though Pay Pal denies it.
    • page 1 - Paypal is blocking access and gives IP addresses he ran with the Akensai script to verify a connection to paypal; putting the shop on another server allows paypal to work
    • page 2 - If you look at the addresses I previously put up earlier in this post it seems that it requires access to them. But specifically it tries to contact api-3t.paypal.com
    • page 3 - A simple curl command to https://api-3t.paypal.com/nvp from a shell fails with a 'couldn't connect to host' and all API requests timeout; Responses from PayPal about how they dont block IPs; There is a response about a bad hop on their network dropping packets preventing access to their API endpoints; a response from PayPal about a fault with their servers;
    • page 5 - symanski wrote a script utilising the akensai script to test the PayPal server connectivity which can prove connection issues; there is also a larger script from symanski; a description from symanski about what the script is testing and why
    • page 7 - mentions about how being on a shared server if another account on the server gets the IP banned because of fraud etc.., your PayPal connections will be banned aswell because it is on the same IP
    • page 8 - sirandrewdavis mentions the SELinux=enforcing (security enhanced LINUX) was causing his problem and changing it to SELINUX=disabled fixed his problem
    • page 9 - vinylbodyshop says how his hoster added more IPs in to his cluster to allow for more PayPal Connections and that fixed his issue; symanski quaotes how PayPal MTS say that they dont block access to the APIs and that MTS beleiev that it is a router on the internet that is configured to block access which is owned by AT&T or Sprint; leecook quotes his hosting provider recognises they have an issue with their customers accessing PayPal and are working to fix the issue; symanski is quoting PayPal MTS who admit their is an issue with some clients accessing their API servers pointing towards an AT&T or Sprint router causing the issue.
    • page 10 - leecook who registered a fault with AT&T has reported that they had put a block on the PayPal addresses and it is now removed; leecook says the outcome of this is that either change your IP address or get who ever is blocking it to unblock it
    • page 11 - my cURL test script and why i used it to discover the real server IP address. This will also check if cURL is working
    • page 12 - scorpionsworld has re-written the Akensai script to work via AJAX to prevent a timeout error of 500; hansoft mentions about an incompatability setup on PHP
    • page 13 - d1bizstop points out that PayPal has disabled the use of SSL3 and that this is what caused his issue.
  • blah blah
Published in PayPal
Thursday, 04 June 2015 18:23

Center Homepage Banner

The homepage banner is not centered and requires a bit of coding.

This would involve setting a wrapper to 100% and the banner size inside to fixed with a max-width and auto margins. I would also apply these changes via the overide system.

Example Code:

#homepage-slider {
  padding-left: 0;
  padding-right: 0;
  margin-bottom: 14px;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  position: relative;
  z-index: 1;
  float: left; }
  
@media (max-width: 767px) {
	#homepage-slider {
	width: 100%;
	max-width: 100%;
	padding-top: 20px; }
}
	  
#homepage-slider #homeslider {
	margin: 0 auto;
	padding: 0; }
Published in Prestashop
Page 47 of 96