Back again :/

January 23, 2012 at 2:12 pm | Posted in Uncategorized | Leave a comment

Hello!

 

Long time no see and thanks for coming back to see if there was an update!

I’m just sat here in my free period, knowing I should be doing some marking or planning, but with the morning I’ve had it’s gone out the window, which most probably means a late night tonight.

I know I haven’t updated in a long long time. And an awful lot has gone on.

 

Give me time to try to document it here.

 

November: – Started teaching High School ICT again after far too much time out of the classroom do to the sheer lack of jobs. Not Fun L

Continued with my old post of ICT teacher – forgot how much fun teaching secondary ict under an organised HOD can me! Wow! Soo many cool SOW to play with!

 

December:-  Still working in high school, wondering how long I will actually be employed for. Still enjoying it, pity the money situation hasn’t worked itself out yet. Hopefully soon!

 

January : – Still teaching in high school and realising how much I do actually enjoy it!

Fantastic SOW to work with – App development with year 9! I’m running with this for the school and making it the best it can be. Even enlisting the help of a local Android developer. Sounds cool? Will definitely need to keep people updated about this.

 

Anyways  January is nearly finished and done with. I do need to get back into developing my website. And sort out my planning and marking :P will be done soon! Promise (it’s now on my todo list!)

Recoding

January 8, 2012 at 4:08 pm | Posted in Techy stuff | Leave a comment

So I began to recode my joomla theme to finally fix the errors in www.jamesashton20.co.uk well not so much errors. More graphical imperfections. After after spending my time wi theme generators and template builders. I decided that I couldn’t find a theme or created one much better than I already had. Oh well. We’ll stick with the design. Give the background a make over and change a few of the colours and font styles. Only too a few hours to rewrite a some lines of CSS code. Gosh I’m gosh I’m getting rusty!

Hmm. What next? Another blog post or some content for the site?

Using social bookmarks

November 13, 2011 at 8:42 am | Posted in Uncategorized | Leave a comment
Tags: , , , , , ,

Can any one make sense of this, it will display any other social networking button except twitter! it’s really irratating me now, i can’t seen to find the problem in this plug in
Code below and the plugin is called sexy bookmarks
params->get(add_css) == 1) {
$doc->addStyleSheet(SEXY_URL.”/style.css?ver=”.SEXY_VER);
}

// Not yet available
//$doc->addScript(SEXY_URL.”/sexybookmarks.js”);

if(!$this->checkCategories($article)) return;

if($this->params->get(‘manual’) != 1 && !$this->searchAntiBookmarkTag($article)) {
$article->text = $this->deleteBookmarkTag($article->text);
if($this->params->get(‘article’) == 1 && JRequest::getVar(‘view’) == ‘article’) {
$article->text = $article->text.$this->fetchSexyHTML($article);
} elseif($this->params->get(‘frontpage’) == 1 && JRequest::getVar(‘view’) == ‘frontpage’) {
$article->text = $article->text.$this->fetchSexyHTML($article);
} elseif($this->params->get(‘blog’) == 1 && JRequest::getVar(‘layout’) == ‘blog’) {
$article->text = $article->text.$this->fetchSexyHTML($article);
} else {
return;
}
} else {
$article->text = $this->searchBookmarkTag($article->text);
}

return;
}

/**
* Category check. Is the articles category allowed to print
* the bookmarks menu
*
* @param $article
* @return bool
*/
function checkCategories(&$article) {
if($this->params->get(‘include_cat’) == “”) return true;

$include_array = explode(“,”, $this->params->get(‘include_cat’));

if(in_array($article->catid, $include_array)) {
return true;
} else {
return false;
}

}

/**
* Manually insertion of the Bookmarks Menu
*
* @param object $article
* @return object
*/
function searchBookmarkTag($text) {
$searchtag = “{sexybookmark}”;

if(substr_count($text, $searchtag) >= 1) {
$text = $text.$this->fetchSexyHTML($article);
} else {
$text = $text;
}

$text = $this->deleteBookmarkTag($text);
return $text;
}

/**
* Check for existing {nosexybookmark} in articles
*
* @param object $article
* @return bool
*/
function searchAntiBookmarkTag(&$article) {
$searchtag = “{nosexybookmark}”;
if(substr_count($article->text, $searchtag) >= 1) {
$article->text = $this->deleteAntiBookmarkTag($article->text);
return true;
}

return false;
}

/**
* Fetches the required background image
*
* @return string
*/
function fetchBackground() {
if($this->params->get(‘bgimg’) == ‘caring’) {
return ” sexy-bookmarks-bg-caring”;
} elseif($this->params->get(‘bgimg’) == ‘sexy’) {
return ” sexy-bookmarks-bg-sexy”;
} elseif($this->params->get(‘bgimg’) == ‘wealth’) {
return ” sexy-bookmarks-bg-wealth”;
} elseif($this->params->get(‘bgimg’) == ‘care-old’) {
return ” sexy-bookmarks-bg-caring-old”;
} elseif($this->params->get(‘bgimg’) == ‘love’) {
return ” sexy-bookmarks-bg-love”;
} else {
return;
}
}

/**
* Core function to add the Sexy Bookmarks menu to the article
*
* @param object $article
* @return mixed
*/
function fetchSexyHTML(&$article) {

$echo_bookmarks = false;

$j_config =& JFactory::getConfig();

if($this->params->get(‘article’) == 1 && JRequest::getVar(‘view’) == ‘article’) {
$url =& JFactory::getURI();
$perms = $url->toString();
$perms = str_replace( ‘&’, ‘&’, $perms );
$echo_bookmarks = true;
} else {
$user =& JFactory::getUser();
if ($article->access get(‘aid’, 0)) {
jimport(‘joomla.application.component.helper’);
$perms = JRoute::_($this->constructFrontpageUrl($article), false, -1);
$echo_bookmarks = true;
} else {
$echo_bookmarks = false;
}
}

if($j_config->getValue(‘config.sef’) != 1) $perms = urlencode($perms);

$title = urlencode($article->title);
$title = str_replace(‘%3A’,':’,$title);
$title = str_replace(‘%3F’,'?’,$title);
$title = str_replace(‘%C3%B9′,’ù’,$title);
$title = str_replace(‘%C3%A0′,’à’,$title);
$title = str_replace(‘%C3%A8′,’è’,$title);
$title = str_replace(‘%C3%AC’,'ì’,$title);
$title = str_replace(‘%C3%B2′,’ò’,$title);

$short_title = substr($title, 0, 60).”…”;

$mail_subject = urlencode(substr($title, 0, 60).”…”);
$mail_subject = str_replace(‘+’,'%20′,$mail_subject);
$mail_subject = str_replace(“’”,”‘”,$mail_subject);

$sexy_content = urlencode(strip_tags(substr($article->text, 0, 220).”[..]“));
//$sexy_content = urlencode(substr(strip_tags(strip_shortcodes(get_the_content())),0,300));
$sexy_content = str_replace(‘+’,'%20′,$sexy_content);
$sexy_content = str_replace(“’”,”‘”,$sexy_content);

$post_summary = stripslashes($sexy_content);

//$sexy_teaser = strip_tags(substr($article->text, 0, 250).”[..]“);
$sexy_teaser = $sexy_content;
$strip_teaser = stripslashes($sexy_teaser);

$site_name = $title;

if($this->params->get(‘twitter’) == 1 && $this->params->get(‘twittid’) != “”) {
$short_url = $this->getShortUrl($perms);
$post_by = “RT+@”.$this->params->get(‘twittid’).”:+”;
}

if ($this->params->get(‘twittley’) == 1 && $article->metakey != ”) {
$twittley_cat = $this->params->get(‘twittcat’);
$twittley_tags = $article->metakey;
} elseif($this->params->get(‘twittley’) == 1 && $this->params->get(‘twittcat’) != ”) {
$twittley_cat = $this->params->get(‘twittcat’);
$twittley_tags = $this->params->get(‘defaulttags’);
}

/**
* Not yet available
* if($this->params->get(‘autoexpand’) == 1) {
* $add_class = ” sexy-bookmarks-expand”;
* } else {
* //$style = ‘style=”‘$this->params->get(‘xtrastyle’).’”‘;
* }
*/
$style = ‘style=”‘.$this->params->get(‘xtrastyle’).’”‘;

$socials = “\n”.’

fetchBackground().’” ‘.$style.’ id=”sexy-bookmarks”>
    ‘.
    ($this->params->get(‘scriptstyle’) == 1 ? $this->fetchHTMLSnippet(“sexy-scriptstyle”, “http://scriptandstyle.com/submit?url=”.$perms.”&title=”.$title, JText::_(“Submit this to Script Style”)) : ”).

    ($this->params->get(‘blinklist’) == 1 ? $this->fetchHTMLSnippet(“sexy-blinklist”, “http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url=”.$perms.”&Title=”.$title, JText::_(“Share this on Blinklist”)) : ”).

    ($this->params->get(‘delicious’) == 1 ? $this->fetchHTMLSnippet(“sexy-delicious”, “http://del.icio.us/post?url=”.$perms.”&title=”.$title, JText::_(“Share this on del.icio.us”)) : ”).

    ($this->params->get(‘digg’) == 1 ? $this->fetchHTMLSnippet(“sexy-digg”, “http://digg.com/submit?phase=2&url=”.$perms.”&title=”.$title, JText::_(“Digg this!”)) : ”).

    ($this->params->get(‘reddit’) == 1 ? $this->fetchHTMLSnippet(“sexy-reddit”, “http://reddit.com/submit?url=”.$perms.”&title=”.$title, JText::_(“Share this on Reddit”)) : ”).

    //($this->params->get(‘yahoo’) == 1 ? $this->fetchHTMLSnippet(“sexy-yahoomyweb”, “http://myweb2.search.yahoo.com/myresults/bookmarklet?t=”.$title.”&u=”.$perms, JText::_(“Save this to Yahoo MyWeb”)) : ”).

    ($this->params->get(‘stumpleupon’) == 1 ? $this->fetchHTMLSnippet(“sexy-stumbleupon”, “http://www.stumbleupon.com/submit?url=”.$perms.”&title=”.$title, JText::_(“Stumble upon something good? Share it on StumbleUpon”)) : ”).

    ($this->params->get(‘technorati’) == 1 ? $this->fetchHTMLSnippet(“sexy-technorati”, “http://technorati.com/faves?add=”.$perms, JText::_(“Share this on Technorati”)) : ”).

    ($this->params->get(‘mixx’) == 1 ? $this->fetchHTMLSnippet(“sexy-mixx”, “http://www.mixx.com/submit?page_url=”.$perms.”&title=”.$title, JText::_(“Share this on Mixx”)) : ”).

    ($this->params->get(‘myspace’) == 1 ? $this->fetchHTMLSnippet(“sexy-myspace”, “http://www.myspace.com/Modules/PostTo/Pages/?u=”.$perms.”&t=”.$title, JText::_(“Post this to MySpace”)) : ”).

    ($this->params->get(‘designfloat’) == 1 ? $this->fetchHTMLSnippet(“sexy-designfloat”, “http://www.designfloat.com/submit.php?url=”.$perms.”&title=”.$title, JText::_(“Submit this to DesignFloat”)) : ”).

    ($this->params->get(‘facebook’) == 1 ? $this->fetchHTMLSnippet(“sexy-facebook”, “http://www.facebook.com/share.php?u=”.$perms.”&t=”.$title, JText::_(“Share this on Facebook”)) : ”).

    ($this->params->get(‘twitter’) == 1 && $this->params->get(‘twittid’) != “” && $short_url != “” ? $this->fetchHTMLSnippet(“sexy-twitter”, ‘http://www.twitter.com/home?status=’.$post_by.’+’.$short_title.’+-+’.$short_url, JText::_(“Tweet This!”)) : ”).

    ($this->params->get(‘devmarks’) == 1 ? $this->fetchHTMLSnippet(“sexy-devmarks”, ‘http://devmarks.com/index.php?posttext=’.$post_summary.’&posturl=’.$perms.’&posttitle=’.$title, JText::_(“Share this on Devmarks”)) : ”).

    ($this->params->get(‘newsvine’) == 1 ? $this->fetchHTMLSnippet(“sexy-newsvine”, “http://www.newsvine.com/_tools/seed&save?u=”.$perms.”&h=”.$title, JText::_(“Seed this on Newsvine”)) : ”).

    ($this->params->get(‘linkedin’) == 1 ? $this->fetchHTMLSnippet(“sexy-linkedin”, ‘http://www.linkedin.com/shareArticle?mini=true&url=’.$perms.’&title=’.$title.’&summary=’.$post_summary.’&source=’.$site_name, JText::_(“Share this on Linkedin”)) : ”).

    ($this->params->get(‘google’) == 1 ? $this->fetchHTMLSnippet(“sexy-google”, “http://www.google.com/bookmarks/mark?op=add&bkmk=”.$perms.”title=”.$title, JText::_(“Add this to Google Bookmarks”)) : ”).

    //($this->params->get(‘email’) == 1 ? $this->fetchHTMLSnippet(“sexy-mail”, ‘mailto:?subject=’.$mail_subject.’&body=’.$strip_teaser.’ – ‘.$perms, JText::_(“Email this to a friend?”)) : ”).

    ($this->params->get(‘misterwong’) == 1 ? $this->fetchHTMLSnippet(“sexy-misterwong”, “http://www.mister-wong.com/addurl/?bm_url=”.$perms.”&bm_description=”.$title.”&plugin=sexybookmarks”, JText::_(“Add this to Mister Wong”)) : ”).

    ($this->params->get(‘izeby’) == 1 ? $this->fetchHTMLSnippet(“sexy-izeby”, “http://izeby.com/add_story.php?story_url=”.$perms, JText::_(“Add this to Izeby”)) : ”).

    ($this->params->get(‘diigo’) == 1 ? $this->fetchHTMLSnippet(“sexy-diigo”, “http://www.diigo.com/post?url=”.$perms.”&title=”.$title.”&desc=”.$sexy_teaser, JText::_(“Post this on Diigo”)) : ”).

    //($this->params->get(‘tumblr’) == 1 ? $this->fetchHTMLSnippet(“sexy-tumblr”, “http://www.tumblr.com/share?v=3&u=”.$perms.”&t=”.$title.”&s=”, JText::_(“Share this on Tumblr”)) : ”).

    ($this->params->get(‘tipd’) == 1 ? $this->fetchHTMLSnippet(“sexy-tipd”, “http://tipd.com/submit.php?url=”.$title, JText::_(“Share this on Tipd”)) : ”).

    ($this->params->get(‘pfbuzz’) == 1 ? $this->fetchHTMLSnippet(“sexy-pfbuzz”, “http://pfbuzz.com/submit?url=”.$perms.”&title=”.$title, JText::_(“Share this on PFBuzz”)) : ”).

    // neue…
    ($this->params->get(‘friendfeed’) == 1 ? $this->fetchHTMLSnippet(“sexy-friendfeed”, “http://www.friendfeed.com/share?title=”.$title.”&link=”.$perms, JText::_(“Share this on FriendFeed”)) : ”).

    ($this->params->get(‘blogmarks’) == 1 ? $this->fetchHTMLSnippet(“sexy-blogmarks”, “http://blogmarks.net/my/new.php?mini=1&simple=1&url=”.$perms.”&title=”.$title, JText::_(“Mark this on BlogMarks”)) : ”).

    ($this->params->get(‘twittley’) == 1 ? $this->fetchHTMLSnippet(“sexy-twittley”, “http://twittley.com/submit/?title=”.$title.”&url=”.$perms.”&desc=”.$post_summary.”&pcat=”.$twittley_cat.”&tags=”.$twittley_tags, JText::_(“Submit this to Twittley”)) : ”).

    ($this->params->get(‘fwisp’) == 1 ? $this->fetchHTMLSnippet(“sexy-fwisp”, “http://fwisp.com/submit?url=”.$perms, JText::_(“Share this on Fwisp”)) : ”).

‘;

if($echo_bookmarks === true) {
return $socials;
} else {
return;
}

}

/**
* Builds each single menu element as a HTML list element
*
* @param string $class
* @param string $url
* @param string $title
* @return string
*/
function fetchHTMLSnippet($class, $url, $title) {
if($this->params->get(‘add_nofollow’) == 1) {
$relopt = “nofollow”;
} else {
$relopt = “”;
}

if($this->params->get(‘open_in_newwindow’) == 1) {
$tarwin = “_blank”;
} else {
$tarwin = “_self”;
}

return “\n”.’

  • ‘;
    }

    /**
    * Helper function to build the Frontpage url. Not necessary on article pages
    *
    * @param object $article
    * @return string
    */
    function constructFrontpageUrl(&$article) {

    $needles = array(
    ‘article’ => (int) $article->slug,
    ‘category’ => (int) $article->catslug,
    ‘section’ => (int) $article->sectionid
    );

    $link = ‘index.php?option=com_content&view=article&id=’. $article->slug;

    if($article->catslug) {
    $link .= ‘&catid=’.$article->catslug;
    }

    if($item = plgContentSexyBookmarks::_findItem($needles)) {
    $link .= ‘&Itemid=’.$item->id;
    }

    return $link;
    }

    /**
    * Delete manual bookmark tag from Text
    *
    * @param string $article
    * @return string
    */
    function deleteBookmarkTag($text) {
    return str_replace(‘{sexybookmark}’, ”, $text);
    }

    /**
    * Delete inserted bookmark tag to avoid displaying
    * sexy bookmarks menu
    *
    * @param string $text
    * @return string
    */
    function deleteAntiBookmarkTag($text) {
    return str_replace(‘{nosexybookmark}’, ”, $text);
    }

    /**
    * Helper function to create short url’s for Twitter
    *
    *
    * @param string $url
    * @return string
    */
    function getShortUrl($url) {

    switch ($this->params->get(‘url_service’)) {
    case ‘tinyurl’:
    $api_url = ‘http://tinyurl.com/api-create.php?url=’.$url;
    break;
    case ‘is.gd’:
    $api_url = ‘http://is.gd/api.php?longurl=’.$url;
    break;
    case ‘rims’:
    $api_url = ‘http://ri.ms/api-create.php?url=’.$url;
    break;
    case ‘tinyarro’:
    $api_url = ‘http://tinyarro.ws/api-create.php?url=’.$url;
    break;
    }

    $ch = curl_init();
    $timeout = 5;
    curl_setopt($ch,CURLOPT_URL,$api_url);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
    $data = curl_exec($ch);
    curl_close($ch);
    return $data;
    }

    /**
    * Finds the Itemid for the correct Url on the frontpage
    *
    * @param array $needles
    * @return object
    */
    function _findItem($needles) {
    $component =& JComponentHelper::getComponent(‘com_content’);

    $menus = &JApplication::getMenu(‘site’, array());
    $items = $menus->getItems(‘componentid’, $component->id);

    $match = null;

    foreach($needles as $needle => $id)
    {
    foreach($items as $item)
    {
    if ((@$item->query['view'] == $needle) && (@$item->query['id'] == $id)) {
    $match = $item;
    break;
    }
    }

    if(isset($match)) {
    break;
    }
    }

    return $match;
    }

    }
    ?>

    Fixed

    November 11, 2011 at 11:54 am | Posted in Techy stuff | Leave a comment
    Tags: , , , , , , , , , ,

    The ‘facebook won’t load’ problem!

    Ok so first I ran all the anti viruses and malware detectors I could think of to clean out the system and make it fresh as a daisy again :)
    I used:

    Malwareby
    Hitman Pro
    SpyBot S&D

    After that I could run MS Security Essentials again for one final deep clean.

    Solution came to me in a flash of light!

    I remembered a file that I used when I was messing around with iTunes a while ago and also used the same file for messing with netw0rk paths at home.

    In location C:\windows\system32\drivers\etc
    there is a file called hosts, now every program on windows uses this basic file to determine where to look for information when connecting to the internet. and this was where my problem lay!

    the virus had written in it’s own ip and url forwarding code!

    simply delete out the code or put a hash before it so it’s not read when the file is.

    and TaDa! jobs a good ‘un :)

    Computer Repair

    November 11, 2011 at 11:46 am | Posted in Uncategorized | Leave a comment

    So I was given my friends laptop last night with simply – ‘it won’t load facebook’ after trying to diagnose the problem on site I confirmed the thing was riddled with viruses. So I’ve brought it home and got round to having a look at it this morning. I’ve ran several anti virus and anti malware apps and removed all the viruses it seems.

    I mean this virus was overwriting MS security essentials! (enhanced protention nonsense – GOOGLE IT)

    so i’ve ran

    Hitman Pro
    Malwareby
    Spybot S&D

    And still this thing is refusing to load facebook? It loads every other website I tested it with but still. have you ever heard anything so ridiculous?

     

    Blogging

    November 10, 2011 at 8:31 am | Posted in Life and everything in it, Techy stuff | Leave a comment

    Getting back into this blogging lark. I suppose it shows what you can do with so much time on your hands!
    And as I mentioned on twitter e other day I was going to design a website for my own scout group. I’m putting this on hold for the time being and going along the Facebook group route. It seems after talking to parents that many of them are on Facebook and spend a lot of time on there! So it only seems to make sense to use it to our advantage? Do your schools or scout groups use fb? If so. How do they do it? Can you post a link to it here? So I can have a nosey?

    Ta!
    James!

    Google

    November 10, 2011 at 8:24 am | Posted in Techy stuff | Leave a comment

    Can someone google the phrase. Heretics network scouts. And tell me where my scouting website comes in, in the top 3 pages? On my computers it’s third on the first page. But I fear it’s probably because I have it so many times!

    The site that should come up is http://Hereticsnetwork.getenjoyment.net

    Cheers in advance!

    James

    Leeds heretics network scouts

    November 4, 2011 at 8:48 am | Posted in Life and everything in it, Techy stuff | Leave a comment
    Tags: , , , , , , , , , , , , , , , ,

    Well the website I’ve been building for the last week is now officially up and running.
    It’s for the Leeds Heretics Network Scouts, scouting for 18-25 year olds! :)
    Feel free to have a look and let me know if you think I’ve missed anything :)
    Just stick it in a comment here if you wish or tweet at me jamesashton20

    Leeds heretics network scouts!

    Fantastic

    November 2, 2011 at 11:36 am | Posted in Techy stuff | Leave a comment

    Just found a fantastic resource for joomla help and information. Little bit upset I didn’t come across this earlier as all the answers I’ve wanted seem to be here! Lol

    Just installed a YouTube video embed plug in. Looking good. Site nearly ready for all the general public now :)

    Oh resource website:
    Www.howtojoomla.net
    Brill! :)

    Semi success

    November 2, 2011 at 8:18 am | Posted in Techy stuff | Leave a comment

    The vinaora visitor counter installed incredibly easy. And works incredibly well :) 8 total visits since yesterday. At least 2 of them are me. As it only counts unique hits. Which is still pretty cool :) at 8 per day that’ll be 80 in ten days! Lol we shall see how many people are interest in joining network scouts in Leeds :)

    Today. Is to try to find a solution to the contact problem. Now it’s oil ways easy just to write on a page – emails us if you want to get involved – but it isn’t always the neatest oar tidiest idea. So I’m going to opt for a form on the website. However yesterday I couldn’t seem to find a form builder that was and easy to use. To continue today :)

    Next Page »

    Blog at WordPress.com | Theme: Pool by Borja Fernandez.
    Entries and comments feeds.

    Follow

    Get every new post delivered to your Inbox.

    Join 3,611 other followers