Welcome Guest ( Log In | Register )



2 Pages V   1 2 >  
Reply to this topicStart new topic
> How To Test Drupal Themes?
doudou
post Jul 18 2006, 02:32 PM
Post #1


Advanced Member
Group Icon

Group: Members
Posts: 114
Joined: 1-July 06
Member No.: 14,234



I am writing a Drupal theme and I would like to test it out before using it on my website. Is there a way to test it?
Go to the top of the page
 
+Quote Post
Vyoma
post Jul 18 2006, 02:52 PM
Post #2


Cosmic Overlord
Group Icon

Group: Members
Posts: 560
Joined: 26-November 05
From: Denver, Colorado, US
Member No.: 9,811
myCENTs:38.41



The first one is, set up a local server on your PC (may be using XAMPP or EasyPHP), and then setup Drupal there. (Just FTP download your site, and put it in the www folder of the Apache). Then, I think it is straight forward. Put the theme you created in the themes folder, start your (local) Drupal, and select it and see how it turns out.

I have heard people use different themes for different roles, but I am not sure how this can be achived and it is too much intrusive. This method, requires a lot of code change, I suppose.

So, the best way is to have a local copy of your Drupal website running on your workstation, fiddle around with it, and when you are satisfied, upload it.
Go to the top of the page
 
+Quote Post
doudou
post Jul 18 2006, 05:05 PM
Post #3


Advanced Member
Group Icon

Group: Members
Posts: 114
Joined: 1-July 06
Member No.: 14,234



I don’t suppose there is any other way of validating my code? I don’t have a server set up on my computer and it’s really too much trouble. I’m afraid to try it on my site because if it doesn’t work, it hard to get it back to my original theme.
Go to the top of the page
 
+Quote Post
seec77
post Jul 18 2006, 05:25 PM
Post #4


Advanced Member
Group Icon

Group: Members
Posts: 157
Joined: 16-May 06
Member No.: 13,476



Well, you can easily create a new Drupal installation inside a new folder of your site's web server. If you really want you can actually get multiple instances of Drupal to run from the same codebase, but that's overkill for an action such as testing out your theme.
Running it on your main site isn't as bad either if you don't have any visitors, because it's actually very easy to change back to the old theme (just disable your new theme and set the default to the old theme).
But anyways, I think the best long-term approach would be to just easily set up a complete webserver using XAMPP.
Go to the top of the page
 
+Quote Post
doudou
post Jul 19 2006, 02:51 AM
Post #5


Advanced Member
Group Icon

Group: Members
Posts: 114
Joined: 1-July 06
Member No.: 14,234



QUOTE
But anyways, I think the best long-term approach would be to just easily set up a complete webserver using XAMPP.


Should I download the lite version or the full version? The Lite version doesn't seem to have a installer.
Go to the top of the page
 
+Quote Post
Vyoma
post Jul 19 2006, 05:01 AM
Post #6


Cosmic Overlord
Group Icon

Group: Members
Posts: 560
Joined: 26-November 05
From: Denver, Colorado, US
Member No.: 9,811
myCENTs:38.41



Yes, setting up a server at home can be difficult, but as I said earlier, and also as seec77 pointed out, the job has been done easy by XAMPP.

XAMPP stands for Apache, MySQL, PHP and PERL. (Do not ask me what 'X' stands for, 'cause I do not know tongue.gif).

Anyway, do not bother with the lite version. Down load the full version. I downloaded the self extractor, and extracted it to C:\xampp folder. After all the files have been extracted, run the C:\xampp\setup-xampp.bat batch script. (That is, just browse to the folder you have installed xampp and run the file setup-xampp.bat). By doing this all paths in the configuration will be updated.

That is it, it is as simple as that.

Start the different servers using the GUI "xampp-control.exe" that is present in the same folder. A prudent move would be to make a short cut of this and place it on your desktop. Just click on the Apache and MySQL Start buttons if they are not running already.

Now, go ahead and install a Drupal site on the \xampp\htdocs folder. If you had earlier used the Fantastico installer to install Drupal, you would find doing this a bit more difficult, but reading through the Drupal installation instructions is easy.

Anyway, first install the XAMPP and then try to install Drupal. If you have any problems, let us know and one of us would walk you through.
Go to the top of the page
 
+Quote Post
doudou
post Jul 19 2006, 11:10 PM
Post #7


Advanced Member
Group Icon

Group: Members
Posts: 114
Joined: 1-July 06
Member No.: 14,234



I have successfully installed XAMPP I have ran into some problem installing drupal.

I have followed the instruction listed in several sites, since the handbook always confuses me. I must have incorrectly configured the “settings.php” file because I can’t seem to connect.

First I tried to connect without any password, just the username ‘root’. But it doesn’t seem to work.

Then I opened up the database ‘mysql’ with phpMyAdmin and added the password for user “root”.

I also added the my password in cofig file under phpMyAdmin.

So now, I cannot access both phpMyAdmin and drupal.

What did I do wrong?

Thanks


This post has been edited by doudou: Jul 20 2006, 01:37 AM
Go to the top of the page
 
+Quote Post
Vyoma
post Jul 20 2006, 06:23 AM
Post #8


Cosmic Overlord
Group Icon

Group: Members
Posts: 560
Joined: 26-November 05
From: Denver, Colorado, US
Member No.: 9,811
myCENTs:38.41



Ok doudou.

Let us do this one by one.
  • Unzip the drupal tarball to the htdocs directory
  • Now we need to create a Drupal database with proper username and password (because, this we, would be using in settings.php):
    • Open a MSDOS command window. (Choose Start->Run... and then type 'cmd' and hit OK.
    • type 'CD c:\xampp\mysql\bin' (note to replace c:\xampp to whereever you have installed xampp)
    • type 'mysqladmin -u root -p create durpaldb'. It may ask for password. If you had changed the password earlier for root, give it now.
    • type 'mysql -u root -p'. Again, give the root password.
    • copy and past the following QL command:

      GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX,
      ALTER, CREATE TEMPORARY TABLES, LOCK TABLES
      ON drupaldb.*
      TO 'username'@'localhost' IDENTIFIED BY 'password';

      Note: repalce username and password with anything you wish for your 'drupaldb' database. Just remember them.

      Once you hit enter, it should give: 'Query OK, 0 rows affected'
    • After that, give a ' FLUSH PRIVILEGES;'
    • Enter 'exit' and come out of the prompt
    • Then enter:

      mysql -u username -p drupaldb < database/database.4.1.mysql

      Use the username you had used earlier while granting permissions. You will need to give that same password.
      Also, it is advisable to use the full path of databasee.4.1.mysql file.
  • Now, go to the sites/default/settings.php file, and locate the $db_url. Remove the standard string there and replace it with:
    $db_url = "mysql://username:password@localhost/drupaldb";

    Again replace username and password with whatever you had given earlier.
  • With in the Drupal directory, create a folder called 'files'

That should work. If it doesnot, just tell us on which particular step you are failing.
Go to the top of the page
 
+Quote Post
doudou
post Jul 31 2006, 01:41 PM
Post #9


Advanced Member
Group Icon

Group: Members
Posts: 114
Joined: 1-July 06
Member No.: 14,234



But how do I solve the problem I currently have. Should I uninstall and then reinstall everything?

This post has been edited by doudou: Jul 31 2006, 01:42 PM
Go to the top of the page
 
+Quote Post
Vyoma
post Jul 31 2006, 03:32 PM
Post #10


Cosmic Overlord
Group Icon

Group: Members
Posts: 560
Joined: 26-November 05
From: Denver, Colorado, US
Member No.: 9,811
myCENTs:38.41



Yes doudou, I think that would be prudent. I gave the full set of installation instructions because I could not actually pin point on what the problem was from what you have given. Just try to do things from the scratch, and then hopefully it works.

If it does not, try to give the exact step where you failed to get the result as you expected. That would put us both on the same page and then we can work on the problem and try and get a solution for that.
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Drupal(12)
  2. Unable To Log Into The Drupal Cms When Using Parked Domain As Url(4)
  3. New To Drupal(5)
  4. Getting Frustrated With Drupal(11)
  5. Help Needed In Drupal Page Categerization(3)
  6. Drupal Login Problem(7)
  7. Drupal And Forum Integration (phpbb/smf)(9)
  8. Drupal 5 Upgrade Anyone?(2)
  9. Drupal Taxonomy + Heavy Modification = Preference Engine? Thoughts?(3)


 



- Lo-Fi Version Time is now: 23rd November 2008 - 11:18 AM