Items filtered by date: December 2014

This code allows you to set a background image or texture behind the content areas of a Joomlashine template. This will not work for all templates and might need some further work but it is a great starting point.

/*-- Set a background image or texture behind module positions and content --*/

/* Set Background Image - add to wiki */
#jsn-page {
	background: url("../custom/images/background.jpg") repeat scroll 0 0;
}

/* Make backgrounds transparent */
#jsn-topheader,
#jsn-header,
#jsn-body {
	background-color: transparent;
}

/* Remove large padding in reta content block */
#jsn-content {
	padding: 0;
}

/* Restore white to certain regions */
#jsn-topheader-inner,
#jsn-header-inner,
#jsn-content_inner {
	background-color: white;	
}

 

Published in Joomlashine
Thursday, 23 June 2016 15:25

Dark Footer Background Image

There are 2 ways of making a Dark Footer Background Image:

  1. Manipulate the image directly, then add as a background
  2. Use a combination of a dark background and a semi-transparent image allowing the darkness to show through

Suggested footer image sizes

  • 1900 x 856
  • 192 x 600

Method 1: Manipulate the image directly, then add as a background

This is by far the easiest way of making a footer background image.

  • Open the image in your favourite image editor (mine is Paint.NET)
  • Edit Hue/Saturation/Lightness and Brightness/Contrast as needed
  • Save the image
  • Upload the image to the appropriate folder
  • Alter the background image using the code below

Basic

This is the absolute code required to change the footer background.

CSS

#jsn-footer::before {
	background: url("../custom/images/footer-background.jpg");
}

#jsn-footer {
	background: url("../custom/images/footer-background.jpg");
}

Reference Code

Joomlashine has also used the following code for setting a footer background.

CSS

/* Required for the positioning of the background */
#jsn-footer {
	position: relative;
	font-size: 13px;
	line-height: 22px;
	color: #acacac;
	padding: 55px 0;
	/* margin-top: 30px; */
}

/* This displays the background image in relation to its parent #jsn-footer */
#jsn-footer::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: url("../images/backgrounds/ft1.jpg");
	background-position: 50% 0;
	background-repeat: repeat;
	background-size: cover !important;
}

HTML

<div class="jsn-footer">
	<!-- Footer Content Here -->
</div>

Method 2: Semi-Transparent Image on Dark background

The #jsn-footer <div> background is black so when the image is semi-transparent the black comes through making the image darker and give a sort of watermark effect.

Not all the code is required but I have put it here for reference. Different Joomlashine Templates might have slightly different versions of this code but the the rules shoud be very similiar.

CSS

/* Required for the positioning of the background and sets it to be dark */
#jsn-footer {
	position: relative;
	font-size: 12px;
	line-height: 20px;
	color: #fff;
	padding: 35px 0px 0;
	background: #171c26;
}
	
/* This displays the background image in relation to its parent #jsn-footer and makes the background image semi-transparent */
#jsn-footer .img-ft-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: url("../images/backgrounds/footer.jpg");
	-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity="15")";
	filter: alpha(opacity= 15);
	-moz-opacity: 0.015;
	-khtml-opacity: 0.015;
	opacity: 0.015;
	background-position: 50% 0;
	background-attachment: fixed !important;
	background-repeat: repeat;
	background-size: cover !important;
}

HTML

<div class="jsn-footer">
	<div class="img-ft-bg></div>
</div>

Notes

  • Demo here - It is a little hidden, possible they have made it to dark. it is on the politics page
  • This code keeps the backgound image fixed in place.
  • If you think the background has a layer it is fixed to the bottom of the page.
  • So when you scroll it appears as if  the footer is a  window and is moving over the background image.
  • This is created by absoulte positiong of the .img-ft-bg within the relative positioned footer DIV
  • changing the following helps with positioning the picture in the background
    • background-position: 50% 0;
    • background-attachment: fixed !important; --> background-attachment: local !important;

Reduce Image File Size but keep the same resolution

When making  footer images they have to be quite wide and have resolutions such as 1920 x 1080 but this causes the images to be of a large file size. The solution is simple though.

This technique massively reduces its file size and allows you to use large resolution images with small footprints.

  • Save the image  as a JPG @ 60% quality

When you save this lower quality image, you will find it normal to the human eye and as such it looks fine, but the image file size is massively reduced. 

Published in Styled Elements

In Joomla occasionally you might want to a SubText Message underneath the menu item (Link Title Attribute), but Joomla does not support this feature currently (Joomla 3.51).

Solution

To add a 'Link Title Attribute' to a  'Text Seperator' you need to edit the database directly, preferably using PHPMyAdmin.

Get a working copy of a menu item with a 'Link Title Attribute' to look at

  • Configure a menu with a 'Link Title Attribute'
  • Goto the Joomla Database via phpmyadmin
  • Goto #___menu table
  • Find the menu item you are looking for, here it is 'Home'
  • Edit params

This is a normal menu item configured with a sub text and css styling

{"show_title":"","link_titles":"","show_intro":"","info_block_position":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_vote":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_hits":"","show_tags":"","show_noauth":"","urls_position":"","menu-anchor_title":"Life Coaching","menu-anchor_css":"teststyle","menu_image":"","menu_text":1,"menu_show":1,"page_title":"","show_page_heading":"","page_heading":"Stuart Downing : Professional Life Coach","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}

Edit your 'Text Separator' and add a 'Link Title Attribute'

NB: if you have just created your menu item, it will be at the end of the table.

  • Goto the Joomla Databse via phpmyadmin
  • Goto #___menu table
  • Find the menu item you are looking for
  • In the item's parameters you will see
    {"menu-anchor_css":"","menu_image":"","menu_text":1,"menu_show":1}
  • Add/Edit the menu item with the following parameters. You only need to add what you want. if the tag is already there just edit it
    ,"menu-anchor_title":"Life Coaching","menu-anchor_css":"teststyle",

Alternative Solution not using a 'Text Sperator'

Although this is not exactly what the article is about, this solution will give you the same effect.

  • use External URL instead of a 'Text Seperator'
  • Edit the 'Link Title Attribute' in the menu item as normal and as required.
  • Use # as the link/Target URL

Links

Published in Joomla

When you first setup a VirtualBox PC you might find the drivers are missing. These are not easy to find unless you know where they are.

Where are the drivers?

  • The windows Files are on a iso file which might not be present until you install "Guest Additions"
  • C:\Program files\Oracle\VirtualBox\VBoxGuestAdditions.iso
  • So you mount this image which has the drivers.
  • see https://www.virtualbox.org/manual/ch04.html
  • I have also found that the drivers that are supplied do not cover all operating systems.

** Notes of the CD **

Oracle VM VirtualBox Guest Additions

  • Where have the Windows drivers gone?
    The Windows Guest Additions drivers were removed from this directory to save space on your hard drive. To get the files you have to extract them from the Windows Guest Additions installers:
  • To extract the 32-bit drivers to "C:\Drivers", do the following:
    VBoxWindowsAdditions-x86 /extract /D=C:\Drivers
  • For the 64-bit drivers:
    VBoxWindowsAdditions-amd64 /extract /D=C:\Drivers
  • Note: The extraction routine will create an additional sub directory with the selected architecture (x86 or amd64) to prevent mixing up the drivers.
  • To get further help with the command line parameters of the installer,
    type: VBoxWindowsAdditions-<arch> /?

Notes

  • The video drivers are present but the network card is not. The link below suggest changing the network card hardware type until you find one that works.
  • http://ubuntuforums.org/showthread.php?t=1106684
    • "In the Virtualbox Control Panel thing (where you can specify your machines hardware configuration), you click on the network adapter category and then change the interface type. There are four to select from. Simply try a different interface type until one works. I didn't need to give windows any drivers for the PCnet-PCI II device (the screenshot shows the PCnew-FAST III device, and that's what I use on my home computer... this other persons computer...well, it probably would have worked too, but the I picked the PCI device out of the list of four available and it work with no issues or prompts to install any drivers). "
  • Try "PCnet-PCI II device"
  • Intel Pro/1000 MT (82540EM)
Published in Virtual Machines

This article is not complete yet.

There are 2 basic ways to remove the counter:

  1. Use the USB Jig - A little piece of hardware that would reset the counter and get rid of the yellow traingle when plugged into the USB socket.
  2. Software - I am not 100% sure how this works, needless to say it is software that alters the counter but this has a small chance of bricking your phone.

Links

Published in Android

I have made a list of the settings I like to set when am setting up a Cyanogenmod Android phoen for th first time. I makes things a lot easier because if you only use a setting once you might not remember where it is and spend ages trying to find it again, I know I have.

Android Settings

  • You can search settings
  • NB select to update the cyanogenmod recovery - Settings --> Developer options --> Update Cyanogenmod recovery
  • disable home button waking phone up - settings --> buttons --> Home Button --> Wake up device
  • change vertical app list to horizontal –
  • change home screen time out - settings --> Display & Lights --> Screen --> Sleep (i set to 10 mins)
  • enable developers mode - settings --> about --> tap 7 times on the build number
  • force app close when holding the back button --> settings --> Developer options --> Kill app back button
  • Kill app on leaving - Settings --> Developer options --> Apps --> Don't keep activities = destroy all related tasks when you leave app
  • Extended shutdown with recovery option - Settings --> Developer options --> Apps --> Advanced reboot
  • format SDCARD in android - Settings --> Storage & USB --> {select the drive ie sdcard0} --> 3 button menu --> Settings --> format -- you cannot wipe system drive here and also i would recommend not having root on whilst you do it.
  • enable usb drive mounting via usb
Published in Android

You receive the following error when trying to format your Samsung S2 Internal SD drive in Cyanogenmod CM13 (Android 6.0.1):

Command ’33 volume partition disk:
179_0 public’ failed with ‘400 33
Command failed’

command failed

Possible Causes

  • Corrupt PIT
  • The kernel/Bootloader was not IsoRec compatible
  • Corrupt partition format
  • The ROM is faulty

Solution (does not work)

After I had updated the bootloader/Recovery with TWRP 3.0 and performed a REPIT The drive seems to work ok. This basic will fix any of the errors outlined above. Obviously unless you need to re-partition you Samsung I would just try updating the Bootloader/Kernel/Recovery first.

I still cannot reformat the drive in CM13

Notes

This could just be a bug in the current revision of CM13.x so another excellent solution is to see if updating to the latest verion of CM13 works.

Published in Android
Sunday, 19 June 2016 14:13

Slow Samsung Evo 850 SSD

These are my reseach notes for trying to find out why my new Samsung Evo 850 SSD was not running at advertised speeds in my Dell E6540 Laptop.

Settings I tried and the results:

  • Chipset drivers set as IRRT but running in ACHI mode in bios (No Change)
  • using a standard ahci drive from microsoft 2006 causing issues (No Change)
  • use intel RST technology but make sure this is the driver being used (No Change)
  • c state setting in bios (No Change)
  • Disable the samsung RAPID Mode  as it is only a RAM disk
  • Intel speed step disabled (a bit better)
  • Single core rather than multi (slower IOPS read if i restrict to 1 core because not proper 1 CPU emulation, 1 core giving half speed and thus maxing the core out.)
  • UEFI / Legacy MBR (No Change)

Other Settings Not tried or are not applicable:

  • I can bump those 4K random read/writes up by disabling C1e and c-states in my BIOS
  • Other power settings in bios

So the Specific Settings I have available in my Dell E6540 are:

  • System Status
    • SATA Operation = AHCI
  • Performance
    • Multi Core Support
    • Intel SpeedStep
    • C-States Control
    • Intial Turboboost

None of these made any difference.

Other things to try that have been suggested:

  • Try safe mode
  • Try running prime 59 whilst running the Performance program because the CPU is kicked in fully
  • Window has power management features that could throttle the CPU
  • See if the drive is faulty by trying it in a Desktop PC with a powerful SATA chipset.

Conclusion

It is my chipset that has a limitation. Not all laptops were designed to handle SSD speeds because when these laptops were getting designed, SSDs were not main stream yet.

Links

Published in Hardware
Saturday, 18 June 2016 11:55

Flying Form

This code creates a form using a UniForm, that will slide in from the center for that extra effect to whichever module position you select In this case, Stick Leftbottom [stick-leftbottom] position.

This code is designed for Uniform but can be adapted to slide in any module.

 

 

CSS

/* Container */

.flying-form {
	padding-left: 10px;
}	

.flying-form .popup-form {
	position: relative;
	margin-bottom: 50px;
	width: 320px;
	min-height: 142px;
}

/* Animation */

.flying-form .animated {
	-webkit-animation-duration: 1s;
	animation-duration: 1s;
	-webkit-animation-fill-mode: both;
	animation-fill-mode: both;
}

@-webkit-keyframes slideInRight {
	0% {
		-webkit-transform: translate3d(100%, 0, 0);
		transform: translate3d(100%, 0, 0);
		visibility: visible;
	}
	100% {
		-webkit-transform: translate3d(0, 0, 0);
		transform: translate3d(0, 0, 0);
	}
}

@keyframes slideInRight {
	0% {
		-webkit-transform: translate3d(100%, 0, 0);
		transform: translate3d(100%, 0, 0);
		visibility: visible;
	}
	100% {
		-webkit-transform: translate3d(0, 0, 0);
		transform: translate3d(0, 0, 0);
	}
}

.flying-form .slideInRight {
	-webkit-animation-name: slideInRight;
	animation-name: slideInRight;
}	

/* Styling */

.flying-form .popup-form {
	position: relative;
	margin-bottom: 50px;
	width: 290px;
	background-color: #fff;
	padding: 15px 15px 0;
	box-shadow: 0 0 4px #666!important;
	border-radius: 3px 0 0 3px !important;
}

.flying-form .popup-form h2.popup-title {
	text-transform: none;
	margin: 10px 0 0 10px;
	font-size: 16px;
	line-height: 1.3;
	font-weight: bold;
}

.flying-form .popup-form .jsn-bootstrap .jsn-form-content .control-group {
	padding: 0 !important;
}

.flying-form .popup-form .jsn-form-content .control-group .control-label .required,
.jsn-uniform.jsn-master .popup-form .jsn-form-content .control-group .control-label i {
	display: none;
}

.flying-form .popup-form .jsn-form-content .control-group.ui-state-highlight {
	background-color: transparent !important;
	border-color: transparent !important;
}

.flying-form .popup-form .jsn-column-item.jsn-uniform-others textarea.jsn-value-Others {
	width: 255px !important;
	height: 20px;
}

.flying-form .popup-form .form-actions {
	padding: 0;
	padding-top: 10px;
	margin-top: 5px;
	margin-bottom: 5px;
	background: transparent;
}

.flying-form .popup-form .form-actions .btn-toolbar {
	margin-top: 0;
}

.flying-form .popup-form .form-actions .btn-toolbar .jsn-form-submit {
	width: 270px;
	background: #2baaff;
	border: none;
	box-shadow: none;
	text-shadow: none;
	margin-left: 0;
	/*margin: -20px 0 20px 10px;*/
	margin: 0px 0 20px 10px;
	padding: 10px 0;
	font-weight: bold;
}

/* Close Button */
	
.flying-form .popup-form .close-div {
	position: absolute;
	top: -10px;
	left: -10px;
	background-color: #222;
	border-radius: 50px;
	width: 20px;
	height: 20px;
	line-height: 20px;
	text-align: center;
}

.flying-form .popup-form .close-div i {
	color: #eee;
	margin: 0;
}

.flying-form a.close-div {
	display: none;
}

.flying-form:hover a.close-div {
	display: block;
}

JS Dependancies (Joomla / External / 3rd Party)

  • Cookie Supportjquery.cookie.js - You can probably get a newer version of this from the usual sources, but you can click on the filename and download from it from this page. Also this library has been referenced in the HTML (Bottom Content) code below.

HTML (Top Content)

<!-- Top Content -->
<div class="popup-form animated slideInRight">
	<h2 class="popup-title">You expect the next QuantumWarp survey will be about:</h2>

The form will be rendered in-between these code blocks

HTML (Bottom Content)

<!-- Bottom Content -->
	<a href="#" class="close-div"><i class="fa fa-close"></i></a>
</div>

<script src="/images/kb/2016/814/jquery.cookie.js"></script>

<script>
	(function($) {
		$(document).ready(function() {
			//$.cookie('flying-form', '0');
			$(".close-div").click(function() {
				$.cookie('flying-form', '1');
				$(".popup-form").hide();
			});

			$(".flying-form .jsn-form-submit").click(function() {
				$.cookie('flying-form', '1');
				$(".flying-form .jsn-form-content").fadeOut('slow');
				$(".flying-form .form-actions").fadeOut('slow');
				sheet = document.styleSheets[0];
				sheet.insertRule(".flying-form .jsn-form-content, .flying-form .form-actions { display: none !important }", 1);
			});

			if ($.cookie('flying-form') != 1) {
				$(".flying-form").fadeIn('slow');
			}
		});
	})((window.JoomlaShine && JoomlaShine.jQuery) ? JoomlaShine.jQuery : jQuery);
</script>

Notes

  • To configure Uniform for this Flying Form effect
    • Add the CSS code to your custom.css file
    • and the load the jquery.cookie.js into your modules folder (ie images/modules/814/)
    • Create your form as a module, I called my Flying Form
    • Add flying-form as a module suffix
    • Disable the WYSIWYG in both the 'Top Content' and 'Bottom Content' boxes
    • Paste the HTML (Top Content) in to the 'Top Content' box
    • Paste the HTML (Bottom Content) in to the 'Bottom Content' box
    • Select the Stick Leftbottom [stick-leftbottom] position (or selected position)
    • Publish Module
  • To make this code work for anymodule or to slide in other code
    • create a Custom HTML module with flying-form module suffix
    • Just combine the HTML snippets and paste this into the Custom HTML module
    • Paste you new module content inbetween the HTML blocks
    • publish to your select module position
    • Save
  • The close button uses Font Awesome in the HTML and some CSS styling.
    <a href="#" class="close-div"><i class="fa fa-close"></i></a>
  • The cookie storing of the user closing the slider does not seem to work. Code look correct though.
  • Using radio selecter keeps the form short.

 

Published in Packages

This is a great little snippet to add phone numbers into the topbar and when displayed in mobile are centered and on seperate lines so everything looks nice.

Tel: 0800 123 4567 Mobile: 07777 123 456

HTML

<p style="text-align: center;">
	<span style="font-size: 24pt;">
		<span style="display: inline-block; white-space: nowrap; margin-top: 5px;">Tel: 0800 123 4567</span>  <span style="display: inline-block; white-space: nowrap; padding-top: 5px;">Mobile: 07777 123 456</span>
	</span>
</p>

 

Published in Joomlashine
Page 22 of 95