dimanche 22 novembre 2015

Drupal 7! How to reset my admin password?

The best way to reset your admin's password if it was lost!
1- Create a php file named for example pass.php in your drupal root directory.
2- Paste this code into pass.php file:
include_once './includes/password.inc';
include_once './includes/bootstrap.inc';
$newPass = user_hash_password('yourNewPass'); //hashing password
echo $newPass;
3- Navigate the file with exemple.com/pass.php then copy the output md5 pass.
4- Open your phpmyadmin interface, go to your database then the users table and alter the administrator user pass with the new md5 rendred password.
5- Finally log into your site with yourNewPass

samedi 11 avril 2015

[new] Country state module

During developping of my car ads site (SeraVendu), i need a custom field to stores country/state data to each content type, so there is a dev module Country State witch creates new vocabulary where we're going to set and charge  our list of countries/states.

       manage field location field screenshot (example)

manage display location field screenshot (example)

setting location field screenshot

Link to code

dimanche 5 avril 2015

Recommendation de mon ancien chef de projet

Module "Facebook post node"

Facebook post node
facebook_post_node  the machine name of the new module.
It allows users to share any node on theirs facebook wall, you only have to create a facebook application and paste app id and secret key provided by facebook on your module configuration form. And as result a simple widget will show up under full screen node you only have to click and see your wall.

Lien git hub