Tuesday, 31 January 2012

joomla rentalot plus - combining the calendar view and booking page - notes

In Joomla Rentalot Plus I'm trying to combine a page so that the calendar view appears above the date selector.

This is what I know -

* the calendar is called on the page components/com_rentalotplus/views/daily/view.html.php

at line 136 we see the code

[code]// draw the daily view

if (count($items) == 0)
echo '

'.JText::_('COM_RENTALOTPLUS_NO_PRICE_UNIT').' ('.$date_from.' - '.$date_to.')

echo LA_daily_view::draw_daily_view($items, $classic_model, $this->config_data, $unit_id, $this->current_currency_row->code, $currency_symbol, $currency_format);

I would like this view to be seen as well at this point in the code


under line 98.

The problem i have is calling from outside an object and not use $this

Monday, 30 January 2012

Duplicated site is running slower - hacked site fixed be checking reWrite rules

After transferring a website from a testing server to a live environment I noticed that the speed of requests and page loading time had severlly deteriorated.

If you get this problem then firstly I'd suggest using Mozilla Firefox browser and the Firebug tool.

Click on the 'net' tab and you'll then be given a break down of what 's wrong.

in this case it was a virus, I realised the page was calling a mysterious folder and it's contents. The contents where easily deleted but the folder wasn't real and created by a ReWrite Rule. The next port of call was the .htaccess file.

which read

RewriteEngine On
RewriteRule ^c/(.*) wp-blog.php?p=$1
RewriteRule ^icons/(.*) 109a0ca/$1
RewriteRule ^sitemap.xml wp-blog.php?sitemap=1
RewriteRule ^robots.txt wp-blog.php?robots=1
RewriteRule ^feed/ wp-blog.php?feed=1

on the site I was transferring from there was no Rewrite rules, and therefore no problem.

I changed the .htaccess file to this

RewriteEngine Off
RewriteCond %{REQUEST_URI} !^/c

to doubly make sure nothing is send to the 'c' folder, where the problem resided.

The problem with loading times is now sorted.

Friday, 27 January 2012

Getting a Booking System to work on Joomla

Getting a Booking System to work on Joomla

I'm attempting to set up a booking system and the went and paid for the component BookIT - however I tried the installation in Joomla 2.5 but it didn't work. And also in Joomla 1.7 with no joy either. However I can get it to work in Joomla 1.5 .

The problem seems to be with the calendar showing. However I haven't sorted all issues and am thinking I will probably use a different solution.

Joomla 2.5 installation tips !

I've just installed Joomla 2.5 and had to work a couple of things out for myself as theres no installation guide for this version at the time of writing. Infact the readme text included was for upgrading from 1.7 .

* download the full Joomla 2.5 package here

* install on your server and head for the installation folder /installation

* follow instructions and that;s it

However I then got the following message

'A file permissions error has occurred.'

You then need to change all your folder permissions to 755 and files to 644.

Except for the configuration.php file which should be 444

AFTER DOING THIS I WAS STILL GETTING THE 'A file permissions error has occurred.'

I googled 'joomla 2.5 installation A file permissions error has occurred.'

the solution was that I overlooked the public_html/ folder (doh!) that needs to be 755 also.


Thursday, 26 January 2012

getting rid of white space from text using PHP

A simple thing to do, but theres a ton of ways to do it. I believe this is the best way to get rid of white space from text using PHP

[code] $sPattern = '/\s*/m';
$sReplace = '';
$bacs_end_date = preg_replace( $sPattern, $sReplace, $bacs_end_date );
$bacs_start_date = preg_replace( $sPattern, $sReplace, $bacs_start_date );[/code]

Saturday, 21 January 2012

Removing the 'Handles' or Pointers from News Pro GK4 Module

Removing the 'Handles' or Pointers from News Pro GK4 Module

This post is relevant to those who are using the News Pro GK4 Module in the module mode 'News Slideshow' and you want to get rid of the arrows top and bottom of the boxes.

Open /modules/mod_news_pro_gk4/interface/css/style.portal.mode.2.css

EDIT OUT these lines

nspMainPortalMode2 .nspArt.active >div > div { background: transparent url('../images/nsp_portal_mode_2_img.png') no-repeat center top; }
.nspMainPortalMode2 .nspArt.active > div > div > div { background: transparent url('../images/nsp_portal_mode_2_img.png') no-repeat center bottom; }

Friday, 20 January 2012

jquery css how to make text fade in fade out


Monday, 16 January 2012

Using Joomla's DBO

After using the tutorial for making a component one thing it doesn't go into is coming off the beaten track when it comes to database calls. Here's a page that I've found pretty help full.


What I'm trying to do is get a list of products from virtuemart.

$db = JFactory::getDBO();
$query = "SELECT * FROM #__example2";
$rows = $db->loadRowList();

to be continued ...

Transferred joomla site to non https site

Joomla turn off 'Force SSL' in mysql

Actually it's not set in mysql - you'll need to OPEN configuration.php


var $force_ssl = '1';


var $force_ssl = '0';

and always with a Joomla Virtuemart site transfer you'll need to change the address saved in Virtuemart - read this blog ->
'duplicated joomla and virtuemart site goes to old website address when accessing virtuemart through the backend'

Monday, 9 January 2012

how to stick google analytics in < head > on wordpress website

this is the folder you need to find.


then look for the /head tag.