Tuesday, 30 October 2012

Where to stick a function in your MVC Joomla Module

The situation was this:  I had some code copied from a website that I want to put in the output of the module.

Even if I wanted to ( which I don't ) I wouldn't be able to copy and paste it into the tmpl/default.php file; as some of the code is built into function. 

Here's what you can do with the functions; so that you can use them from this file or anywhere else in the module. 

OPEN your helper.php  or controller.php file and put the function before the closing }


you can then call up this function with something like.

TheNameOfHelperControllerClass::functionName($value1)



Monday, 29 October 2012

Renewal for SSL Certificate hasn't worked

If your SSL certificate renewal hasn't been automatically done then it's probably because you haven't replied to the email that has been sent to you at admin@yourwebsite.com.   look for it and reply. 



Friday, 19 October 2012

Wordpress - Add a Widget space to a template and add a widget to it.

This is a simple task that any developer making changes to a Wordpress template will need to know.


It's pretty simple; theres two elements to it. Firstly to make sure it's picked up in your admin then edit function.php  - and add it to the template itself.

in function.php ( in your template folder )

the code here for me was


if 

( function_exists('register_sidebars') )
    register_sidebar();



?>


and the call up in the template is




to use multiple widget areas I changed function.php to


if ( function_exists('register_sidebars') ){
    register_sidebar(array(
    'name' => 'Right Sidebar',
    ));
    register_sidebar(array(
    'name' => 'Top Middle',
    ));
}
?>

and the call up needs to be changed to - if you get the gist.

                                       if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Top Middle') ) : endif;                    ?>






Adding a Twitter Feed to your Blogga Wordpress Theme

Phew !  Well this ended up being a real struggle in the end. 

My simple aim was to get the Twitter feed working in my Blogga theme. 

At first my issue was to get the Plugin to work at all.  I thought it may well to with the Twitter RSS Feed API changes

After making the changes in TwitterBundle in the theme folder, I could still not get it to work.  So I then installed a whole heap of other Twitter plugins to see if I could get them to work.  To no avial.

After reading comments about Twitter Widget Pro and seeing that others have it working since these changes I loaded the plugin on a clean installation of the same version of Wordpress.  It worked ! 

Telling me that it must be a conflict. ! 

I then tried turning off all other Widgets - which didn't effect anything.

The solution was to go into my theme; through the left hand side menu in wp-admin/

> click on 'twitter & RSS'   and change 'Enable Twitter' to NO.



 This gets the plugin working - but it doesn't look so great .


Check out Customise Twitter Widget Pro but BACKUP first as these changes blew up on me a couple of times.

However in the end I got it to look like this




I've included my CSS underneath  and I also made this change to code added to display a twitter bird instead of the customers image.

OPEN wp-content/plugins/twitter-widget-pro/wp-twitter-widget.php

comment out

$img = $this->_api_url . 'users/profile_image';
        $img = add_query_arg( array( 'screen_name' => $user->screen_name ), $img );
        $img = add_query_arg( array( 'size' => $args['avatar'] ), $img );

and replace with

$img = 'http://www.hardycarpets.net/images/chirpChirp.jpg';

or whatever your image is .

Wednesday, 17 October 2012

Twitter feeds not working in Wordpress anymore - October 2012

wickett twitter Error: Twitter did not respond. Please wait a few minutes and refresh this page.

And other Wordpress Twitter Plugins seem to have the same issue.  

I found this post Fix for twitter feed error

For the plugin Wickett Twitter Widget  -  I fixed it by changing this line of code.

OPEN
wp-content/plugins/wickett-twitter-widget/wickett-twitter-widget.php

find ( around line 200 )

$instance['account'] = str_replace('http://www.twitter.com/', '', $instance['account']);


REPLACE WITH

$instance['account'] = str_replace('http://api.twitter.com/1/', '', $instance['account']);

What adds the Page content to the page in a Wordpress theme - Developer level

Ok here's the issue.  On the Wordpress theme I'm using ( Blogga ) they have a page which calls up dynamic code to display team members .  However I'd also like to use text underneath to this page.

Here's what you need to do .  At the top of the page add


the_post();

?>

and where you want to show the page content add



you can take a look at this page at Team Page Modified.

Sunday, 14 October 2012

A blogger .com andriod app test

If youve found this blog then I wonder why!  as its my most pointless post I've written to date.  If you are reading this then it at least shows that the Blogger Android App works.  i've attached a random picture too, to see if that works.

Check my website little ripples for a blog later tonight.

This is blogged from Newquay but the picture is from the camel trail,