Cyber-Attackers

By MuJo a.k.a eLHacKeR & Return0fEvilzz

www.cyber-attackers.org // www.mujo.in



HAcked by EJDER ;)

Cyber-Attackers

By MuJo a.k.a eLHacKeR & Return0fEvilzz

www.cyber-attackers.org // www.mujo.in



HAcked by EJDER ;)
ThumNet http://blog.thumnet.com - Jeffrey Tummers Sat, 11 Feb 2012 23:32:06 +0000 en hourly 1 http://wordpress.org/?v=3.3.2 Updated to Graphene theme http://blog.thumnet.com/updated-to-graphene-theme/ http://blog.thumnet.com/updated-to-graphene-theme/#comments Fri, 23 Sep 2011 21:33:48 +0000 ThumNet http://blog.thumnet.com/?p=226

Continue reading »]]> I’ve been a co-developer for the WordPress Graphene Theme since February 2011, and it’s about time a starting using this great theme on my own blog ;)

You can follow our development at Google Code – http://code.google.com/p/graphene/, here you can also report bugs and request new features.

The original developer and designer of the theme is Syahir Hakim, on his blog you can read a bit more about the theme.

]]> http://blog.thumnet.com/updated-to-graphene-theme/feed/ 0
WordPress pages into nested tree array http://blog.thumnet.com/wordpress-pages-into-nested-tree-array/ http://blog.thumnet.com/wordpress-pages-into-nested-tree-array/#comments Fri, 23 Sep 2011 21:18:38 +0000 ThumNet http://blog.thumnet.com/?p=220

Continue reading »]]> I was looking for a way to get a nested array (or tree array) from the pages or posts in WordPress, for a theme I’m currently working on.

If you just want to display the links you could use the wp_list_pages() function.

But this wont get you a nested array, then there are the functions get_pages() and get_posts(). These return a one-dimensional array of pages or posts.

Using this array I’ve written a simple recursive function which creates a nested array.

/**
 * Build a nested tree from an array of posts/pages.
 * @see WordPress::get_pages()
 * @see WordPress::get_posts()
 *
 * @param array $items The array of posts/pages
 * @param int $parentid The parent id to start with
 * @param array $tree
 * @return array The nested pages tree
 */
function thumnet_build_nested_tree($items, $parentid = 0, &$tree = array()) {
    foreach ($items as $key => $item) {
        // we are only interested in the pages that have the current parent
        if ($item->post_parent == $parentid){
            // add the item to the parent node
            $tree[$item->ID] = array('self' => $item, 'children' => array());
            // remove the page from the pages array, so it's not iterated in the recursive call
            unset($items[$key]);
            // call the function recursively, but with the children node as the tree
            thumnet_build_nested_tree($items, $item->ID, $tree[$item->ID]['children']);
        }
        // if the parent page has no children remove the node
        if (count($tree[$item->ID]['children']) == 0){
            unset($tree[$item->ID]['children']);
        }
    }

    return $tree;
}

And not to forget a quick sample on how to use this

$pages = get_pages('sort_column=menu_order');
$tree = thumnet_build_nested_tree($pages);
thumnet_display_nested_tree($tree);

function thumnet_display_nested_tree($items, $indent = 0){
    foreach ($items as $item){
        echo str_repeat('&nbsp;', $indent*3) . (count($item['children']) ? '+' : '-') . ' ' . $item['self']->post_title . '<br />';
        if (count($item['children'])) { thumnet_display_nested_tree($item['children'], $indent+1); }
    }
}

Sample output:

+ Welcome
   + Subpage with children
      - Child 1
      - Child two
   - Subpage without children
- Top level page without children
+ About
   - Who am I
]]> http://blog.thumnet.com/wordpress-pages-into-nested-tree-array/feed/ 0
Install SABnzbd as a service on Windows 2008 http://blog.thumnet.com/install-sabnzbd-as-a-service-windows-2008/ http://blog.thumnet.com/install-sabnzbd-as-a-service-windows-2008/#comments Mon, 13 Dec 2010 18:47:01 +0000 ThumNet http://blog.thumnet.com/?p=209

Continue reading »]]> Until version 0.6.0 is released of SABnzbd it is needed to take manual steps to install SABnzbd as a service. For Windows 2003 this could be achieved using this tutorial.

But for Windows 2008 this is not as easy anymore, therefore I had a look around and came with the following solution:

  1. Download the NSSM (the None Sucking Service Manager) here
  2. Put this file in a Windows PATH location (for example %windir%\system32, or extend the path)
  3. Run the commandline: nssm install sabnzbd (“sabnzbd” is the name for the service)
  4. A UI will popup asking for the location of the sabnzbd.exen file and optional startup parameters (I supplied -b0 for background mode)
  5. For me it was also necessary to setup the service (services.msc) to use the same account I once configured it with, otherwise you’ll end up with the wizard

Afterwards you are able to use net start sabnzbd to start the service and net stop sabnzbd to stop it. To uninstall use nssm remove sabnzbd confirm

That’s it for installing sabnzbd as a service under Windows 2008 (should also work on Windows 7!)

]]> http://blog.thumnet.com/install-sabnzbd-as-a-service-windows-2008/feed/ 0
Automatically connect WebParts on a SharePoint page http://blog.thumnet.com/automatically-connect-webparts-on-sharepoint-page/ http://blog.thumnet.com/automatically-connect-webparts-on-sharepoint-page/#comments Fri, 06 Aug 2010 09:34:55 +0000 Jeffrey Tummers http://blog.thumnet.com/?p=201

Continue reading »]]> For a recent project we had several WebParts (Provider and Consumer webparts) on a page which had to be connected to each other when the page was provisioned by our solution.

Unfortunately this cannot be done within the Module.xml :(

So I created a method which automatically connects the consumer WebParts to their correct provider WebParts.

To do this I basically used the SPLimitedWebPartManager, ProviderConnectionPoint, ConsumerConnectionPoint and some other nice classes.

The method (warning long block of code)

/// <summary>
/// Connects the web parts on page.
/// </summary>
/// <param name="web">The web.</param>
/// <param name="pageUrl">The page URL.</param>
/// <param name="publish">if set to <c>true</c> [publish].</param>
public static void ConnectWebPartsOnPage(SPWeb web, string pageUrl, bool publish)
{
	// get the page from the url
	SPFile page = web.GetFile(pageUrl);

	// make sure the page exists
	if (page.Exists)
	{
		// if the page is checked out, check it in because then the user can do an rollback
		if (page.Level == SPFileLevel.Checkout)
		{
			page.CheckIn("Page was checked out, needs to be checked in before connecting webparts", SPCheckinType.MinorCheckIn);
		}

		// check out the page because we are going to do changes on it
		page.CheckOut();

		// get the webpartmanager for the page
		using (Microsoft.SharePoint.WebPartPages.SPLimitedWebPartManager mgr = page.GetLimitedWebPartManager(PersonalizationScope.Shared))
		{
			try
			{
				// try to connect the webparts on the page
				if (ConnectWebParts(mgr))
				{
					string checkinComment = "Auto connected WebParts on page";

					// webparts are connected so update the page and check it in
					page.Update();
					page.CheckIn(checkinComment);

					if (publish)
					{
						page.Publish(checkinComment);
						page.Approve(checkinComment);
					}
				}
			}
			catch (Exception ex)
			{
				page.UndoCheckOut();
				throw ex;
			}
		}
	}
}

/// <summary>
/// Checks if a WebPart connection exists.
/// </summary>
/// <param name="connections">The connections.</param>
/// <param name="provider">The provider.</param>
/// <param name="consumer">The consumer.</param>
/// <returns></returns>
private static bool WebPartConnectionExist(Microsoft.SharePoint.WebPartPages.SPWebPartConnectionCollection connections,
	System.Web.UI.WebControls.WebParts.WebPart provider, System.Web.UI.WebControls.WebParts.WebPart consumer)
{
	foreach (Microsoft.SharePoint.WebPartPages.SPWebPartConnection conn in connections)
	{
		if (conn.Provider == provider && conn.Consumer == consumer)
		{
			return true;
		}
	}

	return false;
}

/// <summary>
/// Connects the web parts.
/// </summary>
/// <param name="manager">The manager.</param>
/// <returns></returns>
private static bool ConnectWebParts(Microsoft.SharePoint.WebPartPages.SPLimitedWebPartManager manager)
{
	bool connectionMade = false;

	// get the webparts on the page
	Microsoft.SharePoint.WebPartPages.SPLimitedWebPartCollection webparts = manager.WebParts;

	// only continu if there are any webparts
	if (webparts.Count > 0)
	{
		ProviderConnectionPointCollection provColl;
		ConsumerConnectionPointCollection consColl;
		// walk through all the webparts on the page to find provider webparts
		foreach (System.Web.UI.WebControls.WebParts.WebPart providerPart in webparts)
		{

			// check if the webpart is a Provider webpart
			provColl = manager.GetProviderConnectionPoints(providerPart);
			if (provColl != null && provColl.Default != null)
			{

				// walk through all the webparts on the page again now to find the consumer webparts
				foreach (System.Web.UI.WebControls.WebParts.WebPart consumerPart in webparts)
				{

					// first make sure the webpart isn't the provider webpart
					if (consumerPart != providerPart)
					{
						// check if the webpart is a Consumer webpart,
						// then make sure the consumer webpart isn't already connected to the provider webpart
						// then check if the interface of the consumer webpart is assignable from the interface of the provider webpart
						consColl = manager.GetConsumerConnectionPoints(consumerPart);
						if (consColl != null && consColl.Default != null
							&& !WebPartConnectionExist(manager.SPWebPartConnections, providerPart, consumerPart)
							&& consColl.Default.InterfaceType.IsAssignableFrom(provColl.Default.InterfaceType))
						{
							// connect the webparts
							manager.SPConnectWebParts(providerPart, provColl.Default, consumerPart, consColl.Default);
							connectionMade = true;
						}
					}
				}
			}
		}
	}
	return connectionMade;
}

Sample usage (console application)

try
{
	using (SPSite site = new SPSite("http://localhost"))
	using (SPWeb web = site.OpenWeb())
	{
		ConnectWebPartsOnPage(web, "pages/default.aspx", false);
	}
}
catch (Exception ex)
{
	Console.WriteLine();
	Console.WriteLine("Message:\n{0}\n\nStack:\n{1}\n\n", ex.Message, ex.StackTrace);
}
]]> http://blog.thumnet.com/automatically-connect-webparts-on-sharepoint-page/feed/ 5
First NEN 2082 certified project with SharePoint 2010 http://blog.thumnet.com/first-nen2082-certified-project-sharepoint-2010/ http://blog.thumnet.com/first-nen2082-certified-project-sharepoint-2010/#comments Thu, 04 Mar 2010 15:01:39 +0000 Jeffrey Tummers http://blog.thumnet.com/?p=180

Continue reading »]]>
Together with 3 colleagues from QNH Business Integration I am currently finishing implementing a already NEN 2082 certified project based on SharePoint 2010.
When SharePoint 2010 hits RTM there will be another audit for this version of SharePoint, because currently the pre release version has been certified.

NEN 2082 is a Dutch standard which is similar the DoD5015 and MoReq standards.

This project was done for the Gemeente Nieuwegein, which is a Dutch local Government.

Gemeente Nieuwegein

For this project we have also been nominated for the “Innovation of the year” award:

LRG Innovator Nomination 2010

More information (Dutch)

My colleagues at QNH:

]]> http://blog.thumnet.com/first-nen2082-certified-project-sharepoint-2010/feed/ 0
Problem with VS2010 beta 2 Site Definition http://blog.thumnet.com/problem-vs2010-beta2-sitedefinition/ http://blog.thumnet.com/problem-vs2010-beta2-sitedefinition/#comments Wed, 16 Dec 2009 10:40:23 +0000 Jeffrey Tummers http://blog.thumnet.com/?p=159

Continue reading »]]> I encountered the following problem while creating a new custom Site Definition in Visual Studio 2010 beta 2.

The problem occurs when trying to create a new Document Library in the site based on the custom Site Definition.

Error while trying to add a new Document Library

Error while trying to add a new Document Library

Error message:

Error

An error occurred while getting items from the "" provider:
Cannot complete this action.

Please try again.

Read on to see the solution for this error.

Visual Studio 2010 now has native integration of SharePoint 2010 projects.

New Site Definition in Visual Studio 2010

New Site Definition in Visual Studio 2010

After creating the new Site Definition Project in the onet.xml file contains the following:

<?xml version="1.0" encoding="utf-8"?>
<Project Title="SampleSiteDefinition" Revision="2" ListDir="" xmlns:ows="Microsoft SharePoint" xmlns="http://schemas.microsoft.com/sharepoint/">
  <NavBars>
  </NavBars>
  <Configurations>
    <Configuration ID="0" Name="SampleSiteDefinition">
      <Lists/>
      <SiteFeatures>
      </SiteFeatures>
      <WebFeatures>
      </WebFeatures>
      <Modules>
        <Module Name="DefaultBlank" />
      </Modules>
    </Configuration>
  </Configurations>
  <Modules>
    <Module Name="DefaultBlank" Url="" Path="">
      <File Url="default.aspx">
      </File>
    </Module>
  </Modules>
</Project>

Now you can modify to the onet.xml and default.aspx as you like.

When deploying the new Site Definition, creating a site, and then trying to create a new Document Library you get the error above.  The solution for the error turned out to be the missing declaration of the <DocumentTemplates> XML node.

Correct default onet.xml should be:

<?xml version="1.0" encoding="utf-8"?>
<Project Title="SampleSiteDefinition" Revision="2" ListDir="" xmlns:ows="Microsoft SharePoint" xmlns="http://schemas.microsoft.com/sharepoint/">
  <NavBars>
  </NavBars>
  <DocumentTemplates>
  </DocumentTemplates>
  <Configurations>
      <Lists/>
      <SiteFeatures>
      </SiteFeatures>
      <WebFeatures>
      </WebFeatures>
      <Modules>
        <Module Name="DefaultBlank" />
      </Modules>
    </Configuration>
  </Configurations>
  <Modules>
    <Module Name="DefaultBlank" Url="" Path="">
      <File Url="default.aspx">
      </File>
    </Module>
  </Modules>
</Project>

After re-deploying the Site Definition and creating a new Site, you are able to create a Document Library.

Working new Document Library

Working new Document Library

Reference:

Microsoft’s Reference for SharePoint 2010 onet.xml

]]> http://blog.thumnet.com/problem-vs2010-beta2-sitedefinition/feed/ 5
Looking for SharePoint 2010 Feature (GU)IDs http://blog.thumnet.com/looking-for-sharepoint-2010-feature-guid/ http://blog.thumnet.com/looking-for-sharepoint-2010-feature-guid/#comments Tue, 15 Dec 2009 17:23:29 +0000 Jeffrey Tummers http://blog.thumnet.com/?p=142

Continue reading »]]> Have you ever been looking for a feature (GU)ID in SharePoint? Well here is an easy way to find them.

I needed default SharePoint feature guids for the development of a custom Site Definition. Using a custom Site Definition you can automatically activate SharePoint features within the onet.xml file.

Here we go:

  1. Open the SharePoint site in IE8 (or IE7).
  2. Go to the Site Settings page.
    site-settings-menu
  3. Click on the Manage Site features (or Site Collection features)
    site-features
  4. Use the Developer Tools (shortcut F12)
  5. Click in the toolbar on Find –> Select Element by Click (shortcut CTRL+B, but this opens bookmarks manager on my machine)
    developertools-select
  6. Select the Activate (or Deactivate) button next to the feature you need the GUID from.
    select-feature-activate-button
  7. Developer Tools scrolls down to the HTML source for the specific button, the button tag is contained within a Div tag. This Div tag contains an ID attribute and thats the GUID for the feature!
    selected-feature-html
  8. In this case the GUID is: 9c03e124-eef7-4dc6-b5eb-86ccd207cb87
    selected-feature-guid

This trick also works for SharePoint 2007!

]]> http://blog.thumnet.com/looking-for-sharepoint-2010-feature-guid/feed/ 2
IMDB REST Webservice update http://blog.thumnet.com/imdb-rest-webservice-update/ http://blog.thumnet.com/imdb-rest-webservice-update/#comments Mon, 02 Nov 2009 20:45:15 +0000 ThumNet http://blog.thumnet.com/?p=129

Continue reading »]]> Update 2009-12-16

Looking for help in hosting

If you have a server that hosts PHP and you want to support the Scraper service please contact me (info at thumnet dot com).


Update 2009-12-12

Service currently down, due to too many request to IMDb, working on a fix!

Update 2009-12-09

  • Added Picture in imdb-name request
  • Added result count limitation param (see the guide)
  • Some small bugfixes:
    • missing tt and nm prefix in ImdbID property in imdb-name-search request,
    • missing ImdbID for Writers and Directors in imdb-title request,
    • changed Season and Episode in imdb-episode request to SeasonNR and EpisodeNR
    • added result type to the summary element, to identify the result data

Update 2009-12-02

  • Added Name search functionality, with imdb-name-search url param (imdb-search is now imdb-title-search)
  • Added Name details, with imdb-name url param

Update 2009-12-01

  • Fixed the Plot and Tagline for imdb title’s, see comments below.

It’s been some time since my post about the IMDB webservice but I’m proud to tell you readers there is a new version available.

Some important changes include:

  • Restructured output (sorry to you guys who have to update their software)
  • Output available in XML, JSON and debug (other output formats can be added on request)
  • Automatic support for gzipping the output
  • Summary information, containing:
    • data source
    • timestamp of the data
    • time taken in ms
    • scraper info
    • error code (0 for no error!) and error description
  • Easily extendable scrape framework, so in the future more sites can be scraped!
  • Admin interface to review the data you guys produce

Still interested or just curious?

Well the new url is: http://scraper.thumnet.com

The old version (imdb.thumnet.com) will only be available until 1 december 2009.

]]> http://blog.thumnet.com/imdb-rest-webservice-update/feed/ 36
airTranslate on Google code http://blog.thumnet.com/airtranslate-on-google-code/ http://blog.thumnet.com/airtranslate-on-google-code/#comments Mon, 21 Sep 2009 16:39:14 +0000 ThumNet http://blog.thumnet.com/?p=123

Continue reading »]]> Because I wanted to learn programming in Adobe Flex I build a tool called airTranslate. It uses the Google Ajax Language API to translate the users input text to the chosen output language.

airTranslate-screenshot

airTranslate features:

  • Multi platform
  • Auto detection of input language
  • Drag and drop input text (with auto translation)
  • Dock to tray icon (Windows only)
  • Translate from clipboard (with auto translation)
  • Auto store last chosen translation language
  • Update notification

airTranslate is available at Google code: http://code.google.com/p/thumnet/downloads/list

The project is open source, and sources are available at http://code.google.com/p/thumnet/source/browse/#svn/trunk/Air. It is possible to request new functions and report issues through the Google code website.

To run Adobe AIR programs you need to download and install the Adobe AIR runtime

]]> http://blog.thumnet.com/airtranslate-on-google-code/feed/ 0
Release Pixeled-Multicolor Theme for WordPress http://blog.thumnet.com/release-pixeled-multicolor-theme-for-wordpress/ http://blog.thumnet.com/release-pixeled-multicolor-theme-for-wordpress/#comments Wed, 01 Jul 2009 17:04:51 +0000 ThumNet http://blog.thumnet.com/?p=90

Continue reading »]]> In my previous post I talked about the modifications I had made to the Pixeled WordPress theme.

Well about 2 months ago I send the creator of the Pixeled theme an email requesting him to read my blogpost about the changes I had made to his theme.
But since then I haven’t heard anything from him, so I decided to release the pixeled-multicolor theme myself.

Some screenshots:
Pixeled-Multicolor Red Pixeled-Multicolor Red (with menu on the Left) Pixeled-Multicolor Green Pixeled-Multicolor Blue

Download Pixeled-Multicolor (release 20090701)

]]> http://blog.thumnet.com/release-pixeled-multicolor-theme-for-wordpress/feed/ 0