Spacer
Spacer

NGCODERS.COM

[ NEXT GENERATION CODERS ]

Spacer

Joodr Profile System – Content profile vs Core profile

As Joodr is based on Drupal 6 , Neither Nodeprofile or Bio can be used for profile system. So basically I had two options Content Profile and the core profile.module .  Both have their own advantages and disadvantages.

So after some digging around and looking how it works Joodr will be using a profile as node system using content profile. The main reason for me choosing this is how the data is stored when using core module and when using profile with CCK . I found profile with CCK is much better. There are other reasons too but overall for a SNS to be as scalable and configurable as possible content profile would be better, for smaller ones core profile should do just fine.

So i will be finally using content profile as profile module for Joodr.

XBOX 360 RROD and Microsoft India support

I have a XBOX 360 for some time now, last week after a month out of 1 yr warranty it showed the feared Red Ring of Death (RROD). I had heard many horror stories about it . As I had never had actually dealt with Microsoft India before I was pretty pessimistic as my experience with after sales services with companies in India is pathetic ( actually its really bad ).

So I called up Microsoft and after a few verifications i was assigned a replacement. The replacement arrived within 3 days and to my surprise it supported 1080p unlike my old one which just did 720p. So am pretty happy about my free upgrade and great after sales service provided my Microsoft.

So if you are planning to buy a XBOX 360 in India do go ahead and do get yourself a XBOX live connection , thats what makes 360 shine above the other consoles which collect dust in my house.

JTemplate – Joomla tempaltes on Drupal

Jtemplate is the first step towards Joodr,It aims at allowing usage of vast number of premium joomla templates with drupal with minimal effort. It is basically a set of Drupal Module and a templating Engine based on phptemplate. The idea is to allow the use of Joomla templates on Drupal as good templates for drupal are missing, drupal templating is expensive and few premium template providers who are there charge really high.Currently you just need to upload the template to the themes directory and just create a dummy template_name.infofile in the directory and the rest everything is taken care by Jtemplate.

Currently a lot of work is still remaining but here are a few features -

  • Drupal 6 supported
  • Joomla 1.5 templates compatible
  • Little to no changes required to Joomla templates
  • Support for Template params and Template styes from admin
  • Effects and Suckerfish menus supported
  • Tested with premium templates from some providers.

Anyhow will be releasing the download soon , am looking for people to help me improve it for now.As everything does not work :) .

You can check a demo here – http://joodr.org/demo/ . The demo is running plain Drupal 6.5 with Jtemplate installed. The template is from rocketheme , with no changes or editing done :) .

Here is an alpha release as im not getting time to work on it , this is meant for people comfortable with drupal and know what they are doing.

Upload the site structure in the zip file and enable jtemplate module in the admin. To create menus use joomla like names mainmenu,footer,usermenu etc for drupal menu name. Also make the default drupal theme as admin theme from settings.

Joomla and Drupal together – Joodr ( Social Networking Script )

I have been building sites for a long time. and have user both drupal and Joomla , even built a lite version of Joomla called Limbo CMS long time back. They are both quite good CMS’s. Given  the two I would choose drupal any day for myself ( though would never recommend it , cause its still not easy to make it do what u want ) , but am no designer and drupal templates are a big let down, though not hard but templating drupal is just a pain.  And template wise Joomla simply is Awesome ( the quality of premium templates available is just so good ) , and its easier to work with for not so technically inclined.

And i have been looking for a good social networking script since last year , and having looked far and wide from paid scripts like phpfox,handshakes,socialengine etc to free ones like Dolphin(not really free),elgg,phpizabi,Joomla+CB. Most of them are really bad and nothing i would build a big site on , its just that bad. There is hope in hosted platforms like ning,socialgo,colletivex but they are hosted , never recommended for anything serious. The only good social networking platform out there is Drupal – has everything i need from scalabilty , security , documentation etc . But again the base install requires hours of tweaking to make it look anything like a normal social script.

So my after taking a few months off from freelancing , ive decided to work on  a new personal project called Joodr. It aims to be something like ning but free, based on drupal so that its as flexible,scalable,secure and use Joomla 1.5 templates so your sites look awesome without much effort. The name Joodr i simpley got from Joomla + Drupal , though its a basically a customized install profile of Drupal.

Work has started so keep reading for further updates !!! And if you have any ideas and suggestions let them flow.

Website hacked to finding the exploit

Recently one of my sites was hacked , It was a closed source web application. I came to know next day when i saw changes made to some settings for my web – application. Anyhow here is how i tracked down what was wrong , might help some one in the same mess i was in.

The first thing i noticed was that Administrator account passwords were changed, So i instantly knew something was wrong.

Since i usually store main settings in a file for faster access , i just opened FTP to look at the time stamp associated with the file. This showed me the last modifed date of the file and an approximate idea when the hacker changed the details.

Next step was to dig up the raw access logs from CPanel , After downloading the access logs for that specific file i opened them in PSPad ( My fav editor ) . Logs are not small of busy sites so you will be looking at a very large amount of data.

But i knew specific url which can be used to change the settings so i just did a Ctrl-F and put in the url with a POST prefix , as a form has to be submitted to change settings . This gave me a few instances of that URL with POST request.

Now looking at the time stamp i was able to find out when the hacker did the settings change. Means I had the IP.Doing another another CTRL-F on the IP and pressing list put all the hacker logs in another window , which makes its easy for us to go step by step at his efforts to crack the system.

After going from the start i noticed after certain URL he suddenly had got access to the admin section , And once i put in the url myself, i knew what the problem was.

And so it was fixed.

PHP automatic file and database backup script

This is a pure php implementation of a php backup script. So it should work fine on windows and linux. But its not suited for takeing very large backups.

I just wrote it cause most of the script i saw offered file or database backup and broke down to usage of exec  and unix commands , for which i had to contact hosting.

Some basic features -

  • File and Directory backup
  • Multiple database/table sql backup
  • Backup email


The script is supposed to be called using automatically using CRON , and the backup folder in which backup it taken should be writable.All you have to do is run backup.php .

Edit config.php before use. Released under GNU GPL license.

PHP Youtube video downloader script

I was searching for a simple script which would allow me to download videos from youtube using php. I did find some implementation but only one of them worked and it used Pear. So here is a simple script to help you download videos from youtube. Allows you to download restricted videos too by logging into youtube.

The script is a simple youtube class which uses CURL.

Sample usage of the youtube class –

include(‘curl.php’);
include(‘youtube.php’);

$tube = new youtube();

$links = $tube->get($_POST['url']);

New Version with much much more : FreeDown Downloader



PQuery – PHP and JQuery

PQuery is a set of helper classes for JQuery JavaScript library.This library allows you to easily integrate AJAX , Effects and other JQuery functionality into your PHP scripts.IT has a small foot print and is compatible with PHP4 and PHP5.

PQuery Demos : PQuery Demos.

Documentation : PQuery Documentation .

License : MIT or GPL ( what ever you wish to use )

RemitRates.com , Money sending services compared.

RemitRates.com is a site to help people who wish to transfer or send money to India get the best exchange price and helps then decide which money transfer service will get them the most returns. Site compares services like Western union money transfer, XOOM , Paypal etc.

It was built in my free time , just to track exchange rates so i get the best rate when i transfer money. The site is built on my new framework BaseApp, Jquery as the JS framework and BluePrint as the CSS framework.

Though it was a small project its the first time i used BluePrint CSS framework properly, And it Rocks !!! . Total amount of custom css is less than a KB and yet it is a clean looking site with cross browser compatibility. So if you never looked at BluePrint CSS framework before do give it a shot.

Adding nofollow to all outbound links to increase pagerank

I have some sites which have been running for a long while, and due to not having time on my part to upgrade them they still run pretty old scripts with custom coding ( If it aint broke dont fix it :) ). Some time back i realized the rel=”nofollow” thing and how people posting links on those sites got Backlinks for free. After doing a little backlink checking i found that my sites were linking to competitor sites , which is totaly unacceptable.Also with so maybe free backlinks going out PR can be affected ( am not shore about that though ). So with a few lines of PHP you can kill all free back links people have been getting through ur side.

So if you are stuck with the same situation here is a little help , Assuming your site is running in php. What we do is buffer all the content and find all non site links and replace them with a additional nofollow tag.

ob_start();

// Your sites code goes here

$content = ob_get_contents();
@ob_end_clean();

preg_match_all(‘!href[\s]*=[\s]*["\']{1}([\w]+?://[\w#$%&~/.\-;:=,?@\[\]+]*)["\']{1}!’,$content,$matches);

// Replace all outbound links with nofollow

$replaced = array();

for($i=0;$i<count($matches[0]);$i++)
{
if(strstr($matches[1][$i],’http://www.sitename.com’)) continue;
if(strstr($matches[1][$i],’http://sitename.com’)) continue;

if(in_array($matches[0][$i],$replaced))continue;

$content = str_replace($matches[0][$i],$matches[0][$i].’ rel=”nofollow”‘,$content);

$replaced[] = $matches[0][$i];
}

echo $content;

Now i hope this code increases the PR for the sites , they are PR 5 for now … will post results if i see any changes in the site stats.